afc-security
Security scan — vulnerability check and threat assessment
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Security scan — vulnerability check and threat assessment
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Code and component analysis — analyze code, trace flows, audit consistency, inspect components
Architecture analysis and design review
Full auto pipeline — run spec-to-clean cycle automatically for new features
Save session state for later resumption
Resolve spec ambiguities with clarifying questions
Pipeline artifact cleanup and codebase hygiene
| name | afc:security |
| description | Security scan — vulnerability check and threat assessment |
| argument-hint | [scan scope: file/directory path or full] |
| context | fork |
| agent | afc-security |
| allowed-tools | ["Read","Grep","Glob","Bash","Task","WebSearch"] |
| model | sonnet |
Detects and reports security vulnerabilities in the codebase. Inspects against OWASP Top 10. Read-only — does not modify code.
$ARGUMENTS — (optional) scan scope (file/directory path, or "full" for full scan)
Architecture, Code Style, and Project Context are auto-loaded via .claude/rules/afc-project.md.
Read .claude/afc.config.md if CI commands are needed.
If neither rules file nor config exists: read CLAUDE.md for framework info. Assume "unknown" if no source has it.
For dependency audit command: infer from packageManager field in package.json or the lockfile (e.g., npm audit, yarn audit, pnpm audit).
$ARGUMENTS = path → that path only$ARGUMENTS = "full" → entire codebasegit diff --name-only HEAD 2>/dev/null || echo "[GIT_DIFF_FAILED]"Use Agent Teams when the scan scope is complex enough that a single-pass review would miss cross-file vulnerability patterns. Assess holistically:
Use Agent Teams when any of the following apply:
Use direct scan (orchestrator only) when:
Pre-scan: Data Flow Context (before distributing to agents, when using Agent Teams):
## Data Flow Context
Input flows relevant to your scan scope:
- User input enters via `req.body` in api/routes.ts → sanitized by `validateInput()` in shared/validation.ts → consumed in features/user.ts
- URL params enter via `req.params` in api/routes.ts → NO sanitization found → used in features/search.ts
Account for these flows when assessing injection/XSS severity.
Task("Security scan: src/features/", subagent_type: general-purpose,
prompt: "... {include Data Flow Context} ...")
Task("Security scan: src/shared/api/", subagent_type: general-purpose,
prompt: "... {include Data Flow Context} ...")
For direct scans (orchestrator only): skip pre-scan — orchestrator has full context.
Read ${CLAUDE_SKILL_DIR}/cross-boundary-verification.md and apply it after parallel agent results are collected.
dangerouslySetInnerHTMLeval(), new Function().env values exposed to the client (check framework-specific public env variables from Project Context)## Security Scan Results
### Summary
| Severity | Count |
|----------|-------|
| Critical | {N} |
| High | {N} |
| Medium | {N} |
| Low | {N} |
### Findings
#### SEC-{NNN}: {title}
- **Category**: {OWASP code}
- **File**: {path}:{line}
- **Description**: {vulnerability details}
- **Impact**: {impact if exploited}
- **Mitigation**: {how to fix}
### Dependency Audit
{dependency audit command result summary — if executable}
### Recommended Actions
{prioritized fix suggestions}
Security scan complete
├─ Scope: {file count} files
├─ Found: Critical {N} / High {N} / Medium {N} / Low {N}
└─ Recommended: {most urgent action}