denyRead vs sandbox.credentials
People think both keys just hide a secret file. denyRead blocks a path, so a command cannot read it at all. sandbox.credentials can do that too. It can also mask a secret: the command sees a stand-in, and the proxy puts the real value back on the way out. Mask is for a secret a command must use but should not see.
sandbox.filesystem.denyRead
A list of paths sandboxed commands may not read.
sandbox.filesystem.denyRead is a settings key that hides paths from reading. Commands in the sandbox cannot read the paths it lists. By default they can read most things, even secret files such as ~/.aws/credentials. Use this key to hide those. Lists from all files are joined, and the paths from your Read deny rules are added too.
sandbox.credentials
The key that hides or masks secrets from sandboxed commands.
sandbox.credentials is a settings key that guards your secrets. It keeps secret files and environment variables from commands in the sandbox. Each entry names a file path or a variable name, with a mode. deny hides the secret. mask shows the command a stand-in, and the proxy puts the real value back on the way out. mask works only from user or managed settings.
In one line
- sandbox.filesystem.denyRead
- A list of paths sandboxed commands may not read.
- sandbox.credentials
- The key that hides or masks secrets from sandboxed commands.