Documented Incident · INC-OBS-067 · High severity

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 dossier metadata

Case ID
INC-OBS-067
Classification
Incident
Date
Severity
High
Sector
Software Development & AI Tooling
Attack vector
Data Exfiltration
System type
Code-Completion Foundation Models Trained on Public Repositories
Reference URI
https://arxiv.org/abs/2308.05044

Inspect INC-OBS-067 in Interactive Incidents & Cases Hub

Defensive takeaway

Scrub secrets and deduplicate code corpora before pre-training and run real-time entropy/regex secret filters over code-completion outputs.

Mapped AI security techniques

Mapped defensive controls

Source citation records