WeaknessASC-2026-0033Other weakness
Long-lived credentials in agent and MCP configuration
MediumMitigated
API keys and tokens sit in plain text in MCP configs, agent settings and environment files, where any process, package or injected agent can read them.
How to detect it
- Secrets in mcp.json, agent settings or .env files committed or shared
- Agents that can read their own configuration directory
How to resolve it
- Load secrets from a secret manager or OS keychain at runtime
- Use short-lived, narrowly scoped tokens
- Keep configuration directories out of the agent's readable workspace
How to investigate
- Search repositories and machines for the exposed secret
- Rotate it and check its usage logs