fix: Remove violation mode

This commit is contained in:
Abhisek Datta
2026-01-08 20:27:05 +05:30
parent cb081348fa
commit 774d21fc32
7 changed files with 5 additions and 80 deletions
-2
View File
@@ -23,8 +23,6 @@ func ApplyCobraFlags(cmd *cobra.Command) {
globalConfig.Config.ExperimentalProxyMode, "Use experimental proxy-based interception (EXPERIMENTAL)")
cmd.PersistentFlags().BoolVar(&globalConfig.Config.Sandbox.Enabled, "sandbox",
globalConfig.Config.Sandbox.Enabled, "Enable sandbox mode to isolate package manager processes (EXPERIMENTAL)")
cmd.PersistentFlags().StringVar(&globalConfig.Config.Sandbox.ViolationMode, "sandbox-violation-mode",
globalConfig.Config.Sandbox.ViolationMode, "How to handle sandbox policy violations: block, warn, or allow")
cmd.PersistentFlags().StringVar(&globalConfig.SandboxProfileOverride, "sandbox-profile",
globalConfig.SandboxProfileOverride, "Override sandbox policy profile (built-in name or path to custom YAML)")
}
-3
View File
@@ -70,9 +70,6 @@ type SandboxConfig struct {
// Enabled enables sandbox mode (opt-in by default for backward compatibility).
Enabled bool `mapstructure:"enabled"`
// ViolationMode defines how policy violations are handled (block, warn, or allow).
ViolationMode string `mapstructure:"violation_mode"`
// Policies maps package manager names to their sandbox policy references.
// Key is package manager name (e.g., "npm", "pip"), value is policy reference.
Policies map[string]SandboxPolicyRef `mapstructure:"policies"`
+2 -6
View File
@@ -52,6 +52,8 @@ trusted_packages:
# filesystem, network, and process execution access. This provides defense-in-depth
# protection against malicious install scripts and supply chain attacks.
#
# Policy violations will block execution (this is the only supported behavior).
#
# Currently supported platforms:
# - macOS (using Seatbelt sandbox-exec)
# - Linux (coming soon: Bubblewrap or seccomp-bpf)
@@ -60,12 +62,6 @@ sandbox:
# Enable sandbox mode (opt-in, default: false for backward compatibility)
enabled: false
# How to handle policy violations: block | warn | allow
# - block: Prevent execution on policy violation (recommended)
# - warn: Log warning but allow execution
# - allow: Allow all operations (disables sandbox)
violation_mode: block
# Per-package-manager sandbox policies
# Each package manager can have its own policy to account for unique security characteristics
policies: