Trust — is it safe?
Brief 81

Secrets & Credential Hygiene

Every hardcoded key, token, and password the repo carries — in source, config, and git history — plus how they rotate and who can read them.

SECRETS.md4 phases7 lenses~3.1k chars

Free & open · no signup · read-only — it ends by asking · nothing leaves your machine

What it does

You are working inside this repo. Mission: find every credential the codebase holds or handles — API keys, tokens, passwords, connection strings, private keys — wherever they hide, and judge how they are stored, injected, and rotated.

Read-only pass. Grep the tree and the git history, read config and CI, but change nothing; your only write is the report file. Never print a full live secret — mask all but the last four characters.

What it looks for

7 lenses it looks through

Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.

1

Hardcoded in source

keys, tokens, passwords, or private keys committed as literals

2

Buried in git history

secrets gone from HEAD but still reachable in old commits or tags

3

Leaked to the client

anything secret shipped in a frontend bundle, mobile app, or public asset

4

Weak storage

plaintext .env in the image, world-readable config, secrets in logs or traces

5

No rotation path

credentials with no way to rotate and no expiry

6

Over-broad scope

one god-key where a scoped, least-privilege credential would do

7

Unsafe handling

secrets on the command line, interpolated into URLs, or cached where they persist

The deliverable

What lands in your repo

One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.

SECRETS.md
1
Exposure summary
count by severity, and the must-rotate-now list up top
2
Findings
each: severity S1–S3 · location (file:line or commit) · masked value · blast radius · fix
3
Rotation & storage plan
where these secrets should live instead, and how they should reach runtime
4
Prevention
the pre-commit hook, scanner, or ignore rule that stops the next leak
One file. Evidence-backed. It ends by asking before touching anything.
How it works

What it makes the agent do

Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.

1
Phase 1

Map where secrets live

Inventory every place a secret could enter.

2
Phase 2

Audit through 7 lenses

Cite file and line for every finding.

3
Phase 3

Curate

Rank by blast radius × exposure.

4
Phase 4

Report

Create SECRETS.md at repo root.

Get started

Three ways to run this Goal Prompt

01 · COPY

Paste it in

Copy it and paste it into your agent inside the repo you want checked.

02 · INSTALL

As a slash command

Install the goal plugin once — two commands — then just type /goal:secrets-credential-hygiene.

1/plugin marketplace add GhostlyGawd/goal-prompts
2/plugin install goal@goal-prompts

Or install only this Goal Prompt as /goal-secrets-credential-hygiene:

curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=81 sh
03 · AGENT

From an agent (MCP)

Let an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.

https://goal-prompts.vercel.app/raw/81.md
Transparency

The exact prompt

Nothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.

Read the full brief (3,057 characters)
# Goal: Secrets & Credential Hygiene

You are working inside this repo. Mission: find every credential the codebase holds or handles — API keys, tokens, passwords, connection strings, private keys — wherever they hide, and judge how they are stored, injected, and rotated.

Read-only pass. Grep the tree and the git history, read config and CI, but change nothing; your only write is the report file. Never print a full live secret — mask all but the last four characters.

## Phase 1 — Map where secrets live
- Inventory every place a secret could enter: env files, config, CI/CD variables, Dockerfiles, k8s manifests, client bundles, test fixtures, seed scripts.
- Note how secrets reach runtime: env vars, a vault, a secrets manager, or hardcoded literals.
- Identify the blast radius: which secrets unlock production data, payments, or third-party spend.

## Phase 2 — Audit through 7 lenses
Cite file and line for every finding; mask the value.
1. **Hardcoded in source** — keys, tokens, passwords, or private keys committed as literals
2. **Buried in git history** — secrets gone from HEAD but still reachable in old commits or tags
3. **Leaked to the client** — anything secret shipped in a frontend bundle, mobile app, or public asset
4. **Weak storage** — plaintext `.env` in the image, world-readable config, secrets in logs or traces
5. **No rotation path** — credentials with no way to rotate and no expiry
6. **Over-broad scope** — one god-key where a scoped, least-privilege credential would do
7. **Unsafe handling** — secrets on the command line, interpolated into URLs, or cached where they persist

## Phase 3 — Curate
- Rank by blast radius × exposure: a production payments key in the client bundle outranks a dev token in a test.
- For each live exposure, state whether it must rotate now — assume anything ever committed is compromised.
- Separate "exposed today" from "fragile process"; both matter, but only one is on fire.

## Phase 4 — Report
Create `SECRETS.md` at repo root:
1. **Exposure summary** — count by severity, and the must-rotate-now list up top
2. **Findings** — each: severity S1–S3 · location (file:line or commit) · masked value · blast radius · fix
3. **Rotation & storage plan** — where these secrets should live instead, and how they should reach runtime
4. **Prevention** — the pre-commit hook, scanner, or ignore rule that stops the next leak

Start the report with today's date. If `SECRETS.md` already exists from a previous run, read it first and lead with what changed since.

## Rules
- Mask every value; a report that leaks a secret is the vulnerability
- Assume anything ever committed is compromised and must rotate
- No credentials, keys, or secrets in play in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding.
- If a `reports/` directory exists at the repo root, write the report there instead of the root.
- Before asking, present the top findings as a ranked list in plain words
- Report only — end by asking which exposures to rotate and remediate first

House rules for this Goal Prompt

  • Mask every value; a report that leaks a secret is the vulnerability
  • Assume anything ever committed is compromised and must rotate
  • No credentials, keys, or secrets in play in this repo? Say so in a one-paragraph null report and stop — a null result is a valid finding.
  • If a reports/ directory exists at the repo root, write the report there instead of the root.
  • Before asking, present the top findings as a ranked list in plain words
  • Report only — end by asking which exposures to rotate and remediate first
Keep exploring

More Trust briefs

Runs inside these playbooks — curated sequences you can launch with one paste: