AI coding tools and SDKs

AI coding chat logs are an API key leak surface

Scan agent transcripts and tool output before sharing them. A secret can enter the transcript through a file read or a command result without ever being pasted into a prompt.

A November 2026 finding teams can act on

Backslash Security reported finding 708 exposed secrets in 255 of the 2,504 public GitHub repositories it sampled. The researchers selected repositories that contained AI coding tool artefacts. The sample does not estimate a leak rate for all GitHub repositories or all developers who use coding agents.

The finding worth changing your workflow for is how the secret got there. An agent can read a configuration file, run a command that prints an environment value, or include a token in a diagnostic message. The resulting transcript can later be attached to an issue or picked up by a broad commit.

“7 in 10 secrets ended up in the logs as a result of the agent's own actions”

Backslash Security research, 25 November 2026

Draw the full path from terminal to model

  1. Record which files and commands your coding client can see. Run it with a minimal development environment and keep real production credentials outside that boundary.
  2. Use demo fixtures and redact verbose command output before it reaches model context. Keep session history, tool traces and debug dumps out of repos and shared logs unless they have been scanned.
  3. Add local and CI scanning for the artefacts your tools actually create. GitHub push protection can catch supported patterns on pushes, while a local scanner can also check untracked files before they are attached elsewhere.
  4. Place the approved model request path behind a redaction gateway where the client supports it. Then verify a staged request from each feature appears in gateway usage.

A safe test for your team

Use a fictional key in a test fixture and exercise a normal task. Review agent-visible file contents, command output, the resulting transcript and the staged diff. If a known real secret was already exposed, revoke it and reissue a restricted key before cleaning up its copies.

References

Practical guides