java/src/main/resources/targets/claude/skills/core/security/x-owasp-scan/SKILL.md
Automated OWASP Top 10 (2021) verification mapped to ASVS levels (L1/L2/L3). Checks all 10 categories (A01-A10) with per-category pass/fail, ASVS coverage percentage, score grading, SARIF 2.1.0 output, and CI integration. Delegates A06 to x-dependency-audit.
npx skillsauth add edercnj/claude-environment x-owasp-scanInstall 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.
Verifies {{PROJECT_NAME}} against the OWASP Top 10 (2021) with verification items mapped to ASVS chapters and levels. Produces per-category pass/fail results, an overall score (0-100), ASVS coverage percentage, and generates both SARIF 2.1.0 and Markdown reports.
/x-owasp-scan — full L1 scan, all categories/x-owasp-scan --level L2 — L2 scan (standard defense)/x-owasp-scan --level L3 — L3 scan (advanced/critical apps)/x-owasp-scan --category A03 — single category scan/x-owasp-scan --report-format sarif — SARIF output only/x-owasp-scan --report-format markdown — Markdown only/x-owasp-scan --report-format both — both formats (default)| Parameter | Type | Default | Values | Description |
|-----------|------|---------|--------|-------------|
| --level | String | L1 | L1, L2, L3 | ASVS verification depth |
| --category | String | all | A01-A10, all | OWASP category filter |
| --report-format | String | both | markdown, sarif, both | Output format |
| Level | Name | Target | Description | |-------|------|--------|-------------| | L1 | Opportunistic | Any application | Minimum verification; automated checks only | | L2 | Standard | Most applications | Defensive depth; automated + manual review | | L3 | Advanced | Critical systems (health, finance, infra) | Maximum assurance; comprehensive review |
1. PARSE -> Parse CLI parameters (level, category, report-format)
2. LOAD -> Load ASVS verification items from knowledge pack
3. MAP -> Map OWASP Top 10 categories to ASVS chapters
4. VERIFY -> Execute verification checks per category
5. DELEGATE -> Delegate A06 to x-dependency-audit (RULE-011)
6. SCORE -> Calculate per-category and overall scores
7. REPORT -> Generate SARIF 2.1.0 + Markdown reports
Validate CLI arguments:
--level must be L1, L2, or L3 (default: L1)--category must be A01-A10 or "all" (default: all)--report-format must be markdown, sarif, or both (default: both)Read the OWASP ASVS knowledge pack to load verification items per chapter and level:
Read knowledge/security/index.md
Read knowledge/security/application-security.md
Each verification item has:
| OWASP Category | ID | ASVS Chapter(s) | Focus Areas |
|----------------|-----|-----------------|-------------|
| Broken Access Control | A01 | V4 | RBAC enforcement, path traversal, CORS, IDOR |
| Cryptographic Failures | A02 | V6, V9 | Encryption at rest, TLS config, key management, cipher suites |
| Injection | A03 | V5 | Input validation, output encoding, parameterized queries, XSS |
| Insecure Design | A04 | V1 | Threat modeling, secure architecture patterns, trust boundaries |
| Security Misconfiguration | A05 | V14 | Default configs, error handling, hardening, unnecessary features |
| Vulnerable Components | A06 | N/A | DELEGATED to x-dependency-audit (RULE-011 — Skill Composability) |
| Auth Failures | A07 | V2, V3 | Authentication mechanisms, session management, credential storage |
| Software/Data Integrity | A08 | V10 | Code integrity, deserialization safety, CI/CD security |
| Logging Failures | A09 | V7 | Logging completeness, monitoring, alerting, log injection |
| SSRF | A10 | V5, V13 | URL validation, API security, server-side request handling |
For each category (except A06), execute verification checks at the requested ASVS level.
L1 Checks:
..)L2 Checks (includes L1):
L3 Checks (includes L1+L2):
L1 Checks:
L2 Checks (includes L1):
L3 Checks (includes L1+L2):
L1 Checks:
L2 Checks (includes L1):
L3 Checks (includes L1+L2):
L1 Checks:
L2 Checks (includes L1):
L3 Checks (includes L1+L2):
L1 Checks:
L2 Checks (includes L1):
L3 Checks (includes L1+L2):
L1 Checks:
L2 Checks (includes L1):
L3 Checks (includes L1+L2):
L1 Checks:
L2 Checks (includes L1):
L3 Checks (includes L1+L2):
L1 Checks:
L2 Checks (includes L1):
L3 Checks (includes L1+L2):
L1 Checks:
L2 Checks (includes L1):
L3 Checks (includes L1+L2):
Per RULE-011 (Skill Composability), A06 (Vulnerable and Outdated Components) is delegated to x-dependency-audit via the Skill tool (Rule 13 — INLINE-SKILL pattern). MANDATORY TOOL CALL — NON-NEGOTIABLE (Rule 24): silent omission leaves the A06 row blank and fails Camada 3 audit when the dependency-audit evidence file is absent for the story:
Skill(skill: "x-dependency-audit", args: "--scope vulnerabilities")
The delegation result is recorded as:
{
"category": "A06",
"categoryName": "Vulnerable and Outdated Components",
"status": "DELEGATED",
"delegatedTo": "x-dependency-audit",
"totalChecks": 0,
"passedChecks": 0,
"failedChecks": 0
}
For each category:
categoryScore = (passedChecks / totalChecks) * 100
status = categoryScore >= 70 ? "PASS" : "FAIL"
overallScore = sum(passedChecks for all categories)
/ sum(totalChecks for all categories) * 100
| Score Range | Grade | |-------------|-------| | 90-100 | A | | 80-89 | B | | 70-79 | C | | 50-69 | D | | 0-49 | F |
asvsCoverage = (verifiedItems at requested level)
/ (totalItems at requested level) * 100
Write to results/security/owasp-scan-YYYY-MM-DD.sarif.json:
{
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
"version": "2.1.0",
"runs": [{
"tool": {
"driver": {
"name": "x-owasp-scan",
"version": "1.0.0",
"informationUri": "https://owasp.org/Top10/",
"rules": [
{
"id": "OWASP-A01",
"name": "BrokenAccessControl",
"shortDescription": {
"text": "A01:2021 - Broken Access Control"
},
"helpUri": "https://owasp.org/Top10/A01_2021-Broken_Access_Control/"
}
]
}
},
"results": [
{
"ruleId": "OWASP-A01",
"level": "error",
"message": {
"text": "Finding description with fix recommendation"
},
"locations": [{
"physicalLocation": {
"artifactLocation": {
"uri": "src/main/java/...",
"uriBaseId": "%SRCROOT%"
}
}
}],
"properties": {
"asvsChapter": "V4",
"asvsRequirement": "V4.1.1",
"asvsLevel": "L1",
"owaspCategory": "A01",
"fixRecommendation": "Implement server-side access control"
}
}
]
}]
}
Write to results/security/owasp-scan-YYYY-MM-DD.md:
# OWASP Top 10 Scan Report — {{PROJECT_NAME}}
**Date:** YYYY-MM-DD
**ASVS Level:** L1 | L2 | L3
**Score:** NN/100 (Grade: A-F)
**ASVS Coverage:** NN.N%
## Summary
| Category | Name | ASVS | Status | Checks | Passed | Failed |
|----------|------|------|--------|--------|--------|--------|
| A01 | Broken Access Control | V4 | PASS/FAIL | N | N | N |
| A02 | Cryptographic Failures | V6, V9 | PASS/FAIL | N | N | N |
| A03 | Injection | V5 | PASS/FAIL | N | N | N |
| A04 | Insecure Design | V1 | PASS/FAIL | N | N | N |
| A05 | Security Misconfiguration | V14 | PASS/FAIL | N | N | N |
| A06 | Vulnerable Components | -- | DELEGATED | -- | -- | -- |
| A07 | Auth Failures | V2, V3 | PASS/FAIL | N | N | N |
| A08 | Software/Data Integrity | V10 | PASS/FAIL | N | N | N |
| A09 | Logging Failures | V7 | PASS/FAIL | N | N | N |
| A10 | SSRF | V5, V13 | PASS/FAIL | N | N | N |
## Per-Category Details
### A01 — Broken Access Control (V4)
**Status:** PASS/FAIL | **Score:** NN/100 | **Level:** L1
| # | Check | ASVS Ref | Level | Result |
|---|-------|----------|-------|--------|
| 1 | Access control enforced server-side | V4.1.1 | L1 | PASS/FAIL |
| 2 | Directory listing disabled | V4.1.2 | L1 | PASS/FAIL |
#### Findings
- **[F-A01-001]** {description}
- **ASVS:** V4.1.1
- **Severity:** HIGH
- **Fix:** {fixRecommendation}
### A06 — Vulnerable Components (DELEGATED)
**Status:** DELEGATED to `x-dependency-audit`
> Run `/x-dependency-audit --scope vulnerabilities` for component analysis.
## Scoring
- **Overall Score:** NN/100
- **Grade:** A/B/C/D/F
- **ASVS Coverage:** NN.N% (at level LN)
- **Passed Categories:** N/10
- **Failed Categories:** N/10
- **Delegated Categories:** 1/10
## CI Integration
Exit code: 0 (all categories PASS or DELEGATED) / 1 (any category FAIL)
When run in CI mode, the skill:
--report-format sarif for CI-only outputgithub/codeql-action/upload-sarif| Scenario | Action | |----------|--------| | Invalid --level value | Error with valid options list | | Invalid --category value | Error with valid options list | | Knowledge pack not found | Warn, continue with built-in checks | | x-dependency-audit unavailable | Mark A06 as SKIPPED, note in report | | Partial scan (some categories fail to verify) | Report verified categories, mark others SKIPPED | | No source files found | Report "No source files found for verification" |
| # | Knowledge Pack | Path | Purpose |
|---|----------------|------|---------|
| 1 | Security | knowledge/security/index.md | OWASP ASVS verification items |
| 2 | Security References | knowledge/security/application-security.md | Detailed ASVS chapter mappings |
| Skill | Relationship | Context | |-------|-------------|---------| | x-dependency-audit | Delegates to | A06 (Vulnerable Components) delegated per RULE-011 | | x-security-dashboard | Consumed by | SARIF output aggregated into security posture dashboard | | x-threat-model | Complements | Threat model informs A04 (Insecure Design) checks |
tools
Documentation automation v2: stack-aware generation from documentation.targets.
development
Generates or updates CI/CD pipelines per project stack with actionlint validation.
tools
Generates ADRs from architecture-plan mini-ADRs with sequential numbering and index update.
development
Formats source code; first step of the pre-commit chain (format -> lint -> compile).