DocsWorkflows
After remediation
Adopting Secret Sleuth does not change how your team uses git forever. Once secrets are out and files unfrozen, plain git works everywhere again.
Two phases
While remediating. Files holding placeholders are sealed. For those files only, developers use stage, pull and branch-switch. Everything else is plain git.
After remediating. Real secrets live in User Secrets, Key Vault, or profile stores. The placeholders in the repository have been replaced with safe committed defaults ("", environment variable names, Key Vault references), and those files are committed. Then:
SecretSleuth unfreeze --all
From here git status, git add, git commit, git pull and git checkout all work normally.
Then choose an operating model
Option A: clean and walk away
Treat Secret Sleuth as a one-time migration. Remove the hooks and uninstall:
SecretSleuth restore --all --remove-hooks
dotnet tool uninstall --global IronForge-SecretSleuth
Watch for: developers drifting back to pasting credentials under deadline pressure; no local interceptor when an assistant writes a key; the CI gate becoming your only line of defense; new hires asking for credentials over chat.
Option B: keep it installed as a guard
Files are unfrozen, but the hooks stay. Developers use 100% standard git. The pre-commit hook runs on every commit and passes silently when nothing is staged with a placeholder.
It still blocks an accidental placeholder commit, the CI gate still catches raw secrets, and status audits the repository on demand.
To add a new secret setting under Option B:
- Add the key with an empty default (
"SendGrid": { "ApiKey": "" }) toappsettings.jsonorenvironment.ts. - Commit it with plain
git addandgit commit. - Save your local value in User Secrets (
dotnet user-secrets set, or the setup script). - Save the production value in the pipeline’s variable group.
Comparison
| Git operation | While remediating | Option A | Option B |
|---|---|---|---|
| Editing normal code files | plain git | plain git | plain git |
| Editing config files | stage --file <path> | git add | git add |
| Pulling | SecretSleuth pull | git pull | git pull |
| Switching branches | branch-switch | git checkout | git checkout |
| Accidental placeholder commit | Blocked | Not blocked | Blocked |
| Raw secret in a pull request | Blocked in CI | Blocked in CI | Blocked in CI |
Keep the pre-commit and CI guards if they remain useful after remediation; the package handoff does not prescribe a fixed retention period.