Incident report
GitHub Copilot & Code-Model Hardcoded Secret Memorization & Reproduction Disclosures
Empirical security audits (including 2023 peer-reviewed studies by Huang et al. and follow-up evaluations across GitHub Copilot and commercial code models) demonstrated that large code-completion models trained on public GitHub corpora memorized real hardcoded credentials, API tokens, and private keys present in historical commits. When prompted with specific repository file headers, author context, or variable prefixes, models reproduced valid-format credentials and verbatim licensed code snippets, bypassing optional public-code filters via minor prompt rephrasing. The findings confirmed that training-data memorization turns historical repository secrets sprawl into a persistent inference-time leakage channel. Code-assistant providers responded by deploying pre-training secret scrubbing, real-time secret-scanning output filters, and stricter deduplication pipelines.
Incident record
- Reported
- Severity
- High
- Vector
- Data Exfiltration
- Affected system type
- Code-Completion Foundation Models Trained on Public Repositories
- Reference URI
https://arxiv.org/abs/2308.05044
Defensive lesson
Scrub secrets and deduplicate code corpora before pre-training and run real-time entropy/regex secret filters over code-completion outputs.
Research citation
Referenced techniques
- Acquire Public AI Artifacts: Datasets AML.T0002.000
- Unsecured Credentials AML.T0055
- Outputs from AI Models AML.T0135
- Training Data Information from AI Models: Extract Memorized Data AML.T0137.003