secrets — .env, api keys, and what not to commit6 / 9
.env, os.getenv, and the leak recovery you'll do at least once
AI hardcoded an API key into source on line 4. The provided
fake_env dict already has the key set. Fix line 4 so it reads
from fake_env.get("ANTHROPIC_API_KEY") instead.
Expected output:
key starts with: sk-ant-t
The break is on line 4 — but read the whole snippet first.
⌘↵ runs the editor.
Booting Python…
Output
[promptdojo:~]$ _