Skip to content

[feature] Secret tripwire — detect & block secrets in scratches #9

Description

@rwrife

Pitch: AI coding agents and tired humans leak secrets into scratch files. Warn when a scratch looks like it holds an API key / .env-style secret, and refuse to promote it into a repo without an explicit override.

Acceptance criteria

  • Heuristic scan for common secret shapes (AWS keys, *_API_KEY=, private-key headers, long high-entropy tokens)
  • sp ls flags scratches that tripped the detector (e.g. a 🔑 marker)
  • sp promote blocks on a tripped scratch unless --allow-secrets is passed
  • sp scan <id> reports findings with line numbers (no secret values echoed in full)
  • Detector lives in its own package with unit tests over fixture files

Notes

  • Don't print full secret values back to the terminal — mask them.
  • Keep heuristics conservative to avoid alarm fatigue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature / backlog item

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions