AI Coding Speed Is Outrunning Secrets Security

AI Coding Speed Is Outrunning Secrets Security

Enterprise Developer Platforms

AI coding assistants can turn a week-long feature into an afternoon of prompting. What they can’t do is stop a developer from pasting a live API key into a prompt window — and new data shows that gap is widening fast.

34%
year-over-year increase in secrets detected on public GitHub repos in 2025

What Happened

HashiCorp’s security team laid out the scale of the problem in stark terms: nearly 30 million secrets were detected in public GitHub repositories in 2025 alone, a 34% increase year over year. Citing GitGuardian’s analysis, HashiCorp notes that secret leaks in AI-assisted code occur at almost twice the rate of the GitHub-wide average.

The mechanism is mundane, which is what makes it hard to police. Developers move fast with an AI assistant at their side, and speed produces shortcuts: “API keys are copied into prompts. Tokens are embedded into test environments. Service account credentials are reused across projects to accelerate delivery,” HashiCorp writes. None of this requires malicious intent or a sophisticated attacker — it’s the byproduct of normal AI-accelerated workflows running faster than the guardrails around them.

Why It Matters

Secrets sprawl isn’t a new problem, but AI coding tools change its shape in two ways. First, volume: a developer working with an assistant generates far more code, config, and test scaffolding per hour than one working unassisted, and every one of those artifacts is a potential place for a credential to land. Second, visibility: prompts, chat logs, and AI-generated test fixtures aren’t part of the code review paths most secret-scanning programs were built around, so credentials can leak through channels security teams aren’t watching as closely as pull requests.

The result is a detection-to-remediation gap that grows faster than headcount can close it. Scanning tools have gotten good at finding exposed secrets; they haven’t gotten proportionally better at telling a security analyst which of the thousands of findings in a given week represent real, exploitable risk versus dead credentials in an archived repo. HashiCorp’s proposed fix leans on Vault Radar’s new MCP server, which lets analysts query secret data with natural language — using AI to help triage the exposure problem AI helped create.

What This Means for Builders

For platform and security teams, the practical response isn’t a single tool purchase — it’s moving the control point earlier and making it continuous. HashiCorp’s recommended layering starts with prevention: IDE-level scanning, pre-commit hooks, and CI/CD pipeline checks that catch a secret before it’s committed, not after it’s already indexed by a scanner. That still leaves a category of leaks — pasted into a prompt, embedded in a throwaway test environment — that pre-commit hooks never see, which is why contextual, ongoing remediation (not one-time detection) has to be the second layer.

Teams already running HashiCorp Vault for centralized secrets management have a head start here: a managed credential can be rotated systematically the moment it’s flagged, while an untracked one requires manual investigation from scratch. The gap HashiCorp is describing hits hardest at organizations that never centralized secrets management in the first place — for them, AI-accelerated development isn’t creating a new risk so much as accelerating an existing one.

The So What

The rate gap is the number to hold onto: secrets are appearing at 34% growth year over year, and AI-assisted code leaks them at nearly double the platform-wide rate. That is not a problem detection tooling alone will close, because the leak sources — prompts, ephemeral test environments, reused service accounts — sit outside the pull-request review process most secrets programs were designed around. Security and platform teams adopting AI coding tools should treat secrets lifecycle management (prevention, contextual triage, and rotation) as a prerequisite to scaling AI-assisted development, not a cleanup task to schedule after the fact.

Source: HashiCorp

Content created with AI assistance and reviewed for accuracy.

💬

Join the conversation

Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.

Join Stack Insiders →

Newsletter coming soon.

Curated digests across AI, biohacking, photography, travel, and more. Be the first to know when we launch.