sans25
This skill should be used when the user asks to "check CWE Top 25", "run SANS analysis", "check for common weaknesses", or mentions "CWE" or "SANS Top 25" in…
от florianbuetow★ 22 звезды на GitHub
Установить sans25 в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
SANS/CWE Top 25 Dispatcher
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.
Supported Flags
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. |
Framework Reference
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.
Workflow
Step 1: Resolve Scope
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.
Step 2: Detect Languages and Technology Stack
Scan the scoped files to identify:
- Languages: file extensions (
.c,.cpp,.py,.js,.ts,.java,.go,.rb,.php,.rs, etc.) - Frameworks: imports and config files (Express, Django, Flask, Spring, Rails, ASP.NET, etc.)
- Data layer: database libraries, ORM usage, raw query patterns
- Infrastructure: Dockerfiles, deployment manifests, CI/CD config
This determines which CWEs are applicable. Record a language_profile
summarizing what was detected.
Step 3: Determine Applicable CWEs
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.
Step 4: Analyze Each Applicable CWE
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:
- Is user input actually reaching this code path?
- Are there existing mitigations (parameterized queries, input validation, encoding)?
- Is the pattern in test code, comments, or dead code?
Severity assessment: Assign severity based on the CWE's documented severity rating, adjusted for context:
- Upgrade if the code is in a critical path (auth, payment, PII handling).
- Downgrade if existing mitigations partially address the weakness.
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 C
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sans25?
This skill should be used when the user asks to "check CWE Top 25", "run SANS analysis", "check for common weaknesses", or mentions "CWE" or "SANS Top 25" in a security context. Checks code against the SANS/CWE Top 25 Most Dangerous Software Weaknesses.
Как установить скилл sans25?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sans25 запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…