add-security-audit
Security audit: OWASP Top 10, multi-tenancy, injection, auth, XSS, dependencies.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Security audit: OWASP Top 10, multi-tenancy, injection, auth, XSS, dependencies.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Consolidated view of the add-pro ecosystem - commands, skills, relationships and dependencies. Loaded by /add as source of truth.
Source of truth for ADD doc rules, depth floors, IDs, refs, validation gate. Load before any doc write.
Use when running agent-judged QA validation (read-PNG by default; the playwright plugin adds live driving) — the Level C judge rubric, severity taxonomy, dual-judge (@ux-agent review ∥ @qa-agent) method, report schema/template, and the config.json/screens.json formats. Consumed by /add.qa and both judges.
Use when a state-materializing command starts or is asked to upgrade — reads the setup receipt, compares the recorded contract against the shipped one, executes the declared upgrade deltas sequentially, and rewrites the receipt even on a verified-current no-op. Consumed by /add.qa-setup STEP 1.5 and STEP 11.
Internal skill for developing ADD framework artefacts (commands, skills, agents, scripts). Use when add-framework--plan analyzes viability of new framework features, when add-framework--build implements framework artefacts, or when creating/modifying commands, skills, or agents. Always use this skill before proposing or implementing changes to the framework itself.
Use when building, styling, or theming UI components, pages, layouts, dashboards, charts, tables, or forms for SaaS products.
| name | add-security-audit |
| description | Security audit: OWASP Top 10, multi-tenancy, injection, auth, XSS, dependencies. |
Use for: Validate security, audit codebase, identify vulnerabilities Do not use for: Writing security fixes, dependency upgrades, incident response, general code review
Reference: Always consult CLAUDE.md for general project standards.
Multi-tenant rules:
account_idaccount_id from JWT (NEVER body)Searches to run:
grep 'findAll|selectFrom' → check account_id filtergrep '@Body()' → check no accountId from bodySearches:
grep 'sk_live|api_key|secret' → no hardcodedgrep 'logger|console' → no sensitive dataSQL/NoSQL:
.raw() with user inputCommand injection:
exec/spawn with user inputSearches:
grep 'raw(' → check user inputgrep '${' in queries → SQL injectionSearch: grep '@Get|@Post' → check @UseGuards.
origin:'*' in prodSecrets/env vars: see A02.
Searches:
grep 'origin.*\*' → open CORSgrep 'process.env' → use IConfigurationServicenpm audit no critical/highCommand: npm audit --json | grep -E 'critical|high'.
Sensitive data in logs: see A02.
dangerouslySetInnerHTML (or sanitized)href/srcSearch: grep 'dangerouslySetInnerHTML' → check sanitization.
@Expose/@ExcludePartialTypeSearch: grep '...body|...dto' → spread vulnerability.
Formula: score = 10 - (weighted_sum / 5)
| Severity | Weight | Score Range | Status |
|---|---|---|---|
| critical | 3 | 8-10 | ✅ Secure |
| high | 2 | 6-7 | ⚠️ Attention |
| medium | 1 | 4-5 | 🟠 Risk |
| low | 0.5 | 0-3 | 🔴 Vulnerable |
security.md, CLAUDE.md, identify scope filesaccount_id, ID from JWTsecurity-report.md# Security Audit Report
**Date:** [date] | **Scope:** [path]
## Score
| Category | Status | Findings |
|----------|--------|----------|
| Access Control | ✅/⚠️/❌ | X |
| Crypto | ✅/⚠️/❌ | X |
| Injection | ✅/⚠️/❌ | X |
| Auth | ✅/⚠️/❌ | X |
| Config | ✅/⚠️/❌ | X |
| XSS | ✅/⚠️/❌ | X |
| Deps | ✅/⚠️/❌ | X |
| **OVERALL** | **⚠️** | **X** |
## Critical Findings
### Finding #1
**Category:** [OWASP] | **Severity:** 🔴 | **File:** `path:line`
**Vulnerable Code:** [code]
**Impact:** [simple language]
**Recommendation:** [fix]
## Positive Points
- [good practices found]
## Priority Actions
1. [most urgent]
2. [second]
3. [third]
Stack-specific protections (NestJS sanitization, Kysely parametrization, React escaping, etc.) and accepted patterns (e.g. process.env.NODE_ENV, internal .raw(), validated PartialType): consult CLAUDE.md for the project's stack and documented exceptions.
Project patterns:
IConfigurationService is correct