Skip to content

Commit c0a3809

Browse files
committed
fix rego
Signed-off-by: Sertac Ozercan <[email protected]>
1 parent 1fd7c32 commit c0a3809

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

integration/fixtures/trivy_ignore.rego

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ import data.lib.trivy
44

55
default ignore = false
66

7+
# Ignore the following Vulnerability IDs
78
ignore_vulnerability_ids := {
89
# centos 7.6.1810
910
# libssh2 package version "1.8.0-4.el7_9.1" does not exist yet
1011
"CVE-2020-22218"
11-
}
12+
}
13+
14+
# For ignoring vulnID
15+
ignore {
16+
input.VulnerabilityID == ignore_vulnerability_ids[_]
17+
}

integration/patch_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"strconv"
1111
"testing"
1212

13-
"github.com/davecgh/go-spew/spew"
1413
"github.com/opencontainers/go-digest"
1514
"github.com/stretchr/testify/assert"
1615
"github.com/stretchr/testify/require"
@@ -41,7 +40,6 @@ func TestPatch(t *testing.T) {
4140
tmp := t.TempDir()
4241
ignoreFile := filepath.Join(tmp, "ignore.rego")
4342
err = os.WriteFile(ignoreFile, trivyIgnore, 0o600)
44-
spew.Dump(ignoreFile)
4543
require.NoError(t, err)
4644

4745
for _, img := range images {

0 commit comments

Comments
 (0)