affaan-m/ECC

security-scan

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

71CollectingClaude CodeRuns scripts
See how to use itView GitHub source
npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/security-scan"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn security-scan's source instructions into a guide you can follow

According to the pinned SKILL.md from affaan-m/ECC: AgentShield を使用して、Claude Code の設定のセキュリティ問題を監査します。

npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/security-scan"
Check the pinned source

Best fit

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

Bring this context

  • A concrete task that matches the documented purpose of security-scan.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • A result that follows the pinned security-scan instructions.
  • A concise record of assumptions, inputs used, and unresolved questions.
  • A final check against the source workflow and relevant permission signals.

Key source sections

Read security-scan through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

起動タイミング

新しい Claude Code プロジェクトのセットアップ時

SKILL.md · 起動タイミング
新しい Claude Code プロジェクトのセットアップ時.claude/settings.json、CLAUDE.md、または MCP 設定の変更後設定変更をコミットする前
02

スキャン対象

Review the “スキャン対象” section in the pinned source before continuing.

SKILL.md · スキャン対象
Review and apply the “スキャン対象” source section.
03

前提条件

AgentShield がインストールされている必要があります。確認し、必要に応じてインストールします:

SKILL.md · 前提条件
AgentShield がインストールされている必要があります。確認し、必要に応じてインストールします:
04

インストール済みか確認

Review the “インストール済みか確認” section in the pinned source before continuing.

SKILL.md · インストール済みか確認
Review and apply the “インストール済みか確認” source section.
05

グローバルにインストール(推奨)

Review the “グローバルにインストール(推奨)” section in the pinned source before continuing.

SKILL.md · グローバルにインストール(推奨)
Review and apply the “グローバルにインストール(推奨)” source section.

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use security-scan to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned security-scan source to [task]. Pay particular attention to these source sections: “起動タイミング”, “スキャン対象”, “前提条件”, “インストール済みか確認”, “グローバルにインストール(推奨)”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current security-scan result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “起動タイミング” has been checked.

The source section “スキャン対象” has been checked.

The source section “前提条件” has been checked.

The source section “インストール済みか確認” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

FAQ

What does security-scan do?

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

How do I start using security-scan?

The catalog detected this source-specific install command: npx skills add https://github.com/affaan-m/ECC --skill "docs/ja-JP/skills/security-scan". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

claude code

Repository stars
234,327
Repository forks
35,711
Quality
71/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

71/100
Documentation21/30
Specificity14/25
Maintenance18/20
Trust signals18/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 1 min

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

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

  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

深刻度レベル

グレードスコア意味
A90-100安全な設定
B75-89軽微な問題
C60-74注意が必要
D40-59重大なリスク
F0-39クリティカルな脆弱性

結果の解釈

クリティカルな発見(即座に修正)

  • 設定ファイル内のハードコードされた API キーまたはトークン
  • 許可リスト内の Bash(*)(無制限のシェルアクセス)
  • ${file} 補間によるフック内のコマンドインジェクション
  • シェルを実行する MCP サーバー

高い発見(本番前に修正)

  • CLAUDE.md 内の自動実行命令(プロンプトインジェクションベクトル)
  • 権限内の欠落した拒否リスト
  • 不要な Bash アクセスを持つエージェント

中程度の発見(推奨)

  • フック内のサイレントエラー抑制(2>/dev/null|| true
  • 欠落した PreToolUse セキュリティフック
  • MCP サーバー設定内の npx -y 自動インストール

情報の発見(認識)

  • MCP サーバーの欠落した説明
  • 正しくフラグ付けされた禁止命令(グッドプラクティス)

リンク

Source repo
affaan-m/ECC
Skill path
docs/ja-JP/skills/security-scan/SKILL.md
Commit SHA
4e973d3eaf92
Repository license
MIT
Data collected