38.9% of AI-generated pull requests contain security smells, 99.6% are hard-coded credentials
Agent-generated code introduces widespread security smells, with humans adding most leaked secrets and reviews missing 81.1% of them
Security & privacy arXiv 14 Jul 2026 Measurement Real-world evidence
Published as “Trust but Verify? Uncovering the Security Debt of Autonomous Coding Agents”
Why it matters
The results indicate an urgent need for context-aware security guardrails embedded directly in human-AI collaborative development tools.
Summary
The study finds that 38.9% of autonomous coding agent-generated pull requests contain at least one security smell, with hard-coded credentials making up 99.6% of critical-severity smells, and that human collaborators introduce 67.6% of genuine leaked secrets which 81.1% of existing review processes fail to detect. The evidence comes from a large-scale analysis of 16,112 file changes across 4,022 PRs using a validated LLM-as-a-judge framework and manual qualitative analysis.
What they found 4
- 38.9% of agent-generated PRs contain at least one security smell
“Our results reveal that 38.9% of agent-generated PRs contain at least one security smell”
- Hard-coded credentials constitute 99.6% of all critical-severity security smells
“hard-coded credentials constitute 99.6% of all critical-severity security smells”
- Human collaborators introduce 67.6% of genuine leaked secrets
“human collaborators are responsible for introducing 67.6% of genuine leaked secrets within these agent-assisted workflows”
- 81.1% of leaked credentials go undetected by existing review processes
“existing automated and human review processes fail to detect 81.1% of these credentials prior to integration”
Caveats 1
- Human collaborators, not the agents, are responsible for the majority (67.6%) of genuine leaked secrets, suggesting that the risk is not solely attributable to the autonomous coding agents.
What’s new here 4
- Systematic, large-scale measurement of security smells specifically in agent-generated pull requests.
- Application of a validated LLM-as-a-judge framework to assess security code quality.
- Quantification of human contribution to leaked secrets within AI-assisted workflows.
- Identification of supply chain integrity issues as the dominant class of detected smells.