AI Credential / Secret Exposure
Testing the common places an AI application's API keys, model credentials and tool secrets end up exposed — logs, prompts, client code and error messages.
- Category
- AI Identity & IAM
- Difficulty
- Foundational
- Last Updated
- 20 September 2026
Lab detail
Objective
AI applications accumulate credentials fast — model-provider API keys, vector-database credentials, tool/API secrets for whatever the agent can call — and the usual places secrets leak (client-side code, verbose logs, error messages, and now prompts/tool arguments) apply here too, with a few AI-specific additions. This lab will build a reference application and audit it end-to-end for secret exposure.
Planned Scope
- Build a reference AI application using several categories of credential (model API key, vector-DB credential, tool secret).
- Audit logs, prompts, tool-call arguments, client code and error output for exposure.
- Test whether a model can be induced to echo a secret it has legitimate access to (e.g. from a system prompt or tool response).
- Document secrets-management patterns specific to LLM/agent architectures.
Framework Mapping
Referenced frameworks
Exact control-ID mappings are to be validated as this lab progresses — see the full Frameworks reference.
Responsible Use / Safety Notes
How this lab is run
This lab uses synthetic data and controlled environments. It is intended to demonstrate defensive AI-security principles and does not contain customer data, production credentials or intentionally weaponized exploit infrastructure.
A decision is waiting for sign-off. Get an independent view first.
Tell me what is being decided and what is at stake. I will first say honestly whether my experience fits — then we talk about scope, not before.
Or connect on LinkedIn first.