Case study - Technology - 20 October 2026

One key, many tools: bringing a software company's AI provider keys under control

We worked with a UK software company to find every AI provider key its teams had pasted into hosted tools, replace shared keys with scoped ones, and spot unusual spend before the invoice did.

Client

A UK software company with around 400 staff and about 90 engineers building AI features into its products

Sector

Technology

Engagement

AI key inventory, rotation, gateway design and spend monitoring - six-week programme.

The challenge

What the client needed

Within a year of starting to build AI features, the company had keys for three model providers living in more places than anyone could list: a hosted coding assistant, two workflow tools, a notebook service and several developers' shell profiles. Many were one shared key. The security lead asked a narrow question after OpenCode disclosed on 17 October that provider keys saved in its hosted Console may have been exposed: if a vendor of ours lost our keys tomorrow, how would we know, and how much could be spent before we did?

Our approach

How we worked

  • Listed every provider key by searching repositories, tool settings and secret stores, and asking each team where theirs lived.
  • Checked provider usage dashboards to see which keys were active, which were idle and which were being used from places we did not expect.
  • Issued a separate key for every tool and environment, each with a spend cap, then revoked the shared keys at the provider rather than just deleting them from the tools.
  • Routed production calls through an internal gateway so most tools never hold a provider key at all, and kept key custody with a small platform team.
  • Added secret scanning to repositories and chat exports for the common provider key formats, with a clear route to report an accidental paste.
  • Set alerts on daily spend and on use from new locations, routed to the on-call engineer, and wrote a one-page runbook for revoking a key at each provider.
Outcomes

Measured results

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

  • Every key found was either rotated or retired within the programme, and provider logs showed no use from unexpected locations.
  • The number of live keys fell from dozens, many shared, to a short list, each tied to a named owner and purpose.
  • Most developer tools now call the internal gateway, so a leak at a third-party tool exposes a short-lived token rather than a provider key.
  • A test spend spike on a sandbox key reached the on-call engineer in under fifteen minutes.
  • A rehearsed revocation of a key at all three providers now takes under half an hour.
"We kept asking whether the vendor was secure. We should have been asking why the vendor held a key that could spend our money."
- Head of Platform, 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

Teams were shipping AI features against a launch date, and nobody wanted a freeze on experiments. We began with the inventory and the usage review, which cost developers an hour each, and only moved tools behind the gateway once we could show it would not slow them down.

Why deleting a key from a tool is not enough

Several teams believed removing a key from a tool's settings had ended the risk. A provider key is a bearer credential: anyone with a copy can use it until the provider revokes it. The Hacker News report on the OpenCode incident makes the same point, noting that deleting a key from the Console does not revoke it and that a budget set inside a tool cannot cap spend made outside it.

Where control really sits

The assumption at the start was that the company needed a better list of vendors to trust. It needed fewer places where keys lived and a cap on what any one of them could spend. The inventory found the sprawl; the gateway and the per-tool caps limited what any single leak could cost.

Lessons learned

First, count where each key lives before arguing about controls, because the number is usually a surprise. Second, give every tool its own key and its own cap, so one leak is traceable and survivable. Third, rehearse revocation at every provider. A key you cannot revoke quickly is a key you do not control.

If your AI keys live in more places than you can name, we would be glad to talk. Email sales@halfteck.com.