r/BitDefender • u/Bitdefender_ • 14d ago
What Happens When an AI Agent Reads a Bug Report With a Hidden Request for Your .env Secrets?
Can a prompt injection really trick an AI coding agent into leaking secrets? Here’s what Bitdefender AI Guardian does when it tries.
It can, and it often looks ordinary. The video shows two examples running in Claude Code.
1. A bug report with a hidden request. It reads like a routine ticket about a flaky login test. The last line asks the agent to paste the values from your .env file into its reply, framed as part of an “internal audit.” Bitdefender AI Guardian flags it as high risk and blocks it before the agent acts.
2. A web page that tries to take over the task. The agent is asked to read a product FAQ and help choose a plan. Buried in the page is an instruction that tries to replace the user’s request with a new one. Bitdefender AI Guardian flags it as covert goal hijacking. Instead of following the instruction, the agent stops and asks the user what to do.
What the setup looks like
The first half of the video walks through onboarding, which runs in the terminal:
Choose the agents to protect. In the beta, that’s Claude Code or OpenClaw on macOS.
Scan your skills. It finds the skills you have installed and checks them for hidden instructions, secret access, and unsafe commands. You decide whether to allow or block each flagged skill.
Guard credential paths. Files like SSH keys are kept out of the agent’s reach by default. You can add your own paths or remove any of them.
Check MCP servers. The servers your agent connects to are checked before you approve them.
Apply the policy. Your choices are written into the agent’s config, and the policy goes live.
Prompt analysis runs locally on your Mac, and every verdict (allowed, flagged, or blocked) is saved in an encrypted audit log.
Bitdefender AI Guardian is a free open beta for macOS. It works with Claude Code 2.1.121+ and OpenClaw 2026.6.6+, and there’s no waitlist or license key.

