Skip to content

Commit

Permalink
test: load checks for all frameworks
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Pivkin <[email protected]>
  • Loading branch information
nikpivkin authored and simar7 committed Aug 30, 2024
1 parent bedbbc9 commit 8f0c564
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/rego/rego_checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import (
"testing"

checks "github.com/aquasecurity/trivy-checks"
"github.com/aquasecurity/trivy/pkg/iac/framework"
"github.com/aquasecurity/trivy/pkg/iac/rego"
"github.com/aquasecurity/trivy/pkg/iac/rules"
"github.com/aquasecurity/trivy/pkg/iac/scan"
"github.com/aquasecurity/trivy/pkg/iac/scanners/options"
"github.com/aquasecurity/trivy/pkg/iac/state"
trivyTypes "github.com/aquasecurity/trivy/pkg/iac/types"
ruleTypes "github.com/aquasecurity/trivy/pkg/iac/types/rules"
Expand All @@ -31,7 +33,10 @@ func addTests(tc testCases) {
}

func TestRegoChecks(t *testing.T) {
regoScanner := rego.NewScanner(trivyTypes.SourceCloud)
regoScanner := rego.NewScanner(
trivyTypes.SourceCloud,
options.ScannerWithFrameworks(framework.CIS_AWS_1_2, framework.CIS_AWS_1_4, framework.Default),
)
err := regoScanner.LoadPolicies(true, false, checks.EmbeddedPolicyFileSystem, []string{"."}, nil)
require.NoError(t, err)

Expand Down

0 comments on commit 8f0c564

Please sign in to comment.