/appsec:sans25from appsec
Checks code against the SANS/CWE Top 25 Most Dangerous Software Weaknesses (2024). Automatically detects languages and frameworks, filters applicable CWEs, and cross-references with OWASP and STRIDE.
Ships in appsec. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Analyze scoped code directly against the SANS/CWE Top 25 Most Dangerous Software Weaknesses (2024). Unlike the OWASP and STRIDE dispatchers, this skill does NOT dispatch individual subagents per category. Instead it reads the full framework reference, determines which CWEs are relevant to the scoped code based on languages and patterns, checks each applicable CWE directly, groups findings by CWE category, and cross-references with OWASP and STRIDE mappings.
Read ../../shared/schemas/flags.md for the
full flag specification. This dispatcher supports all cross-cutting flags.
| Flag | Dispatcher-Specific Behavior |
|---|---|
--scope | Determines which files to analyze. Default changed. |
--depth | Controls analysis thoroughness. Default standard. |
--severity | Applied after analysis to filter output. |
--format | Applied to final output. |
--only CWE-89,CWE-79 | Check only the listed CWEs. Accepts comma-separated CWE identifiers (e.g., CWE-89, CWE-787, CWE-22). Unlisted CWEs are skipped entirely. |
--fix | Produce fix suggestions inline for each finding. |
--quiet | Findings only, suppress explanations. |
--explain | Add learning material per finding. |
Read ../../shared/frameworks/sans-cwe-top25.md
for the full SANS/CWE Top 25 specification including weakness descriptions,
code-level indicators, severity ratings, and cross-framework mapping tables.
Parse the --scope flag and resolve to a concrete file list. Use Git
commands or Glob as appropriate for the scope type. Record the resolved
file list for use in subsequent steps.
Scan the scoped files to identify:
.c, .cpp, .py, .js, .ts, .java, .go, .rb, .php, .rs, etc.)This determines which CWEs are applicable. Record a language_profile
summarizing what was detected.
Using the language_profile, filter the 25 CWEs to those relevant for this
codebase. Each CWE category has language-specific applicability:
| Category | CWEs | Applicable When |
|---|---|---|
| Memory Safety | CWE-787, CWE-125, CWE-416, CWE-476, CWE-190, CWE-119 | C, C++, Rust (unsafe blocks), or any code with FFI/native bindings |
| Injection | CWE-79, CWE-89, CWE-78, CWE-94, CWE-77 | Any language with user input handling, database queries, shell execution, or template rendering |
| Auth/AuthZ | CWE-862, CWE-863, CWE-306, CWE-287 | Any code with authentication, authorization, session management, or API endpoints |
| Data Handling | CWE-20, CWE-22, CWE-502, CWE-200, CWE-918, CWE-352, CWE-434, CWE-400 | Any code handling user input, files, URLs, serialization, or resource allocation |
| Configuration | CWE-798, CWE-269 | Any code with credentials, privilege management, or deployment config |
If --only is specified, skip the relevance check and analyze only the
listed CWEs.
Memory safety skip rule: If no C, C++, Rust, or native binding code is present, skip the entire Memory Safety category and record the skip reason. Do NOT report memory safety CWEs for pure Python, JavaScript, Java, Go, or Ruby codebases.
For each applicable CWE, read its section in sans-cwe-top25.md and check
the scoped code against the documented code-level indicators.
For each CWE, perform the following:
Pattern scan: Use Grep to search for the code-level indicators
listed in the framework reference. For example, for CWE-89 (SQL
Injection), search for string concatenation in SQL queries, f"SELECT,
raw query methods, and dynamic table/column names.
Context analysis: Read the surrounding code for each pattern match. Determine whether the match is a true positive or a false positive. Consider:
Severity assessment: Assign severity based on the CWE's documented severity rating, adjusted for context:
Create finding: For each confirmed weakness, create a finding
object following the schema in shared/schemas/findings.md. Set:
id: CWE<NNN>-<SEQ> (e.g., CWE89-001, CWE787-002)references.cwe: The CWE identifierreferences.sans_cwe25: The rank (1-25)metadata.framework: "sans25"metadata.category: The CWE category group (e.g., "injection", "memory-safety", "auth", "data-handling", "config")If --depth deep or --depth expert, additionally:
Organize confirmed findings into the five CWE category groups:
| Group | ID | CWEs Covered |
|---|---|---|
| Memory Safety | memory-safety | CWE-787, CWE-125, CWE-416, CWE-476, CWE-190, CWE-119 |
| Injection | injection | CWE-79, CWE-89, CWE-78, CWE-94, CWE-77 |
| Auth/AuthZ | auth | CWE-862, CWE-863, CWE-306, CWE-287 |
| Data Handling | data-handling | CWE-20, CWE-22, CWE-502, CWE-200, CWE-918, CWE-352, CWE-434, CWE-400 |
| Configuration | config | CWE-798, CWE-269 |
Within each group, sort findings by CWE rank (lower rank = more dangerous).
For each finding, populate cross-framework references using the mapping
table in sans-cwe-top25.md:
references.owasp: Map to the OWASP Top 10 category (e.g., CWE-89 maps to A03:2021).references.stride: Map to STRIDE category letters (e.g., CWE-89 maps to T, I, E).references.mitre_attck: Map to ATT&CK technique IDs (e.g., CWE-89 maps to T1190, T1059).Use the "Cross-Framework Mapping Table" section in the framework reference as the authoritative source for these mappings.
Two findings are duplicates if they share the same location.file AND
location.line (or overlapping line ranges) AND refer to the same or
parent/child CWE. When duplicates exist:
Sort all findings: critical > high > medium > low. Within the same severity, sort by CWE rank (lower rank first), then by confidence (high > medium > low).
Apply the --severity filter to exclude findings below the threshold.
Wrap findings in the aggregate output format from shared/schemas/findings.md:
{
"tool": "sans25",
"scope": "{SCOPE}",
"depth": "{DEPTH}",
"language_profile": ["python", "javascript"],
"categories_checked": ["injection", "auth", "data-handling", "config"],
"categories_skipped": ["memory-safety"],
"skip_reason": "No C/C++/Rust or native bindings detected",
"total_findings": 7,
"by_severity": { "critical": 2, "high": 3, "medium": 1, "low": 1 },
"by_cwe_group": {
"injection": 3,
"auth": 2,
"data-handling": 1,
"config": 1
},
"findings": [ ... ]
}
Output the report in the requested --format. Include:
If --depth expert is set, after the main analysis:
Read ../../shared/frameworks/dread.md
for DREAD scoring criteria. Assign a DREAD score to each finding.
Identify CWE chains -- combinations of weaknesses that amplify each other. For example:
For each chain, describe the combined attack scenario and assign an aggregate severity reflecting the chained impact.
Append chain findings with prefix CHAIN and metadata.tool set to
"cwe-chain".
What SKILL.md sets; muted values are Claude Code's defaults
62 skills in this plugin
/access-controlThis skill should be used when the user asks to "check for access control issues", "analyze authorization", "find IDOR vulnerabilities", "audit CORS configuration", "check for privilege escalation", or mentions "access control", "authorization", "IDOR", "CORS", "JWT tampering", or "directory traversal" in a security context. Maps to OWASP Top 10 2021 A01: Broken Access Control.
/apiThis skill should be used when the user asks to "check API security", "audit REST API", "find BOLA vulnerabilities", "check for mass assignment", "analyze API rate limiting", "detect excessive data exposure", or mentions "API security", "BOLA", "IDOR", "mass assignment", "rate limiting", "broken function-level authorization", "excessive data exposure", or "OWASP API Top 10" in a security context.
/attack-surfaceThis skill should be used when the user asks to "map attack surface", "list entry points", "inventory API endpoints", "find all inputs", "enumerate routes", "discover exposed endpoints", or "map external interfaces". Also triggers when the user asks about exposed APIs, form handlers, file upload endpoints, WebSocket handlers, CLI argument parsers, or wants to understand where external data enters the system.
/authThis skill should be used when the user asks to "check for authentication issues", "analyze auth", "find credential vulnerabilities", "review login security", "check session management", or mentions "authentication", "passwords", "MFA", "sessions", or "brute force" in a security context. Maps to OWASP Top 10 2021 A07: Identification and Authentication Failures.
/business-logicThis skill should be used when the user asks to "check business logic security", "find logic flaws", "audit workflow security", "check for coupon abuse", "detect negative amount exploits", "analyze state machine security", or mentions "business logic", "workflow bypass", "negative amount", "coupon abuse", "self-referral", "state manipulation", or "time-based exploit" in a security context.
/configThis skill should be used when the user asks to "configure security", "appsec settings", "security preferences", or invokes /appsec:config. Manages security tool preferences and thresholds.
npx claudepluginhub florianbuetow/claude-code --plugin appsecOther plugins' skills for the same job