Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
feat: make log-level configurable on the runner-side
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Csati <[email protected]>
  • Loading branch information
csatib02 committed Jul 25, 2024
1 parent ccc3fee commit 60ffaf8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions e2e/kics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ var _ = ginkgo.Describe("Running KICS scan", func() {
ScannerConfig: "",
},
},
LogLevel: "error",
},
}).Run(ctx, notifier)
gomega.Expect(errs).To(gomega.BeEmpty())
Expand Down
2 changes: 2 additions & 0 deletions plugins/runner/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ type PluginConfig struct {
BinaryArtifactsPath string `yaml:"binary_artifacts_path" mapstructure:"binary_artifacts_path"`
// BinaryArtifactsClean is a flag to indicate that the downloaded and extracted container image needs to be cleaned up after the plugin execution
BinaryArtifactsClean bool `yaml:"binary_artifacts_clean" mapstructure:"binary_artifacts_clean"`
// LogLevel is the log level for the plugin scanner
LogLevel string `yaml:"log_level" mapstructure:"log_level" json:"log_level"`
}

type PluginRunner interface {
Expand Down
1 change: 1 addition & 0 deletions scanner/families/plugins/types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type Config struct {
BinaryMode bool `yaml:"binary_mode" mapstructure:"binary_mode" json:"binary_mode"`
BinaryArtifactsPath string `yaml:"binary_artifacts_path" mapstructure:"binary_artifacts_path" json:"binary_artifacts_path"`
BinaryArtifactsClean bool `yaml:"binary_artifacts_clean" mapstructure:"binary_artifacts_clean" json:"binary_artifacts_clean"`
LogLevel string `yaml:"log_level" mapstructure:"log_level" json:"log_level"`
}

type ScannersConfig map[string]runnerconfig.Config

0 comments on commit 60ffaf8

Please sign in to comment.