Control · C-030 · Security & Resilience
Secrets management for AI
Credentials used by AI systems are held in a vault, supplied at run time, kept out of prompts, configuration and notebooks, scoped narrowly and rotated.
- Control type
- Preventive
- Family
- Risks addressed
- 3
- Audience
- Heads-of · Practitioner
- Frameworks
- AML.M0012 · Article 32
- Responsible AI domain
- Lifecycle stage
- Reviewed
- 2026-11-10
What it does
It keeps credentials out of the places where models, users and attackers can read them, and limits the value of any that leak. Security owns the standard and the scanning; each system owner is accountable for the credentials the system uses. It applies from the first experiment onward.
How to implement it
- Store provider keys, tool tokens and data source credentials in a managed vault.
- Inject them into the calling code at run time; never place them in the model's context.
- Issue separate credentials per system and per environment, with the least scope that works.
- Set expiry and rotate on a schedule and on any suspected exposure.
- Scan repositories, notebooks, prompts and logs for secrets continuously.
- Redact credentials from conversation logs and agent memory.
Evidence it operates
Design: a standard naming the vault and the prohibited locations. Operation: scan results with findings closed; an inventory of AI credentials with owner, scope and last rotation; provider logs showing use only from expected systems.
Where it fits
Established at design and maintained throughout. It is the primary control for exposed AI credentials and secrets and supports least-privilege agent identity.
Limits
It protects credentials at rest and in configuration. A tool that returns a secret in its output, or a user who pastes one into a conversation, puts it back in context. Short-lived credentials reduce that exposure and do not remove it. A leaked provider key should be assumed used: revoke it, review the provider's usage logs for the period, and check which stored conversations or tuned models it could reach.
Risks this mitigates
Primary mappings
- Exposed AI credentials and secrets High
- Holds credentials in a vault and injects them at run time so they never sit in prompts or configuration. API keys, tokens and connection secrets sit in prompts, agent configuration, notebooks or logs, where the model or an attacker can read and reuse them.
Supporting mappings
- Agent identity and privilege abuse High
- Keeps credentials out of the agent's readable context. An agent inherits, shares or escalates credentials and delegated authority beyond what its task needs, so a compromise or error acts with far wider access than intended.
- System prompt leakage Medium
- Removes credentials from prompts so a leak discloses nothing reusable. The instructions given to a model are extracted or inferred by a user, exposing configuration, restriction logic and anything sensitive that was placed in them.
Framework and clause references
| Framework | Clause | Title |
|---|---|---|
| MITRE ATLAS | AML.M0012 | Encrypt Sensitive Information Protection of sensitive information. |
| UK General Data Protection Regulation | Article 32 | Security of processing Security of processing. |
Related terms
How to cite
Axiom Verity (2026). Secrets management for AI. Reference Library, C-030. https://axiom-verity.com/controls/secrets-management-for-ai. Reviewed 2026-11-10.
Found an error or a better source? Report a correction.