Secret protection now handles commands run behind env, sudo, and command wrapper options, which previously let some sensitive reads through and rejected an already-approved path.
Fixed
- Fixed sensitive-path reads being allowed when a wrapper option came before the real command, covering
env -i,env -u,env -C,env -S,sudo -E,sudo -u, andcommand -p. Commands such asenv -i bash -c 'cat ~/.npmrc'andprintf 'open(".env")' | sudo -u root python3 -are now blocked. (#320) - Fixed an
allow_pathsentry being ignored for a sensitive file named in an environment assignment, soenv -i npm_config_userconfig=<approved-path>/.npmrc node x.jsis no longer blocked bysecret.basename.npmrc. An assigned path that is not approved is still blocked, and a filename that merely contains=is still checked. (#319) - Fixed path resolution under
env -C <dir>: command operands now resolve in the wrapper directory, while redirection targets keep resolving at the shell working directory. (#320) - Fixed a command carried inside an
env -Sstring not being inspected, so a secret read split across the-Sstring and the words after it is detected, including a stdin script whose interpreter is named there. (#320)