Home / Companies / GitGuardian / Blog / Post Details
Content Deep Dive

Leaked API Keys in LLMs: How AI Agents Expose Secrets

Blog post from GitGuardian

Post Details
Company
Date Published
Author
Dwayne McDaniel
Word Count
2,270
Company Posts That Month
10
Language
English
Hacker News Points
-
Post removed?
No
Summary

AI coding agents can expose API credentials by reading local files, command histories, logs, cloud configurations, or MCP server responses and sending that information into large language model context, even when developers never paste secrets directly into prompts. Cited black-box research reported that researchers recovered credential strings from Qwen3-27B, GPT-Codex 5.3, and Claude Haiku 4.5 through API outputs alone, with each recovered key matching a public GitHub occurrence, suggesting that publicly leaked secrets can persist into deployed models. The text also highlights the scale of public and endpoint-based exposure, noting millions of hardcoded secrets found in GitHub commits, higher reported secret-leak rates in Claude Code-assisted commits, and credentials stored locally that may never enter source control. It distinguishes prompt exposure from model training, arguing that a credential need not become training data to create a security risk once it leaves a developer environment. As mitigations, it advocates reducing plaintext credentials on developer devices, using managed secret vaults and narrowly scoped access, and applying deterministic scanning controls before prompts, tool calls, file reads, shell commands, and tool outputs reach an LLM; it presents GitGuardian’s AI Hooks, ggshield, and Developer Endpoint Protection as tools intended to provide these protections across individual and managed developer environments.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
LLM 30 4,083 814 190 -32%
Secrets Management 30 2,009 407 114 -2%
AI Agents 16 4,217 1,050 221 -25%
MCP 11 8,319 780 197 -21%
AI Coding Assistant 4 1,334 355 110 -16%
Harness engineering 1 106 70 37 -35%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.