agentleFS
Starr-delStarr-del/ShipSafe/skills/secret-preflight/SKILL.md

secret-preflight

Skill0 starsChanged 5 months agoMITView on GitHub

Scan a repository for committed secrets, API keys, tokens, and private keys before deploying or pushing. Use before any first push to a public repo, before any deploy, when the user mentions 'did I commit a secret', 'API key in code', security review, or open-sourcing a project — and proactively if you notice a hardcoded credential while doing other work. Runs fully offline — no API keys, no network, no credentials.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the key was EVER committed, removing the line is not enough — it lives in git history.

    line 21
  2. Distinctive:

    All paths below are relative to this skill's directory (secret-preflight/).

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

secret-preflight

Part of shipsafe — offline deploy-safety skills. Every script is stdlib-only Python 3.8+; nothing leaves the machine.

python3 scripts/scan_secrets.py <project_root> [--json]

Two detection layers:

  1. High-precision patterns for real key formats: AWS, GitHub, Stripe (live vs test severity), OpenAI, Anthropic, Slack, Google, Supabase, private-key blocks, hardcoded JWTs, Postgres URLs with embedded passwords. JWTs are decoded offline: a payload with "role":"service_role" is escalated to a dedicated Supabase SERVICE_ROLE finding — that key bypasses Row Level Security entirely, so anywhere near client code it means the whole database is public. This single mistake is behind the largest documented vibe-coding breaches.
  2. Entropy analysis on assignments to secret-named variables (SECRET/TOKEN/API_KEY/...), with placeholder filtering to avoid false positives on 'your-api-key-here'.

Also verifies .gitignore actually covers .env files. Local .env contents are intentionally NOT flagged — that's where secrets belong; committed code is what's scanned.

Critical follow-ups when something is found:

  • If the key was EVER committed, removing the line is not enough — it lives in git history. The key must be ROTATED. Say this explicitly.
  • A finding can be suppressed for a known-safe line by adding the comment secret-preflight: allow.

Exit codes: 0 clean, 1 findings.

All paths below are relative to this skill's directory (secret-preflight/).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.