Automated Security Scanning with Snyk MCP and Continue
Set up an AI-powered security workflow that automatically scans your code, dependencies, infrastructure, and containers using natural language commands.
π New: Snyk Mission Control Integration with Continuous AIThe new Snyk Mission Control Integration enables Continuous AI - where AI agents autonomously detect, analyze, and fix vulnerabilities. When Snyk detects an issue, your agent automatically generates a fix, creates a PR, and validates the solution without manual intervention.Mission Control Benefits:
One-click OAuth - No tokens, no configuration files, just connect and go
Centralized workflows - Manage all security Tasks and automations from one dashboard
Webhook triggers - Automatically respond to new vulnerabilities as theyβre discovered
Metrics & intervention rates - Track how often agents successfully fix issues without human help
This represents Level 2 Continuous AI: AI handles routine security work autonomously while developers focus on complex problems. As outlined in our Continuous AI guide, this reduces intervention rates and accelerates secure development.Get Started: Use this cookbook to understand the fundamentals, then enable Mission Control to deploy autonomous security agents across your organization.
What You'll Build
An automated security scanning system that uses Continueβs AI agent with Snyk
MCP to identify vulnerabilities in code, dependencies, infrastructure, and
containers - all through simple natural language prompts
Create a new project in Snyk by importing your code repository (Git
provider or manual upload)
Install and authenticate the Snyk CLI locally:
Copy
npm install -g snyksnyk auth
This will open your browser to authenticate with your Snyk account.
Important: The Snyk MCP requires the Snyk CLI to be authenticated locally. Run snyk auth to authenticate before using the Continue agent with Snyk MCP.
Skip the manual setup and use our pre-built Snyk Continuous AI agent that includes
the Snyk MCP and optimized security scanning workflows for more consistent results.
After ensuring you meet the Prerequisites above, you have two paths to get started:
β‘ Quick Start (Recommended)
π οΈ Manual Setup
1
Load the Pre-Built Agent
Navigate to your project directory and run:
Copy
cn --agent continuedev/snyk-continuous-ai-agent
This agent includes:
Snyk MCP pre-configured and ready to use
Security-focused rules for best practices
2
Run Your First Security Scan
From your project directory, start with a comprehensive security scan:
Copy
# Headless modecn -p "Run a complete security scan on this project including code vulnerabilities, dependencies, and any IaC files. Summarize findings by severity." --auto
Thatβs it! The agent handles everything automatically.
Why Use the Agent? The pre-built agent provides consistent security scanning workflows and handles MCP configuration automatically, making it easier to get started with AI-powered security scanning.
1
Create a New Agent via the Continue Mission Control
Visit the Snyk Continuous AI Agent and click Install to add it to the agent you created in the step above.This will add Snyk MCP to your agentβs available tools. The Mission Control listing automatically configures the MCP command:
Copy
npx -y snyk@latest mcp -t stdio
Alternative installation methods:
Quick CLI install: cn --mcp snyk/snyk-mcp
Manual configuration: Add the MCP to your ~/.continue/config.json under the mcpServers section
Once installed, Snyk MCP tools become available to your Continue agent for all prompts.
The MCP will request authentication and folder trust permissions when first used.
This is handled automatically by the Continue agent.
3
Add Secure-at-Inception Rules
Install the Snyk Secure-at-Inception rules from Mission Control to enable automatic security scanning.How to add rules to your agent:
Visit the rules link above and click Install
The rules will be added to your agent configuration automatically
Rules apply globally to all your Continue sessions
These rules configure your agent to:
Run SAST scans on newly generated or modified code
Check dependencies when adding or updating packages
Auto-fix issues using Snykβs recommendations, then rescan
4
Run Your First Security Scan
Start with a comprehensive security scan:
Copy
# TUI modecn "Run a complete security scan on this project including code vulnerabilities, dependencies, and any IaC files. Summarize findings by severity."
Agent Requirements
To use the pre-built agent, you need either:
Continue CLI Pro Plan with the models add-on, OR
Your own API keys added to Continue Mission Control secrets (same as manual setup)
The agent will automatically detect and use your configuration along with the pre-configured Snyk MCP for security scanning operations.
Now you can use natural language prompts to run comprehensive security scans. The Continue agent automatically calls the appropriate Snyk MCP tools.
You can add prompts to your agentβs configuration for easy access in future sessions. Go to your agent in the Continue Mission Control, click Edit, and add prompts under the Prompts section.
Where to run these workflows:
IDE Extensions: Use Continue in VS Code, JetBrains, or other supported IDEs
Terminal (TUI mode): Run cn to enter interactive mode, then type your prompts
CLI (headless mode): Use cn -p "your prompt" --auto for headless commands
Test in Plan Mode First: Before running security scans that might make
changes, test your prompts in plan mode (see the Plan Mode
Guide; press Shift+Tab to switch modes in TUI/IDE). This
shows you what the agent will do without executing it. For example: "Run a Snyk Code scan and fix the top 3 issues"
Scan your source code for security vulnerabilities and code quality issues.TUI Mode Prompt:
Copy
Run a Snyk Code scan on this repo with severity threshold medium.Summarize issues with file:line. Propose minimal diffs for the top 3and rerun to verify.
Headless Mode Prompt:
Copy
cn -p "Run a Snyk Code scan on this repo with severity threshold medium. Summarize issues with file:line. Propose minimal diffs for the top 3 and rerun to verify." --auto
Check open source dependencies for known vulnerabilities.TUI Mode Prompt:
Copy
Run Snyk Open Source on this repo (include dev deps).Summarize vulnerable paths and propose a minimal-risk upgrade plan.Re-test after the plan (dry run).
Headless Mode Prompt:
Copy
cn -p "Run Snyk Open Source on this repo (include dev deps). Summarize vulnerable paths and propose a minimal-risk upgrade plan. Re-test after the plan (dry run)." --auto
Analyze Docker images for vulnerabilities in base images and packages.TUI Mode Prompt:
Copy
Scan image my-api:latest. Exclude base image vulns.Print dependency tree. Recommend a safer base image or upgrades.Re-test after the change (dry run).
Headless Mode Prompt:
Copy
cn -p "Scan image my-api:latest. Exclude base image vulns. Print dependency tree. Recommend a safer base image or upgrades. Re-test after the change (dry run)." --auto
This example demonstrates a Continuous AI workflow where security scanning runs automatically on pull requests, generates AI-powered mitigation suggestions, and posts them as PR comments.
About the βauto flag: The --auto flag enables tools to run continuously without manual confirmation. This is essential for headless mode where the agent needs to execute multiple tools automatically to complete tasks like security scanning, vulnerability analysis, and fix validation.
"Check Snyk auth status and current org. If not authenticated,help me authenticate. Then run a quick Code scan on ./with severity medium and print one example issue."
Verification Steps: - Snyk MCP is installed via Continue
Hub - Secure-at-Inception rules are
enabled - Authentication
completed successfully - Project folder has been trusted
Your security workflow now operates at Level 2 Continuous
AI -
AI handles routine security scanning and remediation with human oversight
through review and approval of fixes.