secure-code-auditor
AGENTS.md4 starsChanged 2 months agoMITView on GitHub
This repository is a backend security skill. The canonical instructions live in SKILL.md, which routes to the topic files under references/. An agent that works in this repository loads SKILL.md first. Then it reads only the references/*.md file(s) relevant to the task. The primary integration is Claude (Anthropic Agent Skills). This file and its siblings let other agents use the same content. They are pointers, not copies. Where anything here disagrees with SKILL.md, SKILL.md wins. During a task, change no…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- .cursor/rules/secure-code-auditor.mdcCursor rule
- secure-code-auditorSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Read SKILL.md for the router, the ownership table, the mode logic, and the severity summary.
- Very specific: line 85
All of them defer to SKILL.md and references/.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This repository is a backend security skill. The canonical instructions live
in SKILL.md, which routes to the topic files under references/. An agent
that works in this repository loads SKILL.md first. Then it reads only the
references/*.md file(s) relevant to the task.
The primary integration is Claude (Anthropic Agent Skills). This file and
its siblings let other agents use the same content. They are pointers, not
copies. Where anything here disagrees with SKILL.md, SKILL.md wins.
Self-improvement
During a task, change no file of this skill unless the task is a change to this
skill. After the task, if this skill gave wrong or incomplete information, load
SELF-IMPROVEMENT.md and obey it. Before the task, if
~/.skill-improvements/secure-code-auditor/ exists, do section 3 of that file.
What this skill does
It reviews backend code for security issues, and it applies secure defaults while code is written. The corpus sits on the OWASP Top 10:2025 spine, with the API Security Top 10:2023 and ASVS 5.0 beside it. Each reference carries a stack-neutral principle layer and a deep Django and DRF layer. Every control is stated in a review form and a write-time form together.
The coverage spans the whole backend. It runs from the audit workflow and the
entry-point inventory, through access control, authentication, injection,
integrity, cryptography, and configuration. It reaches the API surfaces that
are not DRF routes. It covers the database and data-lifecycle layers,
service identity, deployment, file uploads, and agent and MCP tool surfaces.
It also covers the auditing agent's own access. The SKILL.md router names
each file's exact surface, so do not duplicate that list here.
Two modes
- Review-time. Audit existing code, and produce prioritized findings.
Each finding carries a severity, a location, a CWE and OWASP mapping, the
confirmed source-to-sink path with the protection that failed, and a fix.
The codebase stays read-only. Load
references/01-audit-workflow.mdbefore any topic file. It owns the sweep, and the topic files answer the questions the sweep generates. The report ends with what was not reviewed. - Write-time. Apply the standing secure-default contract while you generate code. Where a default conflicts with the request, apply the default and say so in one line. Close with a short security-decisions note rather than a findings report. The rule for each generation moment sits beside the control it completes, in the reference the router names.
references/00-methodology-and-severity.md defines mode selection, both
output formats, the severity rubric and its baseline table, the ASVS chapter
mapping, and the conflict rule.
How to use the content
- Read
SKILL.mdfor the router, the ownership table, the mode logic, and the severity summary. - At review-time, read
references/01-audit-workflow.mdnext and run its phases. The entry-point inventory decides which topic files are needed, and the coverage ledger records what each pass reached. - Open the
references/*.mdfile(s) for the concern in front of you. The router is grouped: the OWASP spine, then cross-cutting surfaces, then package decisions. Pick the group, then the row. - Where two rows could both match, the "Ownership and boundaries" table in
SKILL.mdnames the one file that owns the topic. Each reference also repeats its own half of that boundary in its opening paragraph. Optional read-only triage (standard library only, no network):
python scripts/entrypoint_inventory.py path/to/project --settings path/to/settings --jsonpython scripts/settings_scan.py path/to/settings/ --jsonpython scripts/dangerous_patterns.py path/to/projectpython scripts/dangerous_patterns.py --selftest
--jsonis JSON Lines in all three, and every stream ends with onekind: "summary"record. All three parse with theastmodule, so a hit is a structural match. Every row names the reference file that owns it, and a file that fails to parse is reported rather than skipped. Treat script output as leads to verify, not as confirmed findings.
Tool-specific entry points
- Claude Code:
SKILL.md(native Agent Skill). - OpenAI Codex CLI: reads this
AGENTS.md. - Cursor:
.cursor/rules/secure-code-auditor.mdc. - Gemini CLI:
GEMINI.md.
All of them defer to SKILL.md and references/.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

