Case study - Technology - 7 November 2026

Approved once, committed for good: finding the passwords AI coding assistants wrote into project settings at a UK software company

We worked with a UK software company to find out which secrets its coding assistants had saved into repositories, rotate them in order of risk, and stop the next one before it was committed.

Client

A UK software company with around 300 staff and 90 engineers using AI coding assistants daily

Sector

Technology

Engagement

Repository and history review, credential rotation, developer guidance and pipeline controls - six-week programme.

The challenge

What the client needed

When researchers at Apiiro reported that a command approved with "don't ask again" in a popular coding assistant can leave its password or token in plain text in a local settings file, the client's security lead had one question: did any of those files sit in our repositories? Nobody knew. Secret scanners were in place, but they were tuned for key formats, not for a database password typed after a command-line flag. And the assistants themselves sometimes committed the file as part of a normal change.

Our approach

How we worked

  • Searched every repository and its full history for assistant folders and settings files, not only the current default branch.
  • Extracted the approved command rules and reviewed them by hand for passwords, tokens and connection strings, then ranked each by what it could reach.
  • Rotated the confirmed secrets, public-facing databases and servers first, and checked access logs around each for use from unknown places.
  • Removed the files from tracking and history, added the paths to the organisation's ignore templates and blocked them at push time.
  • Extended scanning to catch credentials inside commands, then wrote a one-page guide for developers on approving patterns rather than exact commands and calling secrets by variable.
  • Treated assistant folders on laptops as sensitive in endpoint policy, the same as local environment files.
Outcomes

Measured results

Results confirmed with the client. Names, counts and platform details withheld in line with our standard confidentiality terms.

  • Every credential found in assistant settings files was rotated within the programme, and logs showed no use from unexpected locations.
  • The files were removed from tracking and history in all affected repositories and added to organisation-wide ignore templates.
  • Scanning now flags passwords typed inside commands, which the previous tooling missed in our test set.
  • A test commit containing an approved command with a secret was blocked before reaching the shared branch.
  • Developers moved to pattern-based approvals and secrets referenced from the company's vault.
"We had a policy about secrets in code. We had no policy about secrets in the folders our tools make for us."
- Head of Security, UK Software Company

Working on something similar?

If this engagement looks like the kind of problem you are facing, we would be glad to compare notes by email.

sales@halfteck.com

Context and constraints

Engineers were mid-release and had no appetite for a blanket ban on assistants, which they valued. We agreed the work would not slow them: discovery and rotation first, which need nothing from developers, then guardrails that make the safe way the easy one.

Why a clean scan was not reassuring

The reported research found that the two best-known open-source scanners each missed a large share of the affected files, mostly because the secret was a plain password after something like a database client flag rather than a recognisable key. We saw the same pattern in our own test set. A scanner only finds what it was taught to recognise, so we taught it the shape of a command line.

The folder nobody owned

Assistant folders sit in the awkward space between source code, personal configuration and tooling. No team owned them, so no policy covered them. Once we assigned them the status of environment files, with ignore rules, push-time blocking and endpoint policy, the rest followed. The public reporting also noted that the assistant's own bug tracker had closed related reports automatically, which is a fair reason to plan on controlling this yourself.

Lessons learned

First, search history, because deleting the file today does not erase last year. Second, rotate before you clean, or the cleanup tells nobody anything. Third, approve patterns, not exact commands. The same convenience that saves ten seconds a day can quietly write a password to disk.

If you want to know what your tools have been writing into your repositories, email sales@halfteck.com.

Source: The Hacker News, 7 November 2026.