secrets-audit

secrets-audit is a cursor rule for Cursor from briiirussell/cybersecurity-skills. It costs 140 tokens per session (5,960 once invoked), scanned B, original, MIT.

A review process for finding credentials and other secrets exposed in source code, Git history, build files, or infrastructure. It also examines how a team stores and manages secrets to prevent future leaks.

In plain words
What is it for?
Scanning repositories and history for API keys and provider credentials, checking build artifacts, and reviewing the systems used to store, rotate, and distribute secrets.
Why use it?
An exposed API key or password can grant access to systems and may remain recoverable in old commits or build artifacts. This helps find existing exposure and weak handling practices.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

Good fit Scanning repositories and history for API keys and provider credentials, checking build artifacts, and reviewing the systems used to store, rotate, and distribute secrets.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/briiirussell/cybersecurity-skills/secrets-audit
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.

Clone the repo
git clone --depth 1 https://github.com/briiirussell/cybersecurity-skills

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 secrets-audit

README.md
[![agentmods](https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/secrets-audit/github.svg)](https://agentmods.dev/rules/briiirussell/cybersecurity-skills/secrets-audit)
Your own site
<a href="https://agentmods.dev/rules/briiirussell/cybersecurity-skills/secrets-audit"><img src="https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/secrets-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for secrets-audit

Your own site · 80×15
<a href="https://agentmods.dev/rules/briiirussell/cybersecurity-skills/secrets-audit"><img src="https://agentmods.dev/badge/rules/briiirussell/cybersecurity-skills/secrets-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,960 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00140 $0.05960
Opus 5.5 $0.00056 $0.02384
Sonnet 5.5 $0.00028 $0.01192
Haiku 4.5 $0.00014 $0.00596

Measured today against content hash a40cf2341baf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

secrets-audit scanned grade B with 3 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 today.

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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| `.claude/settings.json`, `.claude/settings.local.json`, `~/.claude/settings.json` | `env` blocks; `apiKeyHelper` / `awsCredentialExport` commands that print a credential (and run a shell command — see `agent-supply-cha

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Reads MCP configurationlowAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

| `.mcp.json`, `~/.claude.json` (user and per-project `mcpServers`) | `env` and `headers` blocks with literal tokens |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

2. **Verify it's live** — use the provider's verification (`aws sts get-caller-identity`, `stripe balance retrieve`, `curl -H "Authorization: Bearer $TOKEN" ...`) — don't assume; some leaked keys are already revoked or w
adapters/cursor/secrets-audit.mdc · 330 lines

How it starts

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

Secrets Audit — Credential Exposure and Secrets-Management Review

Two halves: (1) find secrets that have already leaked into source, history, or artifacts, and (2) audit the secrets-management posture that determines whether future leaks happen.

Most secret leaks aren't "we forgot to redact" — they're "we never had a system, so every developer made up their own approach." This skill covers both the cleanup and the prevention.

Cross-references: dependency-audit (CI-related secrets risk in build-time exposure), iam-audit (workload identity federation as the alternative to long-lived keys), owasp-audit A02 (in-source secret patterns), agent-supply-chain-audit (the skills, hooks, and MCP servers that sit next to these agent configs and can read them), incident-triage and threat-hunting (the exfiltration-collector domains below as egress indicators), scanner-pipeline (gitleaks / trufflehog across full history and a whole fleet of repos, on a schedule), personal-opsec (the operator's own machine, where agent tokens and pasted secrets actually live).

Authorization

Scan only repositories, CI systems and machines the user owns or is authorized to audit. Never print a full secret: give the type, location, and prefix plus last four. Checking that a key is live ("Verify it's live" below) uses the key, so ask first, use the provider's read-only identity call, and never use a found credential to read data. Rotation and history rewrites are the owner's call and always prompt.

Part 1 — Find leaked secrets

Provider key prefixes (high-confidence patterns)

The most useful first sweep is grep against known provider key prefixes. False positives are low and matches are almost always real.

# Stripe
grep -rE "(sk_live_|sk_test_|rk_live_|whsec_)[A-Za-z0-9]{20,}" . \
  --include="*.{js,ts,jsx,tsx,py,rb,go,java,php,sh,env,yml,yaml,json}"

# AWS access keys
grep -rE "(AKIA|ASIA)[A-Z0-9]{16}" .

# AWS secret keys (40 chars, base64-y) — high FP rate, use with caution
grep -rE "[A-Za-z0-9/+=]{40}" . --include="*.env*" --include="*.json"

# GitHub
grep -rE "gh[pousr]_[A-Za-z0-9]{36}" .

# Google Cloud API key + service-account JSON
grep -rE "AIza[A-Za-z0-9_-]{35}" .
grep -rln '"type": "service_account"' . --include="*.json"

# Slack
grep -rE "xox[baprs]-[A-Za-z0-9-]+" .

# OpenAI / Anthropic
grep -rE "sk-[A-Za-z0-9]{32,}" .
grep -rE "sk-ant-[A-Za-z0-9_-]{90,}" .

# Generic high-entropy strings in env files
grep -rE "^[A-Z_]+=[A-Za-z0-9/+=]{32,}$" . --include="*.env*"

Read the full file on GitHub · 330 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. today Changed · +131 lines · +20 tokens per session scan A → B a40cf2341baf
  2. 1mo ago First seen · 199 lines · 120 tokens per session scan A 67d335ac6e11

Subscribe to this mod's changes

secrets-audit is a cursor rule published in the GitHub repository briiirussell/cybersecurity-skills (435 stars, last pushed today), licensed MIT. It adds 140 tokens to every session and 5,960 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 3 findings (reads agent configuration directories, reads mcp configuration, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.