FrançaisChoose your hat

Procedure · Developer

Protect secrets

Keep keys and passwords out of the code and the repository, put each in the right place, and run the leak response in the right order if one is exposed.

Specialties: Website or web app, Mobile app · Checked 6 December 2026

Steps the AI follows

  1. List the secrets by name and by where they must live
  2. Check .gitignore
  3. Search for leaks
  4. Put each secret in its place
  5. Use narrow keys
  6. Turn on automatic detection
  7. If a secret is exposed
  8. Record

Reference sheets it uses

  • Secrets: where to keep them and what to do after a leak
    Where each kind of secret belongs, how to spot a leak, and the order of actions when a key is exposed.
  • Restore points with Git
    The .gitignore file, Git commands ranked from safest to riskiest, and what a code rollback does not bring back.

The full text of each step, the checks and the reference sheets are served to your AI by the hat’s MCP server, once you subscribe.

Sources

  1. OWASP Secrets Management Cheat Sheet
  2. GitHub Docs: About secret scanning
  3. GitHub Docs: Removing sensitive data from a repository
  4. Stripe Docs: Best practices for managing secret API keys