Files
affaan-m--everything-claude…/docs/ja-JP/commands/security-scan.md
T
wehub-resource-sync d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:55 +08:00

93 lines
3.4 KiB
Markdown

---
description: エージェント、フック、MCP、パーミッション、シークレットのサーフェスに対してAgentShieldを実行します。
agent: everything-claude-code:security-reviewer
subtask: true
---
# セキュリティスキャンコマンド
現在のプロジェクトまたはターゲットパスに対してAgentShieldを実行し、所見を優先順位付きの修正計画に変換します。
## 使い方
`/security-scan [path] [--format text|json|markdown|html] [--min-severity low|medium|high|critical] [--fix]`
- `path`(オプション): デフォルトは現在のプロジェクト。`.claude/`パス、リポジトリルート、またはチェックインされたテンプレートディレクトリを使用。
- `--format`: 出力形式。CIには`json`、引き継ぎには`markdown`、スタンドアロンレビューレポートには`html`
- `--min-severity`: 低優先度の所見をフィルタ。
- `--fix`: 安全かつ自動修正可能と明示的にマークされたAgentShieldの修正のみを適用。
## 決定論的エンジン
パッケージ化されたスキャナーを優先:
```bash
npx ecc-agentshield scan --path "${TARGET_PATH:-.}" --format text
```
ローカルAgentShield開発の場合、AgentShieldチェックアウトから実行:
```bash
npm run scan -- --path "${TARGET_PATH:-.}" --format text
```
所見を作り出さないこと。AgentShieldの出力を信頼できるソースとして使用し、スキャナーの事実とフォローアップの判断を分離。
## レビューチェックリスト
1. まずアクティブなランタイムの所見を特定:
- ハードコードされたシークレット
- 広範なパーミッション
- 実行可能なフック
- シェル、ファイルシステム、リモートトランスポート、またはピン留めされていない`npx`を持つMCPサーバー
- 防御なしで信頼できないコンテンツを処理するエージェントプロンプト
2. 低信頼度のインベントリを分離:
- ドキュメントの例
- テンプレートの例
- プラグインマニフェスト
- プロジェクトローカルのオプション設定
3. criticalまたはhighの各所見について返却:
- ファイルパス
- 重大度
- ランタイム信頼度
- 重要な理由
- 正確な修正方法
- 自動修正が安全かどうか
4. `--fix`が要求された場合、修正を適用する前に計画された編集を述べる。
5. 修正後にスキャンを再実行し、前後のスコアを報告。
## 出力契約
返却内容:
1. セキュリティグレードとスコア。
2. 重大度とランタイム信頼度別の件数。
3. 正確なパス付きのcritical/highの所見。
4. 低信頼度の所見は別グループ。
5. 修正順序。
6. 実行されたコマンドとスキャンがローカル、CI、npxバックのいずれか。
## CIパターン
強制ゲートのためにGitHub ActionsでAgentShieldを使用:
```yaml
- uses: affaan-m/agentshield@v1
with:
path: "."
min-severity: "medium"
fail-on-findings: true
```
## リンク
- スキル: `skills/security-scan/SKILL.md`
- エージェント: `agents/security-reviewer.md`
- スキャナー: <https://github.com/affaan-m/agentshield>
## 引数
$ARGUMENTS:
- オプションのターゲットパス
- オプションのAgentShieldフラグ