mcpField
C
code-security-audit

code-security-audit

github.com/buyoungSecurity2141 installsUpdated 2d ago
Repository

About code-security-audit

A code-audit skill for agents analyzing a codebase against four OWASP sources. It supports scoped reviews, severity-rated findings, remediation guidance, and structured Markdown reports.

Key features

  1. 01Codebase and stack reconnaissance
  2. 02Analysis across eight security domains
  3. 03ASVS-level verification
  4. 04Cross-reference OWASP findings
  5. 05Severity ratings with evidence
  6. 06Markdown reports and remediation

Use cases

  1. 01Auditing authentication and sessions
  2. 02Reviewing API security risks
  3. 03Checking code for injection flaws
  4. 04Prioritizing vulnerability fixes

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/buyoung/skills --skill code-security-audit

After installing, type/code-security-auditin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
audit_process.md
remediation_patterns.md
report_format.md
security_domains.md
vulnerability_patterns.md

Details

From the project README

Code Security Audit Capabilities

OWASP 4-source integrated code security audit system for universal codebase analysis.

Knowledge Sources

  • OWASP ASVS 5.0.0: 345 verification requirements across 17 security domains (L1/L2/L3)
  • OWASP API Security Top 10 2023: 10 API-specific risk categories with code-level indicators
  • OWASP CheatSheet Series: 109 practical secure coding cheat sheets for remediation guidance
  • OWASP WSTG (Web Security Testing Guide): 12 testing categories with 120+ test scenarios

Source Roles

SourceRoleUsage
ASVS 5.0.0Verification requirements baselineDefines what to check — structured requirements per domain
API Security Top 10 2023Risk taxonomyDefines what to look for — API-specific threat patterns
CheatSheet SeriesImplementation guidanceDefines how to fix — secure coding patterns and practices
WSTGTest methodologyDefines how to verify — concrete test scenarios per vulnerability

Domains

  • Input Handling (V1, V2, V5): Encoding, sanitization, injection prevention, validation, file handling
  • Authentication & Session (V6, V7, V9, V10): Auth mechanisms, session management, token handling, OAuth/OIDC
  • Authorization (V8): Object-level, function-level, property-level access control
  • Cryptography (V11, V12): Storage encryption, key management, TLS configuration
  • API Security (V4, V17): REST/GraphQL/WebSocket/WebRTC security, rate limiting, resource consumption
  • Data Protection (V14): Sensitive data exposure, privacy controls, client-side data
  • Configuration (V13, V16): Security headers, CORS, error handling, logging, deployment hardening
  • Secure Coding (V3, V15): Web frontend security, architecture patterns, defensive coding, concurrency safety

Input Contract

FieldRequiredDescription
Codebase pathYesThe current workspace or repository the agent is operating in. Defaults to the active codebase; users may narrow scope to specific directories or files (e.g., src/auth/, api/controllers/)
Audit levelNoASVS verification level (default: L2). See level definitions below
Focus areasNoSecurity domains to prioritize. See focus area catalog below
Tech contextNoLanguage, framework, or architecture notes for targeted analysis
Audit Levels (OWASP ASVS 5.0.0)
LevelTarget ApplicationRequirementsDescription
L1All applications~86Essential baseline — covers critical vulnerabilities that are typically exploitable and must be addressed in every application (e.g., SQL injection, OS command injection, basic auth checks)
L2Applications handling sensitive data (PII, financial, health)~230Standard security — includes L1 plus defense-in-depth controls such as SSRF protection, template injection prevention, secure session management, and proper cryptographic usage
L3Mission-critical systems (banking, healthcare, military, infrastructure)~345Comprehensive defense — includes L1+L2 plus advanced controls such as formula injection prevention, full input canonicalization, and exhaustive cryptographic verification
Focus Area Catalog
Focus AreaDomainsExample Checks
authenticationV6, V7, V9, V10Password storage, MFA, OAuth/OIDC flow, credential rotation
authorizationV8Object-level (BOLA), function-level, property-level access control
injectionV1, V2SQLi, XSS, command injection, LDAP/XPath injection, template injection, XXE
cryptographyV11, V12Weak algorithms, key management, TLS configuration, secret storage
api-securityV4, V17Rate limiting, resource consumption, REST/GraphQL/WebSocket security
sessionV7, V9, V10Token handling, session fixation, cookie attributes, JWT validation, CSRF
file-handlingV5Path traversal, unrestricted upload, file type validation, storage security
data-protectionV14Sensitive data exposure, privacy controls, client-side data leakage
configurationV13, V16Security headers, CORS, error handling, logging, deployment hardening
secure-codingV3, V15Frontend security, concurrency safety, architecture patterns, defensive coding

Preconditions

  • Codebase is accessible and readable
  • Agent has file search and read capabilities
  • If codebase structure cannot be determined, the agent reports limitations in the audit output

Core Capabilities

  • Codebase Reconnaissance: Identifies technology stack, frameworks, entry points, and security-relevant file areas
  • Domain-Scoped Analysis: Systematically audits code across all 8 security domains
  • ASVS Requirement Verification: Checks code against applicable ASVS 5.0.0 requirements at the specified level
  • Vulnerability Pattern Detection: Identifies known vulnerable code patterns from the integrated knowledge base
  • Cross-Source Correlation: Maps findings to ASVS requirements, API Top 10 risks, CheatSheet guidance, and WSTG test IDs
  • Severity Classification: Rates findings as Critical/High/Medium/Low with evidence and confidence
  • Remediation Guidance: Provides concrete fix patterns sourced from CheatSheet Series
  • Structured Report Generation: Produces a comprehensive Markdown audit report

Audit Workflow

1. Reconnaissance    → Identify stack, structure, entry points
2. Scope Definition  → Select applicable ASVS domains and level
3. Domain Analysis   → Audit each security domain systematically
4. Finding Synthesis → Deduplicate, correlate across sources, assign severity
5. Remediation Map   → Attach fix patterns per finding
6. Report Generation → Produce structured Markdown report

Output Contract

The audit produces a Markdown report containing:

  • Executive Summary: Overall risk posture, critical findings count, audit scope
  • Findings Table: Each finding with severity, ASVS ID, CWE, evidence, and remediation
  • Domain Reports: Per-domain detailed analysis with code references
  • Remediation Roadmap: Prioritized fix recommendations
  • Audit Metadata: Scope, level, limitations, methodology notes

Severity Levels

LevelCriteria
CriticalExploitable vulnerability with direct security impact (RCE, SQLi, auth bypass, data breach)
HighSignificant security weakness requiring prompt remediation (broken access control, weak crypto, SSRF)
MediumSecurity concern with conditional exploitability (missing headers, verbose errors, weak validation)
LowDefense-in-depth improvement or best practice deviation (logging gaps, minor config issues)
InfoObservation or recommendation with no direct security impact

Technical References

Comments

Markdown supported