fix: Apply API

This commit is contained in:
Abhisek Datta
2026-01-08 14:20:47 +05:30
parent b92ba00cfa
commit 9f77cca5e5
5 changed files with 34 additions and 19 deletions
+2
View File
@@ -25,4 +25,6 @@ func ApplyCobraFlags(cmd *cobra.Command) {
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)")
}
+5
View File
@@ -112,6 +112,11 @@ type RuntimeConfig struct {
// InsecureInstallation allows bypassing install blocking on malicious packages
InsecureInstallation bool
// SandboxProfileOverride is a runtime override for the sandbox policy profile.
// When set, this profile path is used instead of the configured policy for all package managers.
// This is a CLI-only flag (--sandbox-profile) and is not persisted to config.yml.
SandboxProfileOverride string
// Internal config values computed at runtime and must be accessed via. API
configDir string
configFilePath string