secrets-audit

secrets-audit is a cursor rule for Cursor from briiirussell/cybersecurity-skills. It costs 120 tokens per session (2,581 once invoked), scanned A, 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).

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 120 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,581 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00120 $0.02581
Opus 5 $0.00060 $0.01290
Sonnet 5 $0.00024 $0.00516
Haiku 4.5 $0.00012 $0.00258

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

Security

Grade A, and why

secrets-audit scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

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

1. **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 · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 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).

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*"

For full repo coverage, use git ls-files to scope to tracked files and avoid node_modules:

git ls-files | xargs grep -lE 'sk_live_|ghp_|AKIA[A-Z0-9]{16}|sk-ant-|AIza[A-Za-z0-9_-]{35}' 2>/dev/null

Tooling

Tool Use
gitleaks detect Fast, low FP, run as pre-commit and in CI; supports custom rules
trufflehog git file://. Verifies findings against the real API (high confidence)
detect-secrets scan Yelp's tool; good baseline file workflow
GitHub Secret Scanning Free for public repos; covers most providers automatically; pushes get blocked at push time when enabled with push protection
GitLab Secret Detection Similar, built-in to CI
GitGuardian / Doppler / Spectral Commercial; add organizational dashboards and historical analysis

Read the full file on GitHub · 199 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. 10d 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 (384 stars, last pushed 3mo ago), licensed MIT. It adds 120 tokens to every session and 2,581 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.