small fixes

This commit is contained in:
Sahilb315
2025-12-17 23:25:02 +05:30
parent 1655bf1921
commit 3bc4120375
4 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ type Config struct {
// InsecureInstallation allows bypassing install blocking on malicious packages
InsecureInstallation bool `mapstructure:"insecure_installation"`
// TrustedPackages allows for trusting an suspicious package and ignoring the suspicious behaviour for the package in future installations
// TrustedPackages allows for trusting a suspicious package and ignoring the suspicious behaviour for the package in future installations
TrustedPackages TrustedPackage `mapstructure:"trusted_packages"`
}
+2 -2
View File
@@ -69,7 +69,7 @@ transitive_depth: 7
include_dev_dependencies: true
dry_run: true
paranoid: true
trusted_packages: ["a","b"]
trusted_packages: {'purls': ["a", "b"]}
`), 0o644))
fs := pflag.NewFlagSet("test", pflag.ContinueOnError)
@@ -87,5 +87,5 @@ trusted_packages: ["a","b"]
assert.True(t, cfg.IncludeDevDependencies, "include_dev_dependencies should be overridden by file to true")
assert.True(t, cfg.DryRun, "dry_run should be overridden by file to true")
assert.True(t, cfg.Paranoid, "paranoid should be overridden by file to true")
assert.ElementsMatch(t, []string{"a", "b"}, cfg.TrustedPackages, "trusted_packages should match file values")
assert.ElementsMatch(t, []string{"a", "b"}, cfg.TrustedPackages.Purl, "trusted_packages should match file values")
}