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
Connect Snyk MCP via Continue Hub
Visit the Snyk MCP on Continue Hub and click Install to add it to your Continue account.This will add Snyk MCP to your agent’s available tools. The Hub listing automatically configures the MCP command:
Alternative installation methods:
- Quick CLI install:
cn -p --mcp snyk/snyk-mcp
- Manual configuration: Add the MCP to your
~/.continue/config.json
under themcpServers
section
The MCP will request authentication and folder trust permissions when first used.
This is handled automatically by the Continue agent.
2
Add Secure-at-Inception Rules
Install the Snyk Secure-at-Inception rules from the Hub 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
- 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
3
Authenticate with Snyk
Use this prompt with your Continue agent to set up authentication:Or use the Continue CLI:
A browser window will open for Snyk login. After authenticating, approve
the request to trust your project folder when prompted.
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.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 one-off 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.Example prompt:Using Continue CLI:
Dependency Scanning (SCA)
Software Composition Analysis
Check open source dependencies for known vulnerabilities.Example prompt:Using Continue CLI:
Infrastructure as Code (IaC)
IaC Security
Scan Terraform, CloudFormation, and Kubernetes configs for misconfigurations.Example prompt:Using Continue CLI:
Container Scanning
Container Security
Analyze Docker images for vulnerabilities in base images and packages.Example prompt:Using Continue CLI:
Pull Request Scanning
Changed Files Only
Focus scanning on modified files to catch issues before merging.Example prompt:Using Continue CLI:
Security Learning
Snyk Learn Integration
Access security education resources based on identified vulnerabilities (CWE).Example prompt:Using Continue CLI:
Continuous Security with GitHub Actions
This example demonstrates a Continuous AI workflow where security scanning runs automatically in your CI/CD pipeline using Continue CLI 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