mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
feat: Add support for policy inheritence (#113)
* feat: Add support for policy inheritence * fix: Linter fixes * Update docs/sandbox.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Abhisek Datta <abhisek.datta@gmail.com> * fix: Handle boolean inheritence * ci: Add linter * Update sandbox/policy_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Abhisek Datta <abhisek.datta@gmail.com> * fix: Linter fixes * fix: Linter fixes * fix: Sandbox rule regex format --------- Signed-off-by: Abhisek Datta <abhisek.datta@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -65,6 +65,9 @@ sandbox:
|
||||
|
||||
# Policy templates define policy profiles by name and path.
|
||||
# They can be used to override a built-in profile or create a custom profile.
|
||||
# Note: Custom profiles loaded via policy_templates can inherit from built-in
|
||||
# profiles using the 'inherits' field in the YAML (e.g., inherits: npm-restrictive).
|
||||
# Inheritance allows you to extend a base profile with additional permissions.
|
||||
policy_templates:
|
||||
# Name for the template. Can be used to override a built-in profile or create a custom profile.
|
||||
# Path is the path to the template file.
|
||||
@@ -86,11 +89,11 @@ sandbox:
|
||||
|
||||
npx:
|
||||
enabled: true
|
||||
profile: npm-restrictive
|
||||
profile: npx
|
||||
|
||||
pnpx:
|
||||
enabled: true
|
||||
profile: npm-restrictive
|
||||
profile: npx
|
||||
|
||||
yarn:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user