Mission 6 · Build the boundaries
The empty treasure chest
Keep real credentials out of the agent’s environment.
An attacker has read every file and environment variable in Reza’s bot instance. You cannot stop that read now. You can decide what was there in the first place.
Attacker
“I found the bot’s settings. Time to steal the real API key and bot token.”
The decision
Which storage plan best limits credential theft?
- Put real credentials in a file called secret.txt
The name warns everyone not to open it. - Give the bot replacement tokens; keep real credentials in its proxy
Only the controlled proxy swaps replacements for real values. - Put real credentials in the bot’s environment variables
They are not visible in the normal chat window.
Reveal the explanation
The attacker finds replacement tokens, not the real provider key or Telegram bot token. Those replacements still have power through the authorized proxy, so they must also be controlled and rotated after compromise.
You cannot steal a real secret from a place it never entered.- The proxy holds the real credentials and injects them at the moment of egress.
- Replacement tokens are not valid credentials when sent directly to Telegram or the model provider.
- Do not paste real tokens into this game, into chats, or into the bot instance. This is a teaching simulation only.
Credential
A secret, such as an API key or bot token, that lets someone act as an account or service.