security-scan

Scan Claude Code configuration files for security vulnerabilities and misconfigurations.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/beratcelik1/compound-claude --skill security-scan-beratcelik1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-scan
Source: https://github.com/beratcelik1/compound-claude/tree/main/skills/security-scan
Command: npx skills add https://github.com/beratcelik1/compound-claude --skill security-scan-beratcelik1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect security vulnerabilities, misconfigurations, and prompt-injection risks in Claude Code repository configuration so teams can prevent credential leaks, dangerous MCP/server settings, and hook-based command injection before they reach production.

Core Features & Use Cases

  • Configuration-wide scanning: Inspects CLAUDE.md, .claude/settings.json, mcp.json, hooks/, and agent definitions for secrets, permissive allow-lists, and injection patterns.
  • Multiple output formats & CI integration: Produces terminal, JSON, Markdown, or HTML reports and can fail CI on high-severity findings.
  • Safe auto-fix and adversarial analysis: Applies auto-fixes for safe, clearly-marked changes and can run an Opus three-agent attacker/defender/auditor pipeline for deeper review.
  • Use Case: Run this Skill in pre-commit or CI to block commits that introduce hardcoded secrets, unrestricted shell access, or hook-based command injection.

Quick Start

Run AgentShield to scan the repository's .claude configuration and output a JSON report.

Frequently Asked Questions about security-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan Claude Code configurations for security vulnerabilities and prompt-injection risks?

Yes, you can integrate this configuration scanner into pre-commit hooks or CI pipelines to block commits that introduce hardcoded secrets, unrestricted shell access, or hook-based command injection. It fails CI automatically when high-severity findings are detected.

Can I automatically fix security misconfigurations in Claude Code settings and hooks?

When you provide an ANTHROPIC_API_KEY, the scanner supports an Opus three-agent adversarial analysis pipeline using attacker, defender, and auditor roles. This provides a deeper security review of your Claude Code configurations beyond standard static scanning.

What types of security risks can be detected in MCP server configurations and agent definitions?

The scanner detects credential leaks, dangerous MCP server settings, permissive allow-lists, and prompt-injection patterns in agent definitions. It inspects mcp.json and hook artifacts to prevent hook-based command injection before deployment.

Does the Claude Code security scanner work without external dependencies or API keys?

The scanner works without external dependencies to perform standard configuration scanning and generate reports. An ANTHROPIC_API_KEY is only required optionally to enable the Opus three-agent adversarial analysis pipeline for deeper security review.