AAK-TRUST-005: Custom API base URL for any provider
- Severity
- HIGH
- Category
- Trust Boundaries (
trust-boundary) - Scanner
agent_audit_kit/scanners/trust_boundary.py- Auto-fixable
- No.
- SARIF name
CustomApiBaseUrlOverride
What it detects
An environment variable matching *_BASE_URL, *_API_URL, or *_ENDPOINT is set in project settings. This can redirect authenticated traffic to attacker-controlled servers.
How to fix
Set API URLs only in user-level configuration or system environment variables.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-TRUST-005
Limitations
Matches env names that end in _BASE_URL, _API_URL or _ENDPOINT. Other spellings that point a client at another server (OPENAI_API_BASE, LLM_GATEWAY_URL) are not matched.
References
- CVE: CVE-2026-21852
- OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-REDIRECT-02 (API URL Redirect)
- CSA AI Controls Matrix (AICM): IAM-16
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-TRUST-005.md: the page then shows that text, with the registry reference appended under it.