mcpbeat Sign in

Security Scan Skill for Claude

AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
265
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/loulanyue/awesome-claude-notes --skill security-scan

The instruction itself

3 sections, as written by the author

Security Scan Skill

AgentShield を使用して、Claude Code の設定のセキュリティ問題を監査します。

起動タイミング

  • 新しい Claude Code プロジェクトのセットアップ時
  • .claude/settings.jsonCLAUDE.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

これにより以下が実行されます:

  • 攻撃者(レッドチーム) — 攻撃ベクトルを発見
  • 防御者(ブルーチーム) — 強化を推奨
  • 監査人(最終判定) — 両方の観点を統合

安全な設定の初期化

新しい安全な .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 サーバーの欠落した説明
  • 正しくフラグ付けされた禁止命令(グッドプラクティス)

リンク

原文

  • 英語版の原文

ナビゲーション

  • 日本語ドキュメント一覧
  • skills/README.md
  • 貢献ガイド

Other skills for the same job

different authors, same section of the catalogue
Fhir Developer Skill
by anthropics
vendor ×1

> FHIR REST endpoints (Patient, Observation, Encounter, Condition, MedicationRequest), (2) Validating FHIR resources and returning proper HTTP status codes and error responses, (3) Implementing SMART on FHIR authorization and OAuth scopes, (4) Working with Bundles, transactions, batch operations, or search pagination. Covers FHIR R4 resource structures, required fields, value sets (status codes, gender, intent), coding systems (LOINC, SNOMED, RxNorm, ICD-10), and OperationOutcome error handling.

9k tokens scripts
Clawdirect
by ComeOnOliver
×1

Interact with ClawDirect, a directory of social web experiences for AI agents. Use this skill to browse the directory, like entries, or add new sites. Requires ATXP authentication for MCP tool calls. Triggers: browsing agent-oriented websites, discovering social platforms for agents, liking/voting on directory entries, or submitting new agent-facing sites to ClawDirect.

4k tokens
Audit Integrity
by github
vendor

Shared audit integrity framework for all AppSec agents — enforces output quality, intellectual honesty, and continuous improvement through anti-rationalization guards, self-critique loops, retry protocols, non-negotiable behaviors, self-reflection quality gates (1-10 scoring, ≥8 threshold), and a self-learning system with lesson/memory governance for security analysis agents.

4k tokens
Use Native Credential Proxy
by nanocoai

Opt out of the OneCLI gateway and supply Anthropic credentials from .env instead. For users who want simple .env-based credential management without the OneCLI agent vault. Reads the API key or OAuth token from .env and injects it into the container's API requests.

5k tokens scripts
Zoom General
by anthropics
vendor

Cross-product Zoom reference skill. Use after the workflow is clear when you need shared platform guidance, app-model comparisons, authentication context, scopes, marketplace considerations, or API-vs-MCP routing.

122k tokens
Vuln Scan
by anthropics
vendor

>- Static source-code vulnerability scan. Reads a target directory (and THREAT_MODEL.md if present), spawns parallel review subagents per focus area, and writes VULN-FINDINGS.json + .md for /triage to consume. Read-only — no building, running, or network. For execution-verified crashes, use vuln-pipeline instead. Use when asked to "scan for vulns", "review this code for security issues", "find bugs in <dir>", or as the step between /threat-model and /triage.

3k tokens
Hunt Session
by elementalsouls

Hunt Session Management vulnerabilities — session fixation (no regeneration on login), insufficient invalidation on logout / password-change / email-change, predictable or low-entropy session IDs, JWT-as-session with no exp/revocation, refresh-token rotation/reuse-detection gaps, OAuth/SSO session linkage, device-bound-session (DBSC) downgrade, and cookie attribute issues (Secure/HttpOnly/SameSite/__Host-). Validate with TWO real sessions (attacker A + victim B), body-diff every 200, and OOB confirmation for theft chains. Medium to Critical (fixation→admin hijack, no-invalidation→persistent ATO).

5k tokens
Doca Aes Gcm
by NVIDIA
vendor

> Use this skill when the user is doing hands-on DOCA AES-GCM work on a BlueField DPU or ConnectX NIC — configuring `doca_aes_gcm_task_encrypt` / `_task_decrypt`, querying `doca_aes_gcm_cap_*` for per-key-type (only `DOCA_AES_GCM_KEY_128` / `_256` — AES-192 not supported) and per-task support, sizing plaintext against the max-buf cap, setting source / destination mmap permissions, validating with a NIST GCMVS or RFC 5288 vector, or debugging DOCA_ERROR_* including the security-critical tag-verification-failed outcome on decrypt. Trigger even when the user does not explicitly mention "DOCA AES-GCM" or IO_FAILED", "auth tag isn't verifying", "NOT_PERMITTED on my encrypt buffer", "is AES-192-GCM on this BlueField" (no), or "encrypted record came back tampered". Refuse and route elsewhere for non-GCM AES modes (CBC / CTR / XTS — CPU OpenSSL), key management (KMS / HSM / rotation), SHA (doca-sha), or general AEAD background.

24k tokens

How to use it

Copy the folder

Take loulanyue/security-scan from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference npm, npx. Without those the skill loads but fails at the first command.