feat: Add support for environment protection (scrubbing) (#327)

* feat: Add support for environment variable protection for sandbox

* chore: Update dangerous env var list

* fix: Split profiles for improved environment protection

* fix: pipx sandbox profile separation

* chore: Show sandbox scrub info on error exit

* fix: Code review fixes

* test: Add e2e for sandbox environment scrubbing
This commit is contained in:
Abhisek Datta
2026-06-11 11:40:33 +05:30
committed by GitHub
parent 7620097613
commit c7244f921a
39 changed files with 1385 additions and 49 deletions
+8
View File
@@ -93,6 +93,14 @@ network:
deny_outbound:
- "*:*"
environment:
# This profile is the shared base for the npm ecosystem and deliberately
# allows no environment variables: everything in the built-in
# DANGEROUS_ENV_VARS list is scrubbed. Each package manager's leaf profile
# (npm, yarn, bun, pnpm, npx) re-allows only the variables that
# package manager needs for auth, registry config, and TLS.
allow: []
process:
allow_exec:
- /usr/bin/node