Security Code Audit
security-code-audit is a Codex skill for deep, evidence-driven security review of software repositories, pull requests, services, scripts, applications, infrastructure, and configuration.
It is built to push Codex beyond shallow scanner-style output: map the codebase first, identify trust boundaries, threat model the system, trace source-to-sink flows, verify claims, and report only issues grounded in concrete code evidence.
Repository: github.com/AKMessi/security-code-audit
Highlights
- Deep repository and pull request security review
- Threat modeling and trust-boundary mapping
- Source-to-sink tracing for high-risk flows
- Authentication, authorization, IDOR, and tenant-isolation review
- Injection, XSS, CSRF, CORS, SSRF, file handling, deserialization, crypto, secrets, supply-chain, CI/CD, cloud/IaC, business logic, race-condition, and AI-agent security coverage
- Evidence-first reporting with severity, confidence, attack path, impact, fix guidance, and verification notes
- A bundled repository inventory helper that avoids printing likely secret values
Use Cases
Use this skill when you want Codex to:
- Review a repository for exploitable security vulnerabilities
- Review a pull request for security regressions
- Threat model a service or feature
- Audit authentication, session, authorization, tenant isolation, or admin flows
- Triage scanner results and separate true positives from noise
- Review dependency, CI/CD, Docker, Kubernetes, Terraform, or deployment security
- Look for business logic flaws, unsafe file handling, SSRF, injection, secrets exposure, or privilege escalation
Safety
This skill is intended for authorized defensive security work.
It instructs Codex to:
- Review only local, user-provided, or explicitly authorized targets
- Avoid destructive actions, persistence, lateral movement, credential use, data exfiltration, and live exploitation against third-party systems
- Avoid printing raw secrets, tokens, private keys, or credentials
- Treat scanners as leads, not proof
- Label uncertain issues as hypotheses instead of inventing findings
Installation
Clone this repository into your Codex skills directory.
Windows PowerShell
git clone https://github.com/AKMessi/security-code-audit.git "$env:USERPROFILE\.codex\skills\security-code-audit"
macOS or Linux
git clone https://github.com/AKMessi/security-code-audit.git ~/.codex/skills/security-code-audit
Restart Codex or start a new Codex session after installation so the skill metadata is loaded.
Usage
Invoke the skill explicitly with $security-code-audit.
Use $security-code-audit to review this repository for exploitable security vulnerabilities.
Use $security-code-audit to review this pull request for security regressions.
Use $security-code-audit to threat model this service and audit the auth, tenant isolation, and file upload flows.
Use $security-code-audit to triage this scanner report and tell me which findings are actually exploitable in this codebase.
Use $security-code-audit to review the Docker, Kubernetes, Terraform, and CI/CD configuration for security issues.
How The Skill Works
The core workflow in SKILL.md asks Codex to:
- Establish the review scope.
- Build a code and trust-boundary map.
- Create a lightweight threat model.
- Trace source-to-sink and privilege flows.
- Check relevant vulnerability classes systematically.
- Verify claims with code evidence, local tests, or safe tooling.
- Report findings with severity, confidence, attack path, impact, and fix guidance.
The reference files provide deeper guidance only when needed, keeping the main skill concise while still supporting serious reviews.
Included Files
security-code-audit/
SKILL.md
README.md
LICENSE
agents/
openai.yaml
references/
deep-review-method.md
reporting.md
vulnerability-classes.md
scripts/
repo_security_inventory.py
Helper Script
The bundled helper script creates a first-pass security inventory for a repository:
python scripts/repo_security_inventory.py /path/to/repo
JSON output:
python scripts/repo_security_inventory.py /path/to/repo --json
It identifies:
- Dependency, build, and deployment manifests
- Likely application entrypoints
- Security-critical files
- CI/CD and infrastructure files
- Pattern hits for auth, command execution, deserialization, query construction, SSRF, file handling, crypto, CORS, CSRF, and XSS
The script intentionally omits line contents so likely secrets are not printed to the terminal. Treat its output as review leads, not confirmed findings.
Validation
If you have the Codex skill-creator system skill installed, validate the skill with:
Windows PowerShell
python "$env:USERPROFILE\.codex\skills\.system\skill-creator\scripts\quick_validate.py" "$env:USERPROFILE\.codex\skills\security-code-audit"
macOS or Linux
python ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py ~/.codex/skills/security-code-audit
Expected result:
Check the helper script:
python -m py_compile scripts/repo_security_inventory.py
Publishing Checklist
Before publishing this repository publicly:
- Include
SKILL.md
- Include
README.md
- Include
LICENSE
- Include
agents/openai.yaml
- Include all files under
references/
- Include all files under
scripts/
- Do not commit
__pycache__/, *.pyc, .env, private keys, tokens, credentials, or local secrets
Contributing
Contributions are welcome when they improve defensive security review quality, reduce false positives, improve evidence requirements, or broaden framework and vulnerability coverage.
Good contributions include:
- Better source-to-sink review guidance
- Additional vulnerability-class coverage
- Safer scanner triage workflows
- Improvements to the inventory helper script
- Clearer reporting templates
Please keep the skill focused on authorized defensive review. Do not add offensive exploitation workflows, credential misuse instructions, persistence, evasion, or live-target attack playbooks.
Security Reports
If you find a security issue in this skill or its helper script, report it through GitHub's private vulnerability reporting if the repository has it enabled. If not, open a minimal issue that does not disclose sensitive exploit details and ask the maintainer for a private reporting channel.
License
This project is licensed under the MIT License. See LICENSE for details.