Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Bump trivy version #246

Merged
merged 4 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.0
toolchain go1.22.2

require (
github.com/aquasecurity/trivy v0.54.1-0.20240822002139-6fe672732b46
github.com/aquasecurity/trivy v0.54.1-0.20240830061815-3a5d09175956
github.com/liamg/iamgo v0.0.9
github.com/liamg/memoryfs v1.6.0
github.com/open-policy-agent/opa v0.67.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFI
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY=
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
github.com/aquasecurity/trivy v0.54.1-0.20240822002139-6fe672732b46 h1:FZ9Jom4Dt2BmKhZkHFhT6sWHRbLEdqUxcfGgItAdvA4=
github.com/aquasecurity/trivy v0.54.1-0.20240822002139-6fe672732b46/go.mod h1:GUTOESqI5oLXisbzObmsK/lLQP20U/KFttD+JJUpGKA=
github.com/aquasecurity/trivy v0.54.1-0.20240830061815-3a5d09175956 h1:+VO7TT3yr7Vcsev2qGxKvWjTOwHXExhtIN/EtiiaMlY=
github.com/aquasecurity/trivy v0.54.1-0.20240830061815-3a5d09175956/go.mod h1:WYFvGq6bmKoVMVQ0UIa3QwiX9t9tOpV8Y9Cq6E9CB20=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
Expand Down
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