
Security Scan
- 6.6k installs
- 238k repo stars
- Updated August 5, 2026
- affaan-m/everything-claude-code
security-scan is an agent skill that runs AgentShield (ecc-agentshield) to audit Claude Code .claude/ configuration for secrets, permissions, and injection risks.
About
The security-scan skill audits Claude Code project configuration using AgentShield (ecc-agentshield) to detect security vulnerabilities, misconfigurations, and injection risks across the .claude/ directory. It inspects CLAUDE.md for hardcoded secrets and prompt-injection patterns, settings.json for overly permissive allowlists and missing deny lists, mcp.json for risky MCP servers and hardcoded environment secrets, hooks for command injection via interpolation and data exfiltration, and agents/*.md for unrestricted tool access and missing model specifications. Run npx ecc-agentshield scan with optional --path, --min-severity, --format json, markdown, or html, and --fix for safe auto-remediation of secrets and wildcard permissions. The --opus pipeline runs attacker, defender, and auditor agents for deeper analysis when ANTHROPIC_API_KEY is set. Use agentshield init to bootstrap scoped settings.json, CLAUDE.md, and mcp.json placeholders, and add affaan-m/agentshield@v1 to CI with fail-on-findings. Severity grades span A (90-100 safe) through F (0-39 critical). Invoke on new Claude Code setup, settings changes, pre-commit reviews, repository onboarding, or periodic hygiene checks.
- Scans CLAUDE.md, settings.json, mcp.json, hooks/, and agents/*.md under .claude/ for security issues.
- Runs npx ecc-agentshield scan with severity filters, JSON or HTML reports, and --fix for safe auto-remediation.
- Flags hardcoded API keys, Bash(*) wildcards, hook interpolation injection, and shell-executing MCP servers.
- Opus --opus mode runs attacker, defender, and auditor agents for adversarial deep analysis.
- Provides agentshield init secure defaults and GitHub Action affaan-m/agentshield@v1 for CI gates.
Security Scan by the numbers
- 6,558 all-time installs (skills.sh)
- +230 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #100 of 2,203 Security skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
security-scan capabilities & compatibility
- Capabilities
- scan claude.md for secrets and auto execution pr · audit settings.json allowlists, deny lists, and · inspect mcp.json servers, env secrets, and npx s · detect hook command injection and silent error s · review agents/*.md for unrestricted tool access · export json, markdown, or html reports and apply
- Works with
- github · anthropic
- Use cases
- security audit · ci cd
- Runs
- Runs locally
- Pricing
- Free
What security-scan says it does
許可リスト内の `Bash(*)`(無制限のシェルアクセス)
npx ecc-agentshield scan --fix
npx skills add https://github.com/affaan-m/everything-claude-code --skill security-scanAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 6.6k |
|---|---|
| repo stars | ★ 238k |
| Security audit | 1 / 3 scanners passed |
| Last updated | August 5, 2026 |
| Repository | affaan-m/everything-claude-code ↗ |
How do I find unsafe permissions, hardcoded secrets, and injection vectors in my Claude Code .claude/ configuration?
Audit Claude Code .claude/ configuration for secrets, permission misconfigurations, injection risks, and MCP or hook vulnerabilities with AgentShield.
Who is it for?
Teams setting up or maintaining Claude Code projects who need pre-commit and CI security hygiene on agent configuration.
Skip if: Skip when auditing application source code or cloud infrastructure; this targets .claude/ agent configuration only.
When should I use this skill?
New Claude Code setup, changes to settings.json or CLAUDE.md or MCP config, pre-commit checks, or periodic security hygiene.
What you get
Graded security report with remediation guidance and optional safe auto-fixes across Claude Code config files.
- Graded security report
- Optional auto-fixed configuration
- CI-ready JSON scan output
By the numbers
- Severity grades A 90-100 through F 0-39
- Opus pipeline runs 3 agents: attacker, defender, auditor
Files
Security Scan Skill
AgentShield を使用して、Claude Code の設定のセキュリティ問題を監査します。
起動タイミング
- 新しい Claude Code プロジェクトのセットアップ時
.claude/settings.json、CLAUDE.md、または MCP 設定の変更後- 設定変更をコミットする前
- 既存の Claude Code 設定を持つ新しいリポジトリにオンボーディングする際
- 定期的なセキュリティ衛生チェック
スキャン対象
| ファイル | チェック内容 |
|---|---|
CLAUDE.md | ハードコードされたシークレット、自動実行命令、プロンプトインジェクションパターン |
settings.json | 過度に寛容な許可リスト、欠落した拒否リスト、危険なバイパスフラグ |
mcp.json | リスクのある MCP サーバー、ハードコードされた環境シークレット、npx サプライチェーンリスク |
hooks/ | 補間によるコマンドインジェクション、データ流出、サイレントエラー抑制 |
agents/*.md | 無制限のツールアクセス、プロンプトインジェクション表面、欠落したモデル仕様 |
前提条件
AgentShield がインストールされている必要があります。確認し、必要に応じてインストールします:
# インストール済みか確認
npx ecc-agentshield --version
# グローバルにインストール(推奨)
npm install -g ecc-agentshield
# または npx 経由で直接実行(インストール不要)
npx ecc-agentshield scan .使用方法
基本スキャン
現在のプロジェクトの .claude/ ディレクトリに対して実行します:
# 現在のプロジェクトをスキャン
npx ecc-agentshield scan
# 特定のパスをスキャン
npx ecc-agentshield scan --path /path/to/.claude
# 最小深刻度フィルタでスキャン
npx ecc-agentshield scan --min-severity medium出力フォーマット
# ターミナル出力(デフォルト) — グレード付きのカラーレポート
npx ecc-agentshield scan
# JSON — CI/CD 統合用
npx ecc-agentshield scan --format json
# Markdown — ドキュメント用
npx ecc-agentshield scan --format markdown
# HTML — 自己完結型のダークテーマレポート
npx ecc-agentshield scan --format html > security-report.html自動修正
安全な修正を自動的に適用します(自動修正可能とマークされた修正のみ):
npx ecc-agentshield scan --fixこれにより以下が実行されます:
- ハードコードされたシークレットを環境変数参照に置き換え
- ワイルドカード権限をスコープ付き代替に厳格化
- 手動のみの提案は変更しない
Opus 4.6 ディープ分析
より深い分析のために敵対的な3エージェントパイプラインを実行します:
# ANTHROPIC_API_KEY が必要
export ANTHROPIC_API_KEY=your-key
npx ecc-agentshield scan --opus --streamこれにより以下が実行されます: 1. 攻撃者(レッドチーム) — 攻撃ベクトルを発見 2. 防御者(ブルーチーム) — 強化を推奨 3. 監査人(最終判定) — 両方の観点を統合
安全な設定の初期化
新しい安全な .claude/ 設定をゼロから構築します:
npx ecc-agentshield init作成されるもの:
- スコープ付き権限と拒否リストを持つ
settings.json - セキュリティベストプラクティスを含む
CLAUDE.md mcp.jsonプレースホルダー
GitHub Action
CI パイプラインに追加します:
- uses: affaan-m/agentshield@v1
with:
path: '.'
min-severity: 'medium'
fail-on-findings: true深刻度レベル
| グレード | スコア | 意味 |
|---|---|---|
| A | 90-100 | 安全な設定 |
| B | 75-89 | 軽微な問題 |
| C | 60-74 | 注意が必要 |
| D | 40-59 | 重大なリスク |
| F | 0-39 | クリティカルな脆弱性 |
結果の解釈
クリティカルな発見(即座に修正)
- 設定ファイル内のハードコードされた API キーまたはトークン
- 許可リスト内の
Bash(*)(無制限のシェルアクセス) ${file}補間によるフック内のコマンドインジェクション- シェルを実行する MCP サーバー
高い発見(本番前に修正)
- CLAUDE.md 内の自動実行命令(プロンプトインジェクションベクトル)
- 権限内の欠落した拒否リスト
- 不要な Bash アクセスを持つエージェント
中程度の発見(推奨)
- フック内のサイレントエラー抑制(
2>/dev/null、|| true) - 欠落した PreToolUse セキュリティフック
- MCP サーバー設定内の
npx -y自動インストール
情報の発見(認識)
- MCP サーバーの欠落した説明
- 正しくフラグ付けされた禁止命令(グッドプラクティス)
リンク
Related skills
Forks & variants (1)
Security Scan has 1 known copy in the catalog totaling 1.4k installs. They canonicalize to this original listing.
- affaan-m - 1.4k installs
How it compares
Pick security-scan over application SAST tools when the risk surface is Claude Code agent configuration rather than production application code.
FAQ
What files does security-scan check?
CLAUDE.md, settings.json, mcp.json, hooks/, and agents/*.md inside the .claude/ directory.
How do I run a basic AgentShield scan?
Run npx ecc-agentshield scan, or npx ecc-agentshield scan --path /path/to/.claude for a specific directory.
What does --fix change automatically?
It replaces hardcoded secrets with env references and tightens wildcard permissions; manual-only suggestions are not changed.
Is Security Scan safe to install?
skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.