agentleFS
usio0108usio0108/security-shipping-gates/skills/preflight-audit/SKILL.md

preflight-audit

Skill0 starsChanged 50 days agoMITView on GitHub

Runs a structured pre-launch security review of a web app before deploying or after a build sprint — scans for exposed secrets and admin keys in client-reachable code, checks git history and gitignore, then walks the human through the manual tests that tooling cannot do (cross-account access, logged-out access, production error leakage, spend caps, 2FA). Triggers whenever the user says they are about to ship, launch, deploy, push to production, go live, open signups, or asks whether their app or vibe-coded project is safe, secure, or ready for real users. Also triggers on Chinese-language requests like 上線前檢查、資安檢查、安全嗎、要發布了.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 1

    1. neilyonglu/security-shipping-gates★ 0100% same

    Edited · 0

    None found.

    Wrote their own version · 1

    1. ReazGan/ward★ 2same 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 repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the bundled script from the project root:

    line 14
  2. Distinctive:

    Ask directly, and record the answers:

    line 49
  3. Distinctive:

    If one credential leaked, what exactly would it reach?

    line 63
  4. Distinctive:

    Every field that determines entitlement (plan, quota, role, price) has been checked against who can write to it before moving to the report.

    line 64
  5. Distinctive:

    Use this structure exactly:

    line 68
  6. Very specific:

    After fixing every Critical item, rerun scripts/scan_repo.sh and repeat the two-account test before shipping.

    line 90

≈ “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

Pre-launch security audit

Scanners find known-dangerous code patterns. They cannot see business logic, so an app can pass every scan and still let a free user join someone else's paid team and spend their quota. This audit therefore has two halves: an automated pass, then manual tests that require judgment.

Work through the phases in order and produce the report at the end.

Phase 1 — Automated scan

Run the bundled script from the project root:

bash scripts/scan_repo.sh <project-path>

It checks for secret-looking values in client-reachable code, misuse of public env prefixes, admin/service keys, .env files tracked in git or present in history, and missing gitignore entries. It is deliberately noisy: it reports candidates, not verdicts.

Triage every hit into one of three buckets and say which:

  • Confirmed exposure — a real secret reachable by the browser or present in git history. Rotation is required; deleting the line is not sufficient.
  • Expected public value — publishable/anon/client keys are meant to be visible. Say so plainly rather than alarming the user.
  • Needs the provider's docs to classify — look it up in the provider's documentation before triaging; classification determines whether rotation is required.

Phase 2 — Manual tests (ask the human to run these)

These cannot be automated from the repository and they find the highest-severity issues. Present them as concrete instructions, wait for results, then continue.

  1. Two-account test. Create accounts A and B. Logged in as B, attempt to open, edit, and delete A's resources — by editing IDs in URLs, by calling API endpoints directly, by exports and share links. Anything that succeeds is a broken-access-control finding, and the delete case is more severe than the read case.
  2. Logged-out test. In a private window with no session, request the data endpoints directly. Any data returned is a finding.
  3. Production error test. On the live deployment, request a nonexistent route and force a failing action. Stack traces, SQL, or internal paths shown to the client must be replaced with a generic message.
  4. Leftover routes. List debug, test, and admin routes created during development. Confirm each is removed or authenticated on production.
  5. Client-side limit test. Pick one limit the UI enforces (plan cap, size cap, rate cap) and call the endpoint directly without the UI. If it succeeds, the limit exists only in the browser.

Copy this checklist and fill it in as each test completes, so progress survives a long session:

- [ ] Two-account test — result:
- [ ] Logged-out test — result:
- [ ] Production error test — result:
- [ ] Leftover routes — result:
- [ ] Client-side limit test — result:

Phase 3 — Account and budget controls

Ask directly, and record the answers:

  • Two-factor authentication enabled on source host, deploy platform, database, domain registrar, and every API provider? Account takeover bypasses all code-level work.
  • Hard budget caps and spend alerts configured in every provider that bills per use?
  • Secret scanning and push protection enabled on the repository?
  • Dependency update alerts enabled?
  • Separate credentials for development and production?

Phase 4 — Business logic review

Tooling cannot reach this layer. Read the app's own rules and ask what a motivated user could do within them. Prompts that surface real findings:

  • Which fields decide what a user is entitled to, and can the user write to any of them?
  • Can a user attach themselves to another user's team, workspace, or subscription?
  • Can a giveaway or free tier be claimed repeatedly with scripted signups?
  • Which actions cost money, and what is the maximum one account can spend in an hour?
  • If one credential leaked, what exactly would it reach?
  • Every field that determines entitlement (plan, quota, role, price) has been checked against who can write to it before moving to the report.

Report format

Use this structure exactly:

## Findings

### Critical — fix before launch
- [finding] — evidence: [file:line or test result] — fix: [specific action]

### Important — fix soon
- ...

### Confirmed fine
- [thing that looked alarming but is expected, and why]

## Not verified
- [what this audit could not check, and how the user would check it]

## Next three actions
1. ...

State the residual risk honestly. A clean scan means known patterns were absent, not that the application is secure — say that explicitly rather than letting a green result imply safety. After fixing every Critical item, rerun scripts/scan_repo.sh and repeat the two-account test before shipping.

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.