adversarial-audit

adversarial-audit is a cursor rule for Cursor from kunalsuri/ai-fication-kit. It costs 49 tokens per session (1,096 once invoked), scanned A, original, Apache-2.0.

A deep, read-only code audit that looks for behavioural and documentation inconsistencies across the whole project. It writes a dated findings report and focuses on issues that simple path or drift checks cannot detect.

In plain words
What is it for?
Checking cross-references against current behaviour, reviewing shell and subprocess argument construction, looking for platform gaps, checking generated-file ownership, and finding inconsistencies between modules.
Why use it?
It can uncover stale comments, unsafe generated commands, platform-specific gaps, and assumptions broken by changes elsewhere in the code. This helps find defects that ordinary mechanical verification misses.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/kunalsuri/ai-fication-kit/adversarial-audit
Clone the repo
git clone --depth 1 https://github.com/kunalsuri/ai-fication-kit

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adversarial-audit

README.md
[![agentmods](https://agentmods.dev/badge/rules/kunalsuri/ai-fication-kit/adversarial-audit.svg)](https://agentmods.dev/rules/kunalsuri/ai-fication-kit/adversarial-audit)
Your own site
<a href="https://agentmods.dev/rules/kunalsuri/ai-fication-kit/adversarial-audit"><img src="https://agentmods.dev/badge/rules/kunalsuri/ai-fication-kit/adversarial-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,096 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.01096
Opus 5 $0.00024 $0.00548
Sonnet 5 $0.00010 $0.00219
Haiku 4.5 $0.00005 $0.00110

Measured 5d ago against content hash f690b5fbb776, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

adversarial-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/adversarial-audit.mdc · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  1. 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.
  2. 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.
  3. 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.
  4. 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."
  5. 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.
  6. 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.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 86 lines · 49 tokens per session scan A f690b5fbb776

Subscribe to this mod's changes

adversarial-audit is a cursor rule published in the GitHub repository kunalsuri/ai-fication-kit (3 stars, last pushed 2d ago), licensed Apache-2.0. It adds 49 tokens to every session and 1,096 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.