mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
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:
@@ -3,6 +3,7 @@ description: Restrictive sandbox policy for PyPI ecosystem (pip, poetry, uv)
|
||||
package_managers:
|
||||
- pip
|
||||
- pip3
|
||||
- pipx
|
||||
- poetry
|
||||
- uv
|
||||
|
||||
@@ -71,6 +72,15 @@ network:
|
||||
deny_outbound:
|
||||
- "*:*"
|
||||
|
||||
environment:
|
||||
# This profile is the shared base for the PyPI ecosystem and deliberately
|
||||
# allows no environment variables: everything in the built-in
|
||||
# DANGEROUS_ENV_VARS list is scrubbed. Each package manager's leaf profile
|
||||
# (pip, uv, poetry) re-allows only the variables that package manager needs.
|
||||
# TWINE_* is allowed nowhere: twine is not a package manager PMG wraps, so
|
||||
# its publishing credentials stay scrubbed during installs.
|
||||
allow: []
|
||||
|
||||
process:
|
||||
allow_exec:
|
||||
- /usr/bin/python*
|
||||
|
||||
Reference in New Issue
Block a user