この記事の内容
実際に
Continueと Snyk MCPで 脆弱性を 検出・修正する
Continueは、
Continueを
開発者のリアルな声
ある
さまざまな
ある
一般的な
こうした
Continueを使い始める
Continueは、
拡張機能を
インストール:VS Code向けはVisual Studio Marketplaceから、 JetBrains IDE (IntelliJ IDEA、 PyCharm、 WebStorm) 向けは プラグインと して 入手できます。 右サイドバーに
移動:インストールすると、 Continueの アイコンが 左サイドバーに 表示されます。 より 快適に 使うには、 右サイドバーに ドラッグして 移動してください。 モデルを
設定:エージェント選択の ドロップダウンを クリックし、 希望する モデルプロバイダーを 選択します。Continueは OpenAI、 Anthropic、 ローカルモデル向けの Ollamaなど、 さまざまな プロバイダーに 対応しています。 任意:Continue Hubに
サインイン:エージェントワークフローの 管理や チームコラボレーション機能を 使う 場合は、 Continue Hubに サインインします (詳しくは 後述)。 ただし 必須ではありません。 ローカルモデルを 使えば、 Continueは 完全オフラインでも 動作します。

ContinueのModel Context Protocol(MCP)対応
最新の
ContinueでMCPサーバーを設定する
Continueでは、
ワークスペース単位のMCP設定
(.continue/mcpServers/)
設定
your-project/
├── .continue/
│ └── mcpServers/
│ ├── playwright-mcp.yaml
│ └── snyk-mcp.yaml
└── ...グローバルMCP設定
(~/.continue/config.yaml)mcpServersブロックで
MCPのトランスポート方式
Continueは
STDIO(標準入出力)
:ローカルプロセスや コマンドラインツールに 最適です。 多くの MCPサーバーが この 方式を 使用します。 Streamable HTTP:ストリーミングに
対応した リモート/ホスト型MCPサーバー向けです。 SSE(Server-Sent Events)
:リモートサーバーとの リアルタイムストリーミング通信向けです。 な
お、MCPプロトコルでは SSEが 廃止予定と なっており、 Streamable HTTPへの 移行が 進められています。
MCPサーバーの
name: My MCP Server
version: 0.0.1
schema: v1
mcpServers:
- name: Server Display Name
command: npx # or full path to executable
args:
- "package-name"
- "--flags"
env:
API_KEY: ${{ secrets.MY_API_KEY }}この
Snyk Studioを追加する
Snyk Studioの
前提条件
Snyk MCPサーバーを
1. Snyk CLIが
# Install via npm
npm install -g snyk
# Or download from https://docs.snyk.io/developer-tools/snyk-cli/install-or-update-the-snyk-cli2. Snyk認証:MCPサーバーには
1snyk authブラウザーが

設定方法
最も
左サイドバーの
Continueアイコンを 選択します。 ユーザー入力ボックスの
上部に ある 「Configure tools」を 選択します。

3.

4. プロジェクト内のnew-mcp-server.yamlファイルが
1owler@OwlUbuntu:~/Documents/Snyk/snyk-mcp-demos/pygoat$ tree .continue/
2.continue/
3└── mcpServers
4 └── new-mcp-server.yaml
5
61 directory, 1 fileSnyk MCPサーバーは、
npxを使って常に最新の状態に保つ
ワークスペースに.continue/mcpServers/snyk-mcp.yaml を
name: Snyk Security Scanner
version: 0.0.1
schema: v1
mcpServers:
- name: Snyk
command: npx
args:
- "-y"
- "snyk@latest"
- "mcp"
- "-t"
- "stdio"
env: {}この
ローカルにインストールしたSnyk CLIのパスを直接使う
Snykを
name: Snyk Security Scanner
version: 0.0.1
schema: v1
mcpServers:
- name: Snyk
command: /absolute/path/to/snyk (i.e. from `which snyk`)
args:
- "mcp"
- "-t"
- "stdio"
env: {}ほとんどのwhich snykの/absolute/path/to/snyk を
Snyk MCPサーバーを--experimentalフラグが
ContinueでSnyk MCPサーバーを有効にする
設定ファイルを
1. Continueの


2. MCPツールを

3. 認証を
Continueで脆弱性を自動検出して修正する
このadeyosemanputra'が
初回のセキュリティスキャン
まず、
Continueの
Please run a Snyk code scan on the current project.Continueの

続いて
Top Critical Issues Found:
🔴 High Severity Issues:
Path Traversal (2 instances) - Unsanitized input flows into file operations
Code Injection (2 instances) - Use of eval() with unsanitized input
SQL Injection (2 instances) - Unsanitized input in SQL queries
Command Injection (2 instances) - Unsanitized input in subprocess calls
Deserialization of Untrusted Data (3 instances) - Unsafe pickle.loads() usage
XML External Entity (XXE) Injection - Insecure XML parser
Use of Hardcoded Cryptographic Key (2 instances) - JWT with hardcoded secret
Hardcoded Non-Cryptographic Secret (2 instances) - Including Django SECRET_KEY
🟡 Medium Severity Issues:
Debug Mode Enabled - Flask app running with debug=True
CSRF Protection Disabled (27 instances) - Many views using @csrf_exempt
Hardcoded Passwords (18 instances)
SSRF - Server-Side Request Forgery vulnerability
Insecure XML Parser (2 instances)
🟢 Low Severity Issues:
Insecure Hash (MD5) (4 instances) - Using MD5 for passwords
Hardcoded Credentials (5 instances)
Cookie Security Issues (46 instances) - Missing HttpOnly/Secure flags
This is clearly a vulnerable-by-design training application (PyGoat). Would you like me to help you understand any specific vulnerability or create fixes for them?重大度の高いSQLインジェクションの脆弱性を修正する
次に、
The scan found a High severity SQL Injection vulnerability:
Path: introduction/views.py, line 871
Info: Unsanitized input from an HTTP parameter flows into
introduction.models.sql_lab_table.objects.raw, where it is used in an SQL query.
Can you fix this vulnerability and then re-scan to verify it's fixed?Continueの
The user wants me to:
1. Fix a SQL injection vulnerability in introduction/views.py around line 871
2. Re-scan to verify the fix
Let me first read the file to see the vulnerable code.
I'll help you fix the SQL injection vulnerability. Let me first examine the vulnerable code.まず、
Continue read introduction/views.py
Now I can see the vulnerable code around line 871. The issue is in the injection_sql_lab function where raw SQL queries are constructed using string concatenation with unsanitized user input. Let me fix this vulnerability by using parameterized queries:
次に、

Continueが
What was fixed:
Before:
Line 856: sql_query = "SELECT * FROM introduction_sql_lab_table WHERE id='"+name+"'AND password='"+password+"'"
Line 870: user = sql_lab_table.objects.raw(sql_query)
This allowed attackers to inject malicious SQL code through the name or password parameters
After:
Line 851: sql_query = "SELECT * FROM introduction_sql_lab_table WHERE id=%s AND password=%s"
Line 871: user = sql_lab_table.objects.raw(sql_query, [name, password])
Now uses parameterized queries where user input is safely passed as separate parameters修正を確認する
エージェントが
Perfect! ✅ The SQL injection vulnerability has been successfully fixed!
Verification Results:
The scan now shows 101 issues (down from 102), confirming that one SQL injection vulnerability has been eliminated.
これで、
Continue Hub:チームコラボレーションと共有エージェント
参考までに、Continue Hubは、
無料の
Hub Agents
Webベースの
管理: 使いやすい インターフェースで エージェントを 設定でき、 すべての IDEインスタンスから アクセスできます。 ワンクリックで
共有:チームの コーディング規約に 合わせた カスタムエージェントを 作成し、 シンプルなリンクで 共有できます。 すばやく
セットアップ:設定ファイルを 編集する 必要は ありません。 好みの 設定を 選ぶだけで、 すぐに コーディングを 始められます。 自動更新:変更は
チームメンバー全員に すぐ 反映されます。
Continue CLI:ターミナルで使えるAIエージェント
Continue CLI

対話モード
# Install globally
npm i -g @continuedev/cli
# Launch interactive mode
cn
# Resume previous conversation
cn --resume対話モードでは、cnは
失敗する
テストの 修正 コードベース内の
パターンの 検出 複雑な
リファクタリングの 実行 新機能の
実装 (承認後に)
ターミナルコマンドを 実行
IDEと@で
IDEと同じ設定を使用
CLIはconfig.yamlを/configコマンドまたは--configフラグで、Hubエージェントと
# Use Hub agent
cn --config continuedev/default-agent
# Use local configuration
cn --config ~/.continue/config.yamlContinueの特徴
Continueが
オープンソースと拡張性に優れたアーキテクチャ
Continueは
ソースコードを
確認:コードの コンテキストが どのように 処理され、 AIモデルと 共有されるかを 正確に 確認できます。 カスタム拡張機能:独自の
スラッシュコマンド、 コンテキストソース、 テンプレート化された システムメッセージ、 ツールを 作成できます。 コミュニティの
貢献:拡大を 続ける 拡張機能と 設定の エコシステムを 活用し、 その 発展に 貢献できます。
モデル選択の柔軟性とベンダーロックインからの解放
Continueは
モデルを
使い分ける :複雑な 推論タスクには Claude Sonnetモデルを 使い、 日常的な 補完には ローカルモデルを 利用 ニーズに
応じて 会話の 途中で モデルを 切り替える
コスト体系:Continueは
IDEを置き換えずに統合
VS Codeの
使い慣れた
設定や 拡張機能を そのままに、 既存の VS Codeや JetBrains環境を 利用できる 新しい
IDEの 習得が 不要 既存の
キーボードショートカットや カスタマイズを そのまま 利用できる 導入の
ハードルが 低く、 数分で インストールして 使い始められる
ContinueとSnykで次のステップへ
MCPの
脆弱性を
修正するだけでなく、 包括的な セキュリティテストを 生成して リグレッションを 防止する セキュリティ修正や
セキュアコーディングの パターンを 反映するよう、 ドキュメントを 自動更新する 人の
判断が 必要な 複雑な セキュリティ課題に ついて、 手動レビュー用の 詳細な チケットを 作成する CI/CDパイプラインと
連携し、 コードの マージ前に セキュリティに 関する フィードバックを 提供する Continue CLIを
使って、 スケジュール済みジョブや イベント 起動型ワークフローで セキュリティスキャンを 自動実行する
Continueの
利用を開始する
同様の
1. Continueを
2.
3.
npm i -g @continuedev/cli4. Snyk MCPサーバーを
5. Snykでsnyk authを
6. Agent Modeを
7. スキャンと
LLMは、
Snykと