skill-packs/codex-review/skills/codex-security-review/SKILL.md
Security-focused code review using OWASP Top 10 and CWE patterns. Detects vulnerabilities through adversarial debate.
npx skillsauth add lploc94/codex_skill codex-security-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.
Security-focused review identifying vulnerabilities aligned with OWASP Top 10 2021 and common CWE patterns.
When changes touch auth, crypto, SQL, user input, file uploads, or APIs. Complements /codex-impl-review.
RUNNER="{{RUNNER_PATH}}" SKILLS_DIR="{{SKILLS_DIR}}" json_esc() { printf '%s' "$1" | node -e 'let d="";process.stdin.on("data",c=>d+=c);process.stdin.on("end",()=>process.stdout.write(JSON.stringify(d)))'; }
printf '%s' "$PROMPT" | node "$RUNNER" ... -- NEVER echo. JSON via heredoc.init output must start with CODEX_SESSION:. start/resume must return valid JSON. CODEX_NOT_FOUND->tell user install codex.status === "completed" means Codex's turn is done -- NOT that the debate is over. MUST check Loop Decision table.failed->retry once (re-poll 15s). timeout->report partial, suggest lower effort. stalled+recoverable->stop->recovery resume->poll; not recoverable->report partial. Cleanup sequencing: finalize+stop ONLY after recovery resolves.finalize + stop, even on failure/timeout.Read references/protocol.mdScope: working-tree (staged/unstaged), branch (diff vs base), or full (entire codebase). Auto-detect via git status --short and git rev-list.
Effort: <10 files=medium, 10-50=high, >50=xhigh. Announce defaults.
Scope guide: working-tree=pre-commit, branch=pre-merge, full=security audit.
Working-tree: changes must exist. Branch: diff must exist. Full: no pre-flight needed.
Init: node "$RUNNER" init --skill-name codex-security-review --working-dir "$PWD"
Render (nested): First render scope template (working-tree/branch/full) with BASE_BRANCH. Then render template=round1 with WORKING_DIR, SCOPE, EFFORT, BASE_BRANCH, SCOPE_SPECIFIC_INSTRUCTIONS.
Start: printf '%s' "$PROMPT" | node "$RUNNER" start "$SESSION_DIR" --effort "$EFFORT"
Poll + report activities.
Parse review.blocks[] (id, title, severity, category, confidence, cwe, owasp, problem, evidence, attack_vector, suggested_fix). Risk summary in review.verdict.risk_summary. Fallback: review.raw_markdown.
Present grouped by severity (Critical->High->Medium->Low). Critical/High=blocking; Medium/Low=advisory.
round2+, placeholders: FIXED_ITEMS, DISPUTED_ITEMS.
Resume: printf '%s' "$PROMPT" | node "$RUNNER" resume "$SESSION_DIR" --effort "$EFFORT". Back to Poll.| # | Condition | Action | |---|-----------|--------| | 1 | verdict === "APPROVE" | EXIT -> step 5 | | 2 | convergence.stalemate === true | EXIT -> step 5 (stalemate) | | 3 | verdict === "REVISE" or open issues | CONTINUE -> Apply/Rebut |
APPROVE -> done. Stalemate -> present deadlocked issues, ask user. Report: Rounds, Verdict, Risk Level, Issues Found/Fixed/Disputed. Risk Summary: Critical/High/Medium/Low counts with fixed/open breakdown. Present: fixed vulnerabilities, disputed items, residual risks, blocking vs advisory, recommended next steps (dynamic testing, pentest).
finalize + stop. Always run. (-> references/protocol.md for error handling)
SKILL_START, POLL_WAITING, CODEX_RETURNED, APPLY_FIX, SEND_REBUTTAL, LATE_ROUND, APPROVE_VICTORY, STALEMATE_DRAW, FINAL_SUMMARY
development
Peer debate between Claude Code and Codex on any technical question. Both think independently, challenge each other, converge to consensus or explicit disagreement.
development
Peer debate between Claude Code and Codex on PR quality and merge readiness. No code modifications.
tools
Review/debate plans before implementation between Claude Code and Codex CLI. Can run in plan mode — debates the plan and edits the plan file to fix accepted issues.
development
Parallel independent review by 4 Claude agents + Codex, followed by merge, debate, and consensus report.