diff --git a/pkg/scanners/dockerfile/scanner_test.go b/pkg/scanners/dockerfile/scanner_test.go index 02d343c..62c5cef 100644 --- a/pkg/scanners/dockerfile/scanner_test.go +++ b/pkg/scanners/dockerfile/scanner_test.go @@ -531,7 +531,6 @@ END REGO RESULTSET `, }, - // TODO fix this test { name: "new schema selector but invalid", inputRegoPolicy: `# METADATA diff --git a/pkg/scanners/terraform/executor/pool.go b/pkg/scanners/terraform/executor/pool.go index 75a72c7..4877a1c 100644 --- a/pkg/scanners/terraform/executor/pool.go +++ b/pkg/scanners/terraform/executor/pool.go @@ -16,11 +16,6 @@ import ( "github.com/aquasecurity/trivy-policies/pkg/types" ) -type RegisteredRule interface { - GetRule() scan.Rule - Evaluate(s *state.State) scan.Results -} - type Pool struct { size int modules terraform.Modules @@ -75,7 +70,7 @@ func (p *Pool) Run() (scan.Results, error) { mod := *module outgoing <- &hclModuleRuleJob{ module: &mod, - rule: &r, + rule: r, ignoreErrors: p.ignoreErrors, } } @@ -83,7 +78,7 @@ func (p *Pool) Run() (scan.Results, error) { // run defsec rule outgoing <- &infraRuleJob{ state: p.state, - rule: &r, + rule: r, ignoreErrors: p.ignoreErrors, } } @@ -109,14 +104,14 @@ type Job interface { type infraRuleJob struct { state *state.State - rule RegisteredRule + rule types.RegisteredRule ignoreErrors bool } type hclModuleRuleJob struct { module *terraform.Module - rule RegisteredRule + rule types.RegisteredRule ignoreErrors bool }