adversarial-audit
Skill3 starsChanged 4 months agoApache-2.0View on GitHub
Deep, judgement-based adversarial code audit — hunts for stale cross-references, unescaped interpolation, platform gaps, generated-file ownership conflicts, and cross-module consistency rot that no mechanical check can catch. Read-only; writes a dated findings report.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- p10ns11y/skillstheir own version, first seen Oct 3, 2026
- phatnguyen03022001/agent-skillstheir own version, first seen Aug 24, 2026
- jeremyinthebay/relay-skillstheir own version, first seen Jul 13, 2026
- neonwatty/qa-skillstheir own version, first seen Apr 8, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- neonwatty/qa-skills★ 34same name
- p10ns11y/skills★ 2same name
- phatnguyen03022001/agent-skills★ 2same name
- jeremyinthebay/relay-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/add-feature.mdcCursor rule
- .cursor/rules/adversarial-audit.mdcCursor rule
- .cursor/rules/ai-knowledge-layer.mdcCursor rule
- .cursor/rules/check-drift.mdcCursor rule
- .cursor/rules/cold-start.mdcCursor rule
- .cursor/rules/create-feature-catalog.mdcCursor rule
- .cursor/rules/fix-bug.mdcCursor rule
- .cursor/rules/perform-feature-add-simulation.mdcCursor rule
- .cursor/rules/post-cold-start-verification.mdcCursor rule
- .cursor/rules/review-agent-config.mdcCursor rule
- .cursor/rules/review-change.mdcCursor rule
- .cursor/rules/verify-ai-readiness.mdcCursor rule
- add-featureSkill
- cold-startSkill
- deep-testSkill
- fix-bugSkill
- review-changeSkill
- add-featureSkill
- check-docsSkill
- check-driftSkill
- cold-startSkill
- create-feature-catalogSkill
- fix-bugSkill
- implement-specSkill
- perform-feature-add-simulationSkill
- post-cold-start-verificationSkill
- review-agent-configSkill
- review-changeSkill
- verify-ai-readinessSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Run a deep, adversarial audit of the current codebase.
- Distinctive: line 15
Read-only. Do not edit any file other than the report this command writes.
- Distinctive: line 56
Prefer depth over coverage: a handful of concrete, reproducible defects beats a long list of speculative ones.
- Very specific: line 58
Before opening a finding, check ai/analysis/audit-reports/DEFECT_TRACEABILITY.md for a prior audit row at the same location — don't …
- Very specific: line 79
Does not fix anything — that is a separate, explicit follow-up task the user asks for after reviewing the report (typically via /fix-bug).
- Very specific: line 81
Does not replace verify/drift (mechanical path checks) or review-agent-config (CLAUDE.md/AGENTS.md structure) — this is deliberately the …
- Distinctive: line 85
Not a CI gate: it is non-deterministic and costly.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Copyright (c) 2026 Kunal Suri (CEA LIST). All rights reserved. -->Run a deep, adversarial audit of the current codebase. This is not the
mechanical verify/drift check — those confirm paths exist. This hunts for
defects those checks categorically cannot catch: places where the code's
actual behavior no longer matches what the code, comments, or docs say it
does, or where a change elsewhere in the repo silently broke an assumption
made here.
Read-only. Do not edit any file other than the report this command writes. Full-repo scope every run — do not sample or skip areas because they seem stable; staleness hides exactly where nobody looked recently.
What to hunt for
- Stale cross-references — comments, docstrings, or user-facing strings
describing behavior a later change invalidated. Search for "never",
"always", "not yet available", "no writes unless X", "once available",
TODO, and version/feature gates — then verify the referenced behavior against the current code, not what was true when the comment was written. - Unquoted/unescaped interpolation — any generated shell command, CLI suggestion, file path, or subprocess argument built by string concatenation or a template literal without quoting/escaping. Check every subprocess spawn/exec call and every "here's the command to run" string for inputs that could contain spaces or shell metacharacters.
- Platform-specific gaps — subprocess calls or path handling that assume
POSIX (missing a shell flag for
.cmd-shimmed binaries on Windows, hardcoded path separators, case-sensitivity assumptions). Flag anything that has never actually been exercised cross-platform. - Ownership conflicts on generated files — any file written by more than one code path (scaffolded once, then continuously regenerated by a live process). Check whether "protect user edits" / backup / diffing logic correctly distinguishes "changed because it's supposed to" from "changed because a human edited it."
- Mechanical vs. semantic validation gaps — places where an automated check only confirms a path or reference exists, not that the prose describing it is still accurate. List every place documentation makes a factual claim about code behavior and check it against the current implementation.
- Cross-module consistency after incremental changes — for every function or module that references another component's state, existence, or capabilities, confirm that reference is re-validated, not assumed from when it was first written.
Method
- Locate code via
ai/guide/MODULE_MAP.mdfirst; don't crawl the whole tree blind. - For any suspicious claim, reproduce it — run the command, exercise the code path, or trace the call — rather than reasoning from the source alone. Findings that were actually reproduced should say so explicitly.
- Prefer depth over coverage: a handful of concrete, reproducible defects beats a long list of speculative ones.
- Before opening a finding, check
ai/analysis/audit-reports/DEFECT_TRACEABILITY.mdfor a prior audit row at the same location — don't re-report something alreadyFIXEDor trackedOPEN.
Output
Append a new dated audit section to
ai/analysis/audit-reports/DEFECT_TRACEABILITY.md (create it, following its
existing row format, if this is the first audit) with one row per finding —
ID, severity, status (OPEN until fixed), location, defect, root cause,
trace — and write the full evidence/repro for each finding to
ai/analysis/audit-reports/ADVERSARIAL_AUDIT_<YYYY-MM-DD>.md, tagged
[inferred] until a human reviews them. One line per finding in the summary:
path:line — issue — concrete failure scenario — suggested fix
Order most-severe first. No architecture summary, no restating what the code does — only defects and risks with evidence.
Then report the finding count and the top 3 by severity directly to the user.
What this does NOT do
- Does not fix anything — that is a separate, explicit follow-up task the
user asks for after reviewing the report (typically via
/fix-bug). - Does not replace
verify/drift(mechanical path checks) orreview-agent-config(CLAUDE.md/AGENTS.mdstructure) — this is deliberately the one check in the kit that requires judgement instead of a deterministic script. - Not a CI gate: it is non-deterministic and costly. Run it periodically (before a release, after a large refactor), not on every push.
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.

