SecretSleuth Talk to IronTech

DocsWorkflows

AI coding assistants

Copilot, Cursor and agent tools ingest the workspace. Secret Sleuth keeps real values out of the repository and refuses to stage keys an assistant pastes into a protected file.

Why this matters

Modern assistants do not just autocomplete. They ingest repository files into prompt context, index the workspace, and in agent mode run terminal commands as you. A credential pasted into appsettings.json “just to test locally” is indexed the moment the file is saved, whether or not it is ever committed.

What Secret Sleuth changes

  • Real values leave the repository. After a scan, the repository holds placeholders. Development values live in local stores, such as .NET User Secrets or the Secret Sleuth profile store. A profile location is outside the repository, but an assistant with access to your machine may still be able to read it.
  • Assistant-written secrets are refused. When an assistant edits a protected file, stage checks the edited lines with the same rules. If an agent copies or invents a hard-coded key, stage refuses to write it to the index.
  • The pull-request gate catches the rest. A dry-run scan in CI blocks any new raw secret before it merges.

Guidance for teams

  1. Mind open tabs. GitHub Copilot treats open editor tabs as high-priority context, regardless of .gitignore. Never open environment.local.ts, .env.local, or pre-scan backups in an editor. There is nothing to edit in them.

  2. Review agent terminal commands. Do not auto-approve commands that read outside the repository or dump environment variables (cat ~/.ironforge-secretsleuth/..., Get-ChildItem env:).

  3. Configure content exclusions. With Copilot Business or Enterprise, an administrator can exclude:

    **/*.env*
    **/environment.local.ts
    **/.ironforge-secretsleuth/**

    Check current coverage: GitHub documents that exclusion does not apply to every Copilot surface.

  4. Delete pre-scan backups. Untracked files are copied to ~/.ironforge-secretsleuth/backups/<repo-hash>/<timestamp>/ before obfuscation. Once your values are in a store and the app runs, delete them. They are plain text.

  5. Use cheap local credentials. Dev-only, low-privilege values (a local database, a dev Firebase project, a test tenant) mean an accidental exposure has a small blast radius.