Secrets
Leaked keys and tokens in AI projects
A leaked key can matter more than the data sitting beside it. Revoke first, then find out what the key could reach.
Last reviewed against legislation.gov.uk, National Cyber Security Centre and OWASP GenAI Security Project. Sources

Two cases
Keys in the open
Wiz reported that the unprotected DeepSeek database held secret keys, API secrets and backend details alongside conversations [7]. Separately, Wiz found that a storage link published with Microsoft's AI research code gave full control of an entire storage account, far beyond the model files it was meant to share [8].
Response
What to do, in order
-
1
Revoke or rotate the key or token. For a shared storage link, invalidate it. Microsoft did so two days after Wiz reported the problem [8]. -
2
Work out what it could reach. A link scoped to a whole account exposes the whole account [8]. -
3
Check the logs for any use of the key. Wiz noted that links of this kind are hard to track and cannot be revoked one by one [8]. -
4
Search your own repositories and shared documents for the same secret. -
5
Treat everything the key could reach as potentially exposed, and take that into the reporting decision.
What went wrong
Patterns to look for
Prevention
Controls that help
Wiz's lessons from the Microsoft case included treating account-level tokens as seriously as the account key, using dedicated storage accounts for external sharing, and watching how tokens are used [8].
Related: exposed AI storage.
Check this instead of assuming
List every key and shared link that touches AI data, who created it and when it expires. Anything without an answer should be revoked and replaced.
Keep reading
Read next
Exposed storage
How to respond to an open AI database, log store or storage account: closing access, finding what was reachable and checking for misuse.
Read the guide
Staff and AI tools
How to respond when staff have entered personal or confidential data into a public AI tool: scoping, supplier requests, reporting and what to change.
Read the guide
Output leaks
What to do when an AI tool reveals one person's data to another, or discloses confidential content in its answers: scoping, containment and fixes.
Read the guideHow CyPro can help
Need a hand working through this?
Finding out whether an incident reaches you is one job. Checking your own systems, tightening access and briefing the board are several more. CyPro's responders and consultants can take any of them on.
Incident response
If you may already be compromised, our responders contain it, preserve the evidence, find out what was touched and get you running again safely.
More on cypro.co.uk
24/7 security monitoring
Our SOC analysts watch your systems day and night for the signs of an attack in progress: unexpected processes, new outbound connections, logins that do not fit.
More on cypro.co.uk
Fractional CISO for the board
A senior security lead who advises the board on what to fix first, what to accept and what to tell customers, and owns the decision record.
More on cypro.co.uk
Penetration testing
A focused test of your systems and the controls around them, so you know they hold before an attacker finds out for you.
More on cypro.co.uk
Hardening and segmentation
Our consultants put the controls in place that limit the damage when something is missed: firewall rules, network isolation and tighter admin access.
More on cypro.co.uk
Vulnerability scanning
Find every internet-facing system you run, including the forgotten ones, and see which are still on a vulnerable build.
See the scanning service
Talk to a specialist
Worried this affects you?
When data has leaked through an AI tool, its logs or its storage, the early decisions shape what you must report and to whom. An incident response team helps you contain the exposure, establish what was involved and prepare your notifications.