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:
Abhisek Datta
2026-01-14 10:50:39 +05:30
committed by GitHub
co-authored by Copilot
parent 9693428171
commit 2e1f5b1a36
17 changed files with 815 additions and 58 deletions
+5 -2
View File
@@ -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