Railway Security Pack: Secrets Audit + Post-Breach Check
Two skills for Railway and Supabase projects that belong together. The Post-Breach Check walks your agent through what to look at right after a platform incident: which variables were exposed, what to rotate first, and what to check in your logs. The Secrets Audit is for the cleanup after that, and for keeping things tidy going forward. It inventories every secret by name, flags copies and unsealed values, and runs key rotation step by step without your agent ever seeing a secret value. Nothing changes without your OK. Bought together, it's $29 instead of $36.
Works with any agent that signs in to Agensi, such as Claude, ChatGPT, Claude Code, Cursor and Codex CLI.
One payment, lifetime access. 2 skills unlock instantly in your library.
What's included
2 skillsAudit every Railway env var (masked, never printed in full), seal and dedupe secrets into shared variables, move services to Supabase's new sb_secret keys one at a time, disable legacy JWT keys, and lock down RLS/grants. Every change needs your OK and has a rollback.
A guided checklist after Railway's October 2026 incident: names-only inventory of your secrets, a rotation plan (new key, redeploy one service, verify, then revoke), public database check, access review and a final report. Asks before every change; never prints a value.
See it in action
Railway + Supabase Secrets Audit & Key Rotation
Example session with this skill installed
Audit the secrets in my Railway project acme-demo (production only) and plan how to get our services onto the new Supabase keys. Start with the read-only part.
- Read your context and instructions
- Compiled the railway + supabase
(Excerpt from a longer session. Fictional demo data.)
Before I run anything, here is how I'll work:
- I will never print a full secret value. Every variable listing is piped through scripts/mask_vars.py, which shows only the first 4 characters, the length, a shape label and a session fingerprint.
- Anything else that could hold a secret (cron jobs, policies, logs, API responses) is reported as names, counts and yes/no flags only.
- I won't write secrets to disk or send them anywhere. Only Railway (your CLI) and your own Supabase project are contacted.
- Nothing changes without your explicit "yes" for that one step, and each step comes with its rollback.
Scope confirmed: acme-demo / production (api, worker, dash) and Supabase project acme-demo-db. Quiet window 09:00-10:00. Rollback targets recorded: api d-51be07, worker d-7c41e2, dash d-0a9f33.
PHASE 1: MASKED INVENTORY
| scope | variable | secret? | shape | masked | fp |
|---|---|---|---|---|---|
| production/api | SUPABASE_SERVICE_KEY | YES | supabase-legacy-jwt:service_role | eyJh…(len=219) | 3f9a1c07 |
| production/worker | SUPABASE_SERVICE_ROLE_KEY | YES | supabase-legacy-jwt:service_role | eyJh…(len=219) | 3f9a1c07 |
| production/api | SUPABASE_ANON_KEY | public-ish (legacy anon) | supabase-legacy-jwt:anon | eyJh…(len=208) | 81d0e2b4 |
| production/api | STRIPE_KEY | YES | opaque-token | rk_t…(len=107) | 9b02d4e6 |
| production/worker | STRIPE_KEY | YES | opaque-token | rk_t…(len=107) | c71e55a0 |
| production/dash | SUPABASE_KEY | YES | text | demo…(len=20) | 77ac0f13 |
PHASE 2: FINDINGS
- Duplicate: fp 3f9a1c07 is the same service_role key in api and worker under two names. You confirmed in the Variables tabs that both are literal copies, not references. Plan: one sealed shared variable SUPABASE_SECRET_KEY, referenced as ${{shared.SUPABASE_SECRET_KEY}}.
- Drift: STRIPE_KEY differs between api and worker. Please tell me which one is current; I won't guess.
- Dead: api/SUPABASE_ANON_KEY has 0 references in the api repo (searched by name; .env files listed by name only).
- Suspicious: dash/SUPABASE_KEY is 20 characters, too short for any Supabase key. The dashboard may already be failing.
- Client readiness: worker has supabase-py 2.18.1 installed (accepts sb_secret keys); api has 2.9.0 and must be upgraded first.
PHASE 5a: SUPABASE AUDIT (read-only)
- B: 12 tables have RLS off and anon INSERT/UPDATE/DELETE. CRITICAL.
- G: 3 RPCs anon can execute, 1 is SECURITY DEFINER.
- H: default privileges make every new table in public anon-writable.
- J: auth.users = 0, so authenticated can be locked down with anon.
PROPOSED PLAN (nothing has changed yet)
- You create a secret key "backend-2026-10-14" in Supabase and paste it into a sealed Railway shared variable. Rollback: delete the shared variable.
- worker: SUPABASE_SERVICE_ROLE_KEY=${{shared.SUPABASE_SECRET_KEY}}, redeploy. Rollback: dashboard Rollback to d-7c41e2; legacy keys stay enabled.
- api: upgrade supabase-py, then the same swap. Rollback: d-51be07.
- Save the grants snapshot, then DB batch L1-1: revoke anon writes on 6 low-traffic tables, keep SELECT. Rollback: restore from the saved snapshot, or run the L1 undo block (one or the other, never both).
- After a 48 h soak and an API-log check for legacy-key traffic, you disable the legacy keys. Rollback: re-enable.
Please answer the STRIPE_KEY question and reply "yes" to item 1 when you're ready.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads these skills and uses them on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every skill in this bundle goes through our trust checks.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.