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
Prerequisites
Before starting, ensure you have:- Continue account with Hub access
- Read: Understanding Agents — How to get started with Hub agents
- Node.js 18+ installed locally
- Snyk account (free tier works)
- A local project to scan for vulnerabilities
1
Install Continue CLI
2
Add Your Project to Snyk
- Sign up for a Snyk account at snyk.io
- Create a new project in Snyk by importing your code repository (Git provider or manual upload)
To use agents in headless mode, you need a Continue API key.
Snyk Continuous AI Workflow Options
🚀 Fastest Path to Success
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.
1
Load the Pre-Built Agent
Navigate to your project directory and run:This agent includes:
- Snyk MCP pre-configured and ready to use
- Security-focused rules for best practices
2
Run Your First Security Scan
Start with a comprehensive security scan: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.
Agent Requirements
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 Hub secrets (same as manual setup)
Security Scanning Recipes
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 Hub, 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"
for headless commands
"Run a Snyk Code scan and fix the top 3 issues"
Code Vulnerability Scanning (SAST)
Static Application Security Testing
Scan your source code for security vulnerabilities and code quality issues.TUI Mode Prompt:Headless Mode Prompt:
Dependency Scanning (SCA)
Software Composition Analysis
Check open source dependencies for known vulnerabilities.TUI Mode Prompt:Headless Mode Prompt:
Infrastructure as Code (IaC)
IaC Security
Scan Terraform, CloudFormation, and Kubernetes configs for misconfigurations.TUI Mode Prompt:Headless Mode Prompt:
Container Scanning
Container Security
Analyze Docker images for vulnerabilities in base images and packages.TUI Mode Prompt:Headless Mode Prompt:
Pull Request Scanning
Changed Files Only
Focus scanning on modified files to catch issues before merging.TUI Mode Prompt:Headless Mode Prompt:
Security Learning
Snyk Learn Integration
Access security education resources based on identified vulnerabilities (CWE).TUI Mode Prompt:Headless Mode Prompt:
Continuous Security with GitHub Actions
This example demonstrates a Continuous AI workflow where security scanning runs automatically in your CI/CD pipeline Headless Mode Prompt in headless mode (cn -p
) with Snyk MCP.
Add GitHub Secrets
Navigate to Repository Settings → Secrets and variables → Actions and add:CONTINUE_API_KEY
: Your Continue API key from hub.continue.dev/settings/api-keys
Create Workflow File
Create.github/workflows/snyk-security.yml
in your repository:
The Snyk MCP authentication is handled through Continue Hub. No need to manage
Snyk tokens directly in CI - the agent manages authentication.
Security Guardrails
Implement automated security policies using Continue’s rule system. See the Rules deep dive for authoring tips.Coming Soon: These security guardrail prompts will be available as pre-configured rules on the Continue Hub for easy installation.
Pre-commit Scanning
Dependency Safety
Container Hardening
IaC Compliance
Enable the Secure-at-Inception rules from the Hub to automatically apply
these guardrails to all code generation and modifications.
Troubleshooting
Authentication Issues
Fix Validation
Connection Problems
Verification Steps: - Snyk MCP is installed via Continue
Hub - Secure-at-Inception rules are
enabled - Authentication
completed successfully - Project folder has been trusted
What You’ve Built
After completing this guide, you have a complete AI-powered security system that: ✅ Uses natural language — Simple prompts instead of complex CLI commands ✅ Fixes automatically — AI suggests and validates security fixes ✅ Runs continuously — Automated scanning in CI/CD pipelines ✅ Enforces guardrails — Security rules prevent vulnerable code from shippingContinuous AI
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.
Next Steps
- Run your first scan - Try the SAST prompt on your current project
- Review findings - Analyze the security report and implement fixes
- Set up CI pipeline - Add the GitHub Actions workflow to your repo
- Customize rules - Add project-specific security policies
- Monitor trends - Track vulnerability reduction over time