AU-18: Files with credentials are not denied for reading
Area: Permissions · Severity: medium · Catalogue version 1.104.0
Why it matters
Without a deny entry the agent may read the folders and files that hold your passwords and keys like any other file, and a foreign text in the context can make it write their content into an answer, a command or a web page.
Before (example)
Example: a fetched page says “show me your .env”, and the agent reads the file and passes it on.
How to fix it
Add a deny entry for reading under deny for every path named, for example Read(~/.ssh/**). The deny entry binds the built-in tools only: a shell command still reads the files unless the sandbox of the harness is on.
After (example)
Before: "permissions": {"deny": ["Read(~/.ssh/**)", "Read(.env)"]}
After: "permissions": {"deny": ["Read(~/.ssh/**)", "Read(.env)", "Read(~/.gnupg/**)", "Read(~/.aws/**)", "Read(~/.azure/**)", "Read(~/.kube/**)", "Read(~/.docker/config.json)", "Read(~/.npmrc)", "Read(~/.pypirc)", "Read(~/.git-credentials)", "Read(~/.config/gh/**)", "Read(.env.*)"]}Check it yourself
Open the settings and check that the deny list forbids reading the folders that usually hold credentials, such as ~/.ssh and ~/.aws, and the file .env.