Security auditor for Claude Code configurations, skills, MCP servers, and hooks.
pip install claude-code-securityOr install from source:
git clone https://github.com/yourname/claude-code-security
cd claude-code-security
pip install -e .ccs scanccs scan --path /path/to/projectccs scan --include-user# JSON output
ccs scan --json
# SARIF for GitHub Security
ccs scan --sarif > results.sarifccs scan --severity critical
ccs scan --severity highccs scan --fixccs list-rulesccs list-configs- Hardcoded secrets in environment variables
- Shell injection in commands
- Insecure HTTP URLs
- Dangerous command patterns
- Missing allowed-tools restrictions
- Dangerous tool access (Bash, Write, Edit)
- Prompt injection patterns
- Sensitive file references
- Command injection vulnerabilities
- Auto-approve patterns
- Excessive timeouts
- World-writable scripts
- bypassPermissions mode
- Wildcard allow rules
- Missing deny rules for sensitive paths
- Overly broad directory access
- Hardcoded secrets
- Prompt injection patterns
- Sensitive path references
0: No critical or high severity issues1: Critical or high severity issues found
Claude Code Security is a specialized security auditing tool that scans Claude Code configuration files for security vulnerabilities and misconfigurations. It does NOT scan your application source code (Python, JavaScript, etc.).
The tool only scans Claude Code configuration files:
.mcp.json- MCP server configurations.claude/settings.json- Permissions, hooks, and settings.claude/skills/**/SKILL.md- Custom skill definitionsCLAUDE.md/CLAUDE.local.md- Memory files.claude/hooks/*- Hook scripts (if referenced)
- ❌ Python source code (
.pyfiles) - ❌ JavaScript/TypeScript files
- ❌ Any application source code
- ❌ General project files
If you use Claude Code (the IDE/editor) and have configuration files, the tool can help secure your setup.
The tool checks for:
- Hardcoded API keys/secrets in configuration files
- Overly permissive settings (e.g.,
bypassPermissionsmode) - Security misconfigurations in permissions
- Dangerous hook scripts with injection vulnerabilities
- Missing security controls (deny rules, tool restrictions)
If you're:
- Sharing Claude Code configurations with a team
- Setting up Claude Code for multiple developers
- Deploying Claude Code configurations in production
- Wanting to catch security issues before deployment
- If you don't use Claude Code IDE, the tool won't find anything to scan
- It's specifically designed for Claude Code configurations only
- If you only use Claude via the web interface (claude.ai), there are no config files to scan
- The tool requires local configuration files
- If you want to scan your Python, JavaScript, or other application code for security issues
- This tool is NOT designed for that purpose
- Use tools like
bandit,safety,semgrep, orpylintinstead
-
Secrets in Config Files
- Hardcoded API keys in
.mcp.json - Credentials in environment variables
- Tokens in memory files
- Hardcoded API keys in
-
Dangerous Permission Settings
bypassPermissionsmode enabled- Wildcard allow rules (
Bash(*),Edit(*)) - Missing deny rules for sensitive paths
-
Security Misconfigurations
- Shell injection vulnerabilities in commands
- Insecure HTTP URLs for MCP servers
- World-writable hook scripts
- Auto-approve patterns in hooks
-
Best Practice Violations
- Skills without tool restrictions
- Missing security controls
- Overly broad directory access
Run this command in your project directory:
ccs list-configs --path /path/to/your/project- If it finds files: The tool is relevant and can help secure your Claude Code setup
- If it finds nothing: You're not using Claude Code configurations, and this tool won't help
Claude Code Security is a specialized tool for Claude Code configuration security.
- ✅ Useful if: You use Claude Code IDE and have configuration files
- ❌ Not useful if: You don't use Claude Code or only use the web interface
It's designed to prevent security issues in Claude Code configurations, not to scan your application source code.
pip install claude-code-security# Scan current directory
ccs scan
# Scan specific path
ccs scan --path /path/to/project
# List discovered configs
ccs list-configs
# Output as JSON
ccs scan --json
# Auto-fix issues
ccs scan --fix| Aspect | Details |
|---|---|
| Purpose | Security auditing for Claude Code configurations |
| Scans | Configuration files only (JSON, YAML, Markdown) |
| Does NOT Scan | Application source code (Python, JS, etc.) |
| Best For | Teams using Claude Code IDE with configs |
| Not For | General code security scanning |
For questions or support, refer to the project documentation or repository.
MIT