openai canary appends fake OpenAI credentials to ~/.env with OPENAI_BASE_URL pointed at Snare. When an agent loads this env file and makes an OpenAI SDK call, the SDK redirects to Snare instead of api.openai.com.
What gets planted
~/.env
Reliability: Medium
This canary fires only when both conditions are true:- The agent reads and loads
~/.env - The agent makes an OpenAI API call in the same process where
OPENAI_BASE_URLis set
Trigger conditions
- Agent runs
from dotenv import load_dotenv; load_dotenv()(or equivalent) - Agent calls
openai.ChatCompletion.create()or any OpenAI SDK method - Both in the same process
Real-world validation
This canary was accidentally triggered during development when Codex CLI loadedOPENAI_BASE_URL from the environment, redirecting its API calls to Snare. Alert included OpenAI-Node/4.x.x user agent.