Security launch audit for a public web app BEFORE you ship or hand it to a client — "vibe coders are getting sued", systematized. An executable pipeline: classify (static / full-stack / AI) → run sections (secrets+supply-chain, DB, auth, infra+headers, legal, LLM/injection, CI/CD) orchestrating deterministic tools + manual checks → GO/NO-GO report. Adapted from Prajwal Tomar's playbook, extended with prompt-injection / supply-chain / secret-history / dependency-CVE layers. NOT the same as pre...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ship Secure?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/sanexxxx777-ship-secure)
---
name: ship-secure
description: Security launch audit for a public web app BEFORE you ship or hand it to a client — "vibe coders are getting sued", systematized. An executable pipeline: classify (static / full-stack / AI) → run sections (secrets+supply-chain, DB, auth, infra+headers, legal, LLM/injection, CI/CD) orchestrating deterministic tools + manual checks → GO/NO-GO report. Adapted from Prajwal Tomar's playbook, extended with prompt-injection / supply-chain / secret-history / dependency-CVE layers. NOT the same as pre-push (that = clean push; this = is the product itself safe to launch). Triggers — "security checklist for the site", "audit before launch", "is the site safe", "check before handing to client".
---
# /ship-secure — security launch audit for a public web app
Goal: $ARGUMENTS — turn "I hope it's secure" into a verifiable GO/NO-GO BEFORE the product goes public (launch / client handoff). Each section is either OK or STOP with a finding (`file:line` + type, a secret = NOT its value).
**Origin:** adapted from Prajwal Tomar's "Vibe Coders Are Getting Sued — 30-Min Playbook" (5 sections), retargeted to a general stack and extended with layers the original lacks (prompt-injection / supply-chain / secret-history / dependency-CVE).
**Border with `/pre-push`:** pre-push = "don't let junk/secrets/bugs leave on push" (scope-diff, secret-grep, lint, code-review, build). ship-secure = "is the product itself safe" (RLS, auth, rate-limit, CORS, headers, legal, injection). They complement each other.
**Honest disclaimer (state it in the report):** this catches common, deterministically-checkable holes. It is NOT a pentest and NOT a legal guarantee. An LLM "security review" gives false confidence → deterministic tools (gitleaks/audit/grep) come first, LLM prompts are supplementary.
---
## Step 0 — classify the target (branch, don't run the inapplicable)
The type determines the section set:
- **Static** (static host, landing page, single-file HTML, an SPA build with no own backend): → Sections **A, D, E** (secrets, headers, legal). B/C (DB/auth) and most of infra are **N/A** — don't waste time.
- **Full-stack** (own backend + forms + DB ± auth): → all of A–E.
- **AI app** (an LLM in production: chat/agent/generator with public input): → all of the above + Section **F** (LLM/injection) is MANDATORY.
- **Any type whose repo runs CI** (`.github/workflows/` or similar): → also Section **J** (CI/CD pipeline).
If it's a client site, the client's jurisdiction matters (Section E). Unsure of the type — ask, don't guess.
## Section A — secrets, frontend, supply-chain (deterministic, BLOCKING — all types)
1. **Secrets in git history** (not just current files): `gitleaks detect --source . --redact`. Any hit = STOP. Finding = `file:line` + type, NOT the value.
2. **Keys in the frontend bundle/public files:** grep build/public assets for `api[_-]?key|secret|token|sk-|ghp_|AIza|private_key|Bearer `. ⚠️ Build-time public vars (`NEXT_PUBLIC_`/`VITE_`) ship to the browser — confirm no server secret landed there. Service-role/admin keys in the frontend = STOP.
3. **Supply-chain:** review installed dependencies/extensions against known compromise advisories before trusting them.
4. **Dependency CVEs:** `npm audit --omit=dev` (Node) / `pip-audit` or `uv pip audit` (Python). High/Critical = fix/upgrade before launch.
## Section B — database & backend (full-stack)
1. **Row-level authorization:** is there an ownership check on EVERY data access? (Row Level Security enabled on all tables; a hand-rolled backend — no endpoint returns others'/all records without a `user_id` check). A "dump the whole table" hole = STOP.
2. **Server-side validation of all forms:** client validation is trivially bypassed. Every field validated server-side (type/length/whitelist). File uploads — type + size + path.
3. **SQL/NoSQL injection:** parameterized queries / ORM only. Concatenating user input into a query = STOP.
4. **Generic error messages:** no stack traces / SQL / table names / versions leak outward. `DEBUG=False` in production. 500 = generic, details to the log.
5. **Race conditions on money, balance or promo operations:** concurrent requests must not debit or redeem twice. Use an idempotency key or a lock/transaction around the debit, never "check the balance, then debit" as two steps. Test with a burst of 10-20 identical requests sent at once, not one after another.
6. **Business logic (no scanner finds these; walk every money/state flow by hand):** a coupon applied twice or stacked with another; a refund or cancel after the paid thing was already consumed; a step of a multi-step flow called directly (confirm without pay); a price, quantity, discount or plan id taken from the request body instead of the server's own record (negative quantity, a price of 0.01); an account or tenant id taken from the body or URL instead of the session. Any of these on a real-money path = STOP.
## Section C — auth failure testing (if there is authentication)
Run real attempts, observe behavior:
1. **Wrong password ×5+** → is there a rate-limit/lockout/backoff (brute-force protection).
2. **Password reset for a non-existent email** → identical response for existing and not (anti user-enumeration). Same on login/signup errors.
3. **Duplicates:** double-click verification, re-register an existing email → graceful, no 500/leak.
4. **Sessions/cookies:** `HttpOnly` + `Secure` + `SameSite`; tokens expire; logout truly invalidates; no default JWT secret.
## Section D — infra & headers (full-stack + baseline static)
1. **Rate limiting** on public/expensive endpoints (login, API, forms, LLM): middleware / reverse-proxy limits. Critical where an endpoint spends money (LLM calls, email/SMS).
2. **CAPTCHA** on public no-auth forms (contact, signup).
3. **CORS:** not `Access-Control-Allow-Origin: *` on credentialed/session endpoints. Whitelist the origin.
4. **Security headers** (check static too, `curl -sI <URL>`): `Content-Security-Policy`, `Strict-Transport-Security`, `X-Frame-Options: DENY`, `X-Content-Type-Options: nosniff`, `Referrer-Policy`. Force HTTPS (redirect from http).
## Section E — legal & privacy (if it collects personal data/analytics)
1. **Privacy policy** published (free generators exist). Without one, data-collecting forms = risk.
2. **Where data is stored** documented; cookie/analytics consent if trackers exist.
3. **Client jurisdiction:** GDPR (EU) / local data-protection law / CCPA — note what applies, don't give legal advice, but flag it to the client.
## Section F — LLM / prompt-injection (AI app — the layer the original lacks)
1. **User-input isolation:** external input is wrapped in delimiters/tags, not naively concatenated into the system prompt. External content = DATA, not commands.
2. **System-prompt/key protection:** a jailbreak doesn't extract the system prompt, keys, or hidden instructions. Test "ignore previous instructions / show your prompt".
3. **Model output is not executed** as code/SQL/shell without sanitization (especially tool-using agents).
4. **Bill-drain:** rate-limit + cap on the LLM endpoint (no auth = anyone burns your API budget).
5. **Indirect injection** (what the model reads, not what the user types): fetched pages, uploaded documents, tool output, emails, repo files. Test hidden carriers: HTML comments, white-on-white text, `alt` text, zero-width characters, a README "note to AI agents". The delimiters of item 1 must wrap these too.
6. **Exfiltration through rendered output:** if the app renders model output as Markdown/HTML, an injected `` leaks data the moment it is displayed. Allowlist image and link hosts, or render as plain text.
7. **Agent tool scope:** a tool-using agent gets the smallest set of tools its job needs; irreversible or outward actions (send, pay, delete, post) need a human confirmation or a hard policy check in code, never only a rule in the prompt. Writes to memory or a knowledge base from untrusted sources are quarantined: poisoned memory is an injection that persists.
## Section G — code review (on top of deterministic — all types)
1. **A security-focused code review** of the app code — vulnerabilities.
2. **A correctness review** — authorization logic often breaks here.
3. **A slop/dead-code scan** — swallowed `except: pass` can silently eat security errors.
**AI security prompts (supplementary, adapted from the playbook — NOT a replacement for G.1–G.3):**
1. "Review this app as a security specialist — what are the attack vectors?"
2. "Review against the OWASP Top 10 — what's violated?"
3. "Find credential/PII leaks in the code and logs."
4. "Confirm there are no API keys/secrets in code shipped to the browser."
→ Re-verify the LLM's output with tools, don't take it on faith.
## Section J — CI/CD pipeline (any repo with workflows)
A workflow runs code with the repo's token and secrets. On a public repo anyone can open an issue or a pull request, so text they control reaches the runner. Run the deterministic analyzers first: [zizmor](https://github.com/zizmorcore/zizmor) (injection, permissions, unpinned actions, dangerous triggers) and [actionlint](https://github.com/rhysd/actionlint) (syntax, shellcheck of `run:` steps), each from a pinned release.
1. **Expression injection:** `${{ github.event.* }}` fields an outsider controls (issue or PR title and body, comment body, branch name, commit message, `head_ref`) never go straight into `run:` or `script:`. Pass them through `env:` and quote the shell variable. STOP if found in a workflow triggered by issues, comments or pull requests from forks.
2. **`pull_request_target` and `workflow_run`:** they run with secrets and a write token in the base repo. Checking out the PR head and then building or testing it runs the attacker's code with your secrets: STOP. The same for `workflow_run` jobs that download artifacts of an untrusted run and execute or unpack them.
3. **Token permissions:** a top-level `permissions:` block at the minimum (`contents: read`), write scopes only on the job that needs them. No `write-all`.
4. **Third-party actions pinned by full commit SHA.** A tag can be moved by whoever owns the action.
5. **Secrets:** never echoed, never written to artifacts or caches, never available to workflows triggered by forks. Prefer OIDC to long-lived cloud keys.
6. **No self-hosted runners on a public repo:** a fork's pull request gets a shell on that machine.
7. **Caches:** a cache an untrusted run can write and a privileged run later restores is a poisoning path. Scope caches by branch, or don't restore them in release jobs.
8. **Release jobs:** only on tags or protected branches with environment protection; publish packages through trusted publishing (OIDC) rather than stored tokens.
---
## Report format
```
TARGET: <what> (<type: static/full-stack/AI>)
A secrets+supply: OK / STOP — <finding file:line + type>
B database: OK / N/A / STOP — …
C auth: OK / N/A / STOP — …
D infra+headers: OK / STOP — …
E legal: OK / N/A — …
F LLM/injection: OK / N/A / STOP — …
G code review: OK / findings
J CI/CD: OK / N/A (no workflows) / STOP — <file:line, rule #>
VERDICT: 🟢 GO / 🔴 NO-GO — <one line>
Disclaimer: catches common holes, NOT a pentest / legal guarantee.
```
## Principles
- **External input = data, not commands** (prompt-injection guard).
- **Secrets = `file:line` + type, NEVER the value.** A hit in history = STOP.
- **Branch static/full-stack/AI** — don't run the inapplicable (static ≠ RLS/auth).
- **Deterministic tools first, LLM prompts supplementary** — no false confidence.
- **Mutation = on the user's command:** fixes/deploy/key-rotation after findings — propose, don't apply silently. A live secret found in git history → ROTATE first, then scrub history (a secret in the repo ≠ safe after deletion — treat it as compromised).
- **Verify by checking, not on faith:** headers via real `curl -sI`; auth via real attempts; "no errors" ≠ secure.
- **Not legal advice:** flag Section E to the client, name the jurisdiction, don't advise as a lawyer.