Back to Handbook
Security · Advanced
Data Breach Protocol
Containment & Remediation
The specific incident response plan for when an AI tool accidentally leaks secrets, PII, or proprietary code into a public model or log.
01
The 'Oh No' Moment
It happens. You pasted `.env` into ChatGPT, or the AI committed a hardcoded API key to a public GitHub repo. Speed is now your only metric.
1. Revoke
Kill Switch
Immediately rotate every key involved. Do not wait to confirm usage.
2. Scrub
Rewrite History
Use BFG Repo-Cleaner to remove the commit from git history completely.
3. Audit
Check Logs
Check API dashboards for usage spikes during the exposure window.
02
The LLM Leak Specifics
If you pasted sensitive data into a public model training window:
- Opt-Out Immediately: Go to the provider's 'Data Controls' and disable training on history.
- Delete Chat: Deleting the specific chat session often removes it from the immediate context training pool.
- Poison the Well: (Theoretical) Some security researchers suggest pasting 'junk' data afterwards to dilute the context, though efficacy is debated.
03
Prevention
The only fix is a pre-commit hook that blocks secrets.
Prompt
// .pre-commit-config.yaml
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.2
hooks:
- id: gitleaks