News · DiggingBeagle record

A repository scanner could trust the repository to choose its API endpoint

Agentic Radar removed implicit .env discovery after a configuration-loading flaw could allow attacker-controlled source files to redirect authenticated model requests. The change is a patch, not evidence of stolen API keys.

Published
Nov 19, 2026

The report

Security scanning is meant to inspect code that may be malicious, but an older Agentic Radar CLI initialization path allowed that codebase to influence the scanner's own environment. The maintainers' patch removed implicit load_dotenv() discovery, which could otherwise pick up a .env file in an untrusted checkout or a parent directory.

A target repository becomes scanner configuration

The issue was not a model obediently executing a malicious sentence. A repository author could provide configuration such as OPENAI_BASE_URL, redirecting a model client toward an endpoint the operator did not intend to use. With an OPENAI_API_KEY in the scanning process, certain scanning or prompt-hardening requests could carry that credential to the substituted destination. The exploitation path therefore crossed from repository data into the security tool's control plane before the model needed to reason about the repository.

The vulnerable range is reported as Agentic Radar 0.7.0 through releases before 0.14.2. The change tied to commit b99bb14 makes file loading explicit through --env-file or AGENTIC_RADAR_ENV_FILE. It addresses automatic trust in the current working tree; choosing an attacker-authored environment file explicitly would remain an operator risk.

What the patch establishes, and what it does not

The commit and associated advisory identify the configuration path and the corrective implementation. They do not demonstrate a criminal campaign, quantify stolen credentials or show that all scan modes were reachable with the same configuration. The Case record maintains that distinction.

The operational lesson is a strict boundary around inputs used to scan an adversarial repository: the scanner can parse repository files as data without automatically accepting their API hosts, tokens, hooks or settings. Protecting the calling agent's prompts would not have fixed an implicit environment-file loader running in ordinary application code.

Research behind this