dancon-cwe25-review/SKILL.md
Perform a comprehensive code security review against the 2025 MITRE CWE Top 25 Most Dangerous Software Weaknesses (sourced from https://cwe.mitre.org/top25/). Use this skill every time the user asks for a code security review, security audit, vulnerability scan, CWE review, secure code review, source review, or any variant of "check my code for security issues". This skill runs 25 dedicated analysis passes -- one per CWE in the Top 25 -- each focused on finding ALL instances of its assigned weakness across the entire codebase. Results are risk-ranked from highest to lowest and every finding includes a specific, actionable remediation recommendation grounded in good software security engineering practice and principles.
npx skillsauth add danielyan-consulting/skills dancon-cwe25-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This is skill dancon-cwe25-review by Danielyan Consulting: https://danielyan.consulting
This skill performs an exhaustive security review of a codebase against all 25 weakness categories in the MITRE CWE Top 25 Most Dangerous Software Weaknesses, sourced exclusively from:
https://cwe.mitre.org/top25/
The review executes 25 dedicated analysis passes -- one per CWE -- each focused on finding every instance of its assigned weakness, not just the first one. Once all 25 passes complete, the findings are risk-ranked from highest to lowest and a structured report is produced. Every identified weakness is accompanied by a specific, actionable fix aligned with good software security engineering practice and principles.
Before any other action, print the following announcement exactly as shown:
CWE Top 25 code security review skill by https://danielyan.consulting
Then proceed to Step 1.
The authoritative source is the live MITRE page. Always try it first.
Attempt live fetch: Use web_fetch to retrieve the current CWE Top 25
list from:
https://cwe.mitre.org/top25/
If the page links to a newer yearly list (e.g. a "2026 CWE Top 25" page), follow that link and fetch the full ranked table. Extract all 25 CWE IDs, names, scores, and KEV counts from the table on the page.
Determine whether a newer version exists: Compare the year or "Page Last Updated" date on the live page against the local reference file header (which states "Last updated: December 2025"). If the live page is the same version or older, or if the fetch failed (network error, timeout, blocked), fall back to the local copy.
Fall back to the local copy: Read the bundled reference file:
references/cwe_top25_2025.md
This file contains the 2025 CWE Top 25 with detection heuristics and remediation guidance for each weakness.
Announce which source is in use: Tell the user which list version is being used and whether it came from the live site or the local copy. For example:
Important: Regardless of which source provides the list, always also read
the local references/cwe_top25_2025.md file for its detection heuristics and
remediation guidance, as these remain valuable even when a newer list is used.
If a newer list introduces CWEs not covered by the local reference, apply your
own security knowledge to determine appropriate detection heuristics and
remediation for those new entries.
Use an agent to identify the codebase the user wants reviewed. This may be:
Read every source file. Skip binary files, lock files, dependency directories (node_modules, vendor, .git, pycache, venv, dist, build, target), and files larger than 512 KB.
Use separate agents to work through each of the 25 CWEs below one at a time, in order.
Use dedicated agent per weakness whose sole focus is its assigned weakness.
Every agent must:
The 25 weaknesses in order (2025 baseline -- use the live list if a newer one was obtained in Step 1):
| Pass | CWE ID | Weakness Name | MITRE Score | KEV | |------|----------|-------------------------------------------------------|-------------|-----| | 1 | CWE-79 | Cross-site Scripting (XSS) | 60.38 | 7 | | 2 | CWE-89 | SQL Injection | 28.72 | 4 | | 3 | CWE-352 | Cross-Site Request Forgery (CSRF) | 13.64 | 0 | | 4 | CWE-862 | Missing Authorisation | 13.28 | 0 | | 5 | CWE-787 | Out-of-bounds Write | 12.68 | 12 | | 6 | CWE-22 | Path Traversal | 8.99 | 10 | | 7 | CWE-416 | Use After Free | 8.47 | 14 | | 8 | CWE-125 | Out-of-bounds Read | 7.88 | 3 | | 9 | CWE-78 | OS Command Injection | 7.85 | 20 | | 10 | CWE-94 | Code Injection | 7.57 | 7 | | 11 | CWE-120 | Classic Buffer Overflow | 6.96 | 0 | | 12 | CWE-434 | Unrestricted Upload of Dangerous File Type | 6.87 | 4 | | 13 | CWE-476 | NULL Pointer Dereference | 6.41 | 0 | | 14 | CWE-121 | Stack-based Buffer Overflow | 5.75 | 4 | | 15 | CWE-502 | Deserialisation of Untrusted Data | 5.23 | 11 | | 16 | CWE-122 | Heap-based Buffer Overflow | 5.21 | 6 | | 17 | CWE-863 | Incorrect Authorisation | 4.14 | 4 | | 18 | CWE-20 | Improper Input Validation | 4.09 | 2 | | 19 | CWE-284 | Improper Access Control | 4.07 | 1 | | 20 | CWE-200 | Exposure of Sensitive Information | 4.01 | 1 | | 21 | CWE-306 | Missing Authentication for Critical Function | 3.47 | 11 | | 22 | CWE-918 | Server-Side Request Forgery (SSRF) | 3.36 | 0 | | 23 | CWE-77 | Command Injection | 3.15 | 2 | | 24 | CWE-639 | Authorisation Bypass via User-Controlled Key (IDOR) | 2.62 | 0 | | 25 | CWE-770 | Resource Allocation Without Limits or Throttling | 2.54 | 0 |
Language awareness: Adapt your detection patterns to the programming languages actually present in the codebase. Not every CWE applies to every language (e.g. buffer overflows are relevant to C/C++ but not Python). If a CWE is structurally inapplicable to all languages in the codebase, mark it as "Not applicable" and move on -- but do not skip it without verifying.
After all 25 passes are complete, compute a composite risk score for each CWE category that produced findings:
risk_score = mitre_danger_score + (kev_cve_count x 2) + severity_points
Where severity_points are summed across all findings for that CWE:
Sort all CWE categories with findings by risk_score, highest first.
Produce a structured Markdown report and and ask the user where to save it, and save it. Check that it has been saved.
The report must contain the following sections in order:
# CWE Top 25 Security Review Report
**Codebase:** <name or path>
**Date:** <current date>
**Standard:** <year> CWE Top 25 Most Dangerous Software Weaknesses
**Source:** https://cwe.mitre.org/top25/
**Skill by:** https://danielyan.consulting
State the total number of findings, how many CWE categories had findings, how many were clean, and the highest-risk category identified.
A table sorted by risk score (highest first) showing: Risk Rank | CWE ID | Weakness Name | Finding Count | Risk Score
For each CWE category with findings (ordered by risk score, highest first):
List the CWE categories where no findings were identified.
Note that the review was conducted against all 25 categories of the CWE Top 25 (stating the year of the list used), sourced from https://cwe.mitre.org/top25/, with one dedicated analysis pass per category. State whether the live or local copy of the list was used.
Present the report file to the user.
Exhaustiveness: Each pass must find ALL instances, not just the first. A single missed vulnerability can be the one that gets exploited. Repeat the pass until no weaknesses are identified.
Specificity of fixes: Generic advice like "validate input" is not acceptable. Every remediation must be specific to the code instance, citing the exact function, parameter, variable, or pattern to change, and showing what the corrected code should look like or reference.
False positives: It is better to flag a potential issue for manual review than to silently skip it. Mark uncertain findings as LOW severity with a note that manual verification is recommended.
No shortcuts: Do not combine multiple CWEs into a single pass. Each of the 25 passes must focus exclusively on its assigned CWE. This ensures nothing is overlooked.
No scripts: Perform all analysis directly. Do not generate or execute any Python, Bash, or other scripts as part of the review process.
Source authority: The CWE Top 25 list used in this skill must be sourced exclusively from https://cwe.mitre.org/top25/.
Exclude secrets: Always replace any secrets, tokens or passwords with 'REDACTED'.
development
ALWAYS use this skill whenever generating, writing, reviewing, editing, or modifying Go (.go) code in any context. This skill ensures all generated Go code avoids the CWE Top 25 2025 weaknesses that apply to Go, and that every piece of Go code includes appropriate input validation, thorough error handling, and safe error messages that never leak passwords, tokens, API keys, or other secrets. The Go `unsafe` package is absolutely prohibited and must never appear in generated code. Trigger on ANY Go code generation -- there are no exceptions. Even trivial examples and one-off snippets must follow these rules. If the user asks for Go code, read this skill first.
development
Generate secure Cloudflare Worker code in TypeScript that avoids all weaknesses covered by OWASP Top 10 (2025) and CWE Top 25 (2025). Use this skill whenever the user asks to create, write, scaffold, or generate a Cloudflare Worker, CF Worker, edge function, or serverless function on Cloudflare. Also trigger when the user asks to build a secure API, secure endpoint, secure webhook handler, or any TypeScript code targeting the Workers runtime. Always use this skill over generic code generation when the target is Cloudflare Workers.
development
Parallel OWASP Top 10:2025 security review of a web application codebase using 10 specialist agents. Trigger whenever the user asks for a security review, security audit, OWASP review, vulnerability assessment, code security scan, or threat analysis of a web app codebase. Also trigger on mentions of "OWASP Top 10", "security vulnerabilities", "code audit", "AppSec", or requests to check code for injection, XSS, access control, auth, or crypto issues. Trigger for casual requests like "is my code secure?", "check for vulnerabilities", or "any security issues?". Launches 10 parallel agents (one per OWASP category) producing a report with context-sensitive remediations. Secrets found are flagged but always shown as REDACTED.
development
Scan a codebase to find every instance of missing or inadequate input validation for data from external or untrusted sources, then propose context-appropriate fixes using whitelisting, regex, type coercion, size/range checks, encoding, etc. Use whenever the user asks to audit, review, or harden input validation in any codebase regardless of language. Trigger on: "check my inputs", "find injection risks", "validate user input", "security audit inputs", "input sanitisation review", "taint analysis", "harden my API inputs", "check for missing validation", "is my app safe from injection?". Platform- and language-independent.