AI Coding Assistants and the Secret-Sprawl Curve

The prompt was not source code—until its answer was

A developer pastes a failing configuration and asks an assistant to repair it. The input includes a token. The generated answer preserves that token in a code block. The developer copies the answer into a Jira issue, then commits the corrected file.

One credential has now crossed an AI service, a collaboration tool, and git. A repository-only control sees the last copy, if its pattern is supported.

GitGuardian’s State of Secrets Sprawl 2025 scanned 69.6 million public repositories for its 2024 analysis. It reports a 6.4% secret leakage rate among public repositories using GitHub Copilot, 40% higher than the overall public-repository average. This is observational vendor research. Repository type, contributor behavior, project activity, and detection changes may confound the association; the data does not prove Copilot caused the leaks.

Four-boundary AI development flow showing a secret entering an assistant prompt, surviving in generated output, being pasted into Jira or Confluence, and reaching git; controls are required at every transition.

Correlation is enough to reject a single checkpoint

The finding supports a narrower, defensible conclusion: teams adopting high-throughput AI workflows should not assume their existing pre-commit scanner covers the new data paths. Prompts, chat transcripts, generated files, terminal output, and issue comments may all carry secrets.

Build controls at four boundaries:

  1. Before input: strip credentials, customer data, and private keys from prompts and logs.
  2. After generation: review generated configuration as untrusted code; do not accept invented placeholders that resemble live tokens.
  3. Before persistence: scan commits and generated artifacts, including files normally omitted from human review.
  4. At collaboration: detect secrets in Jira and Confluence where debugging context is shared.

GitHub’s push protection documentation explains that supported secrets can be blocked before reaching a repository, but contributors may bypass blocks and custom patterns require configuration. That is a valuable checkpoint, not a complete information-flow policy.

Give the model ciphertext, not authority

For project configuration, envseal keeps encrypted values in git and injects plaintext at runtime. An assistant working on the repository can reason about variable names and structure without receiving the values. For Jira and Confluence, Secret Sentinel can redact supported credentials when the human workflow still leaks one into a page, issue, or comment.

The goal is not to prohibit AI. It is to keep increased generation speed from multiplying the number of systems that receive reusable authority.

Frequently asked questions

Do AI coding assistants cause secret leaks?

Current public observational data shows an association between assistant-using repositories and higher secret exposure, but it does not isolate causation. The safe conclusion is to add controls at AI input, generated output, commit, and collaboration surfaces.

Should developers paste production logs into an AI assistant?

Not unless an approved enterprise configuration and data-handling policy explicitly permits it. Redact credentials and customer data first, and prefer synthetic reproductions.