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:
+15
-11
@@ -111,14 +111,16 @@ sandbox:
|
||||
# Per-package-manager sandbox policies
|
||||
# Each package manager can have its own policy to account for unique security characteristics
|
||||
policies:
|
||||
# npm ecosystem. npm-restrictive is a built-in profile.
|
||||
# npm ecosystem. npm-restrictive is the shared base profile; each package
|
||||
# manager maps to a leaf profile that re-allows only its own environment
|
||||
# variables.
|
||||
npm:
|
||||
enabled: true
|
||||
profile: npm-restrictive # Built-in profile, template name, or path to custom YAML
|
||||
profile: npm # Built-in profile, template name, or path to custom YAML
|
||||
|
||||
pnpm:
|
||||
enabled: true
|
||||
profile: pnpm-restrictive
|
||||
profile: pnpm
|
||||
|
||||
npx:
|
||||
enabled: true
|
||||
@@ -130,32 +132,34 @@ sandbox:
|
||||
|
||||
yarn:
|
||||
enabled: true
|
||||
profile: npm-restrictive
|
||||
profile: yarn
|
||||
|
||||
bun:
|
||||
enabled: true
|
||||
profile: npm-restrictive
|
||||
profile: bun
|
||||
|
||||
# PyPI ecosystem. pypi-restrictive is a built-in profile.
|
||||
# PyPI ecosystem. pypi-restrictive is the shared base profile; each
|
||||
# package manager maps to a leaf profile that re-allows only its own
|
||||
# environment variables.
|
||||
pip:
|
||||
enabled: true
|
||||
profile: pypi-restrictive
|
||||
profile: pip
|
||||
|
||||
pip3:
|
||||
enabled: true
|
||||
profile: pypi-restrictive
|
||||
profile: pip
|
||||
|
||||
pipx:
|
||||
enabled: true
|
||||
profile: pypi-restrictive
|
||||
profile: pipx
|
||||
|
||||
poetry:
|
||||
enabled: true
|
||||
profile: pypi-restrictive
|
||||
profile: poetry
|
||||
|
||||
uv:
|
||||
enabled: true
|
||||
profile: pypi-restrictive
|
||||
profile: uv
|
||||
|
||||
# Dependency cooldown blocks installation of package versions published within
|
||||
# a configurable time window.
|
||||
|
||||
Reference in New Issue
Block a user