Bring GitHub's security scanning directly into Claude Code. Scan for vulnerabilities, exposed secrets, and code security issues without leaving your IDE.
- 🔍 Dependency Scanning: Check for vulnerable dependencies using GitHub Dependabot
- 🔒 Secret Detection: Find exposed API keys, tokens, and credentials
- 🛡️ Code Analysis: Review code security findings
- 🤖 AI-Powered: Get plain-English explanations of vulnerabilities and fix suggestions
- ⚡ Fast: Results in seconds without leaving Claude Code
Required: GitHub MCP Server must be configured in Claude Code.
-
Install the GitHub MCP Server:
npm install -g @modelcontextprotocol/server-github
-
Configure it in your Claude Code settings (
~/.claude/settings.json):{ "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "your-github-token" } } } } -
Create a GitHub Personal Access Token with these scopes:
repo(full repository access)security_events(read security events)
For complete setup instructions, see: https://github.com/github/github-mcp-server
If you're installing from a configured marketplace:
/plugin install github-security-scanner@marketplace-name-
Clone this repository:
git clone https://github.com/harishgarg/security-scanner-plugin.git cd security-scanner-plugin -
Create a local marketplace (for testing):
mkdir ../dev-marketplace cd ../dev-marketplace mkdir .claude-plugin cat > .claude-plugin/marketplace.json << 'EOF' { "name": "dev-marketplace", "owner": { "name": "Developer" }, "plugins": [ { "name": "github-security-scanner", "source": "../security-scanner-plugin", "description": "Security scanner plugin for Claude Code" } ] } EOF
-
In Claude Code:
/plugin marketplace add ./dev-marketplace /plugin install github-security-scanner@dev-marketplace
-
Restart Claude Code to activate the plugin
Check for vulnerable dependencies in your current repository:
/check-depsExample output:
Found 3 vulnerable dependencies:
- Critical: [email protected] (CVE-2021-23337)
- High: [email protected] (CVE-2021-3749)
- Medium: [email protected] (CVE-2022-24785)
Run /security-scan for a complete audit.
Detect exposed API keys, tokens, and credentials:
/check-secretsWhat it finds:
- AWS Access Keys
- GitHub Personal Access Tokens
- API keys and credentials
- Private keys and certificates
Run a full security audit with Dependabot, code scanning, and secret detection:
/security-scanProvides:
- Total vulnerability count
- Breakdown by severity (Critical, High, Medium, Low)
- Top 5 most critical issues with CVE details
- Actionable recommendations
- Prioritized next steps
Get plain-English explanations of specific CVEs:
/explain-cve CVE-2021-23337Or just run it and provide the CVE when prompted.
Example interaction:
User: /explain-cve CVE-2021-23337
Claude: This vulnerability in lodash allows command injection through
template strings. If your app uses lodash templates with user input,
attackers could execute arbitrary code.
Impact: High - Remote Code Execution
Affected: lodash < 4.17.21
Fix: Upgrade to [email protected] or later
| Command | Description | Use Case |
|---|---|---|
/security-scan |
Full security audit | Regular security reviews |
/check-deps |
Quick dependency check | Before deployments |
/check-secrets |
Secret scanning | Pre-commit checks |
/explain-cve |
Explain vulnerabilities | Understanding security issues |
The plugin includes a specialized security analyst agent that Claude can invoke automatically when analyzing security issues.
Agent capabilities:
- Vulnerability analysis and risk assessment
- Dependency management advice
- Security best practices
- CVE explanation in developer-friendly language
- Prioritizing fixes based on real-world risk
Claude will automatically use this agent when:
- Analyzing security scan results
- Investigating vulnerabilities
- Planning security remediation
- Reviewing dependency updates
- Run regular scans: Use
/security-scanweekly or before major releases - Check before commits: Run
/check-secretsto catch exposed credentials - Understand vulnerabilities: Use
/explain-cveto learn about security issues - Prioritize fixes: Focus on Critical and High severity issues first
- Keep dependencies updated: Address Dependabot alerts promptly
Make sure the GitHub MCP Server is properly configured in your settings and your GitHub token has the required scopes.
Ensure you're running commands from within a Git repository that exists on GitHub and your token has access to it.
After installation, restart Claude Code. Check /help to verify the plugin commands are loaded.
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT License - see LICENSE.md for details
For issues or questions:
- Open an issue on GitHub: https://github.com/harishgarg/security-scanner-plugin/issues
- Check Claude Code documentation: https://docs.claude.com
My name is Harish Garg. I am a solo developer. I write at my blog here.
I also maintain a MCP Resources Directory & a coding ai tools directory