A2A Check

ST-03: Every command of the agent sees all environment variables

Area: Memory · Severity: medium · Catalogue version 1.104.0

Why it matters

The agent starts its commands with the whole environment of the program that started it, so any command can read and pass on the credentials that are in it.

Before (example)

Example: an injected command sends your cloud key to a foreign server.

How to fix it

Let through only the variables a command needs: set inherit = "core" or name the allowed variables in include_only.

After (example)

Before:
[shell_environment_policy]
inherit = "all"

After:
[shell_environment_policy]
inherit = "core"

Check it yourself

Open the settings file of your Codex project and look at the section for the environment of commands; if every variable is inherited without a filter, tokens and keys reach every command.

All rules