AAK-AGENT-002: Agent instruction file links an external host
- Severity
- LOW
- Category
- Agent Config (
agent-config) - Scanner
agent_audit_kit/scanners/agent_config.py- Auto-fixable
- No.
- SARIF name
AgentExternalUrls
What it detects
An agent instruction file (CLAUDE.md, AGENTS.md, .cursorrules and friends) links a host outside the documentation allowlist. This is inventory, not an incident: the link is one more thing an agent reading the file may be pointed at, and worth a look when you are auditing what a repository tells its agent to consult. It is not evidence of anything on its own.
This rule was HIGH until 2026-09-25 and fired on any link outside a prefix allowlist. Reported against 930 public repositories shipping AGENTS.md / CLAUDE.md: it fired on 303, so roughly a third failed --ci for carrying a documentation link. A severity that high on something that common teaches people to raise --fail-on, which then hides the findings that deserve it. What actually earns HIGH is the instruction rather than the host — text telling the agent to fetch a URL and act on what comes back, or to send data to one — and AAK-AGENT-006 is that rule. A URL already reported there is not repeated here.
How to fix
Usually nothing. Read the link and satisfy yourself it points where you expect — a documentation or package host you recognise. Act when the surrounding text tells the agent to do something with it, which AAK-AGENT-006 reports separately and at HIGH. If instruction files in this repository routinely carry links, this rule is inventory and can sit below your --fail-on threshold; suppressing it wholesale is reasonable, suppressing AAK-AGENT-006 is not.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-AGENT-002
Limitations
Reports the presence of a link, never its content or its reputation, so an advert for a gateway is one more link. Reads the instruction files at the root of the scanned directory and, under --include-user-config, Codex's $CODEX_HOME/AGENTS.md and AGENTS.override.md. The allowlist is a list of hosts whose links are ordinarily documentation; it is not a trust decision, and a link to an allowlisted host can still be hostile — an attacker can host on github.com too. That is why AAK-AGENT-006 applies no allowlist at all. A URL that Node, requests and Rust's url crate read differently from curl, httpx and urlsplit, which keep a backslash inside the authority, is judged by the less safe of the two readings.
References
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-HIJACK-02 (Agent External URLs)
- CSA AI Controls Matrix (AICM): IAM-02
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-AGENT-002.md: the page then shows that text, with the registry reference appended under it.