We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1512c6 commit 55a42caCopy full SHA for 55a42ca
internal/keppel/security_scan_policy_test.go
@@ -0,0 +1,28 @@
1
+// SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company
2
+// SPDX-License-Identifier: Apache-2.0
3
+
4
+package keppel
5
6
+import (
7
+ "bytes"
8
+ "io"
9
+ "os"
10
+ "testing"
11
+ "time"
12
13
+ "github.com/sapcc/keppel/internal/trivy"
14
15
+ "github.com/sapcc/go-bits/must"
16
+)
17
18
+func BenchmarkEnrichReport(b *testing.B) {
19
+ for b.Loop() {
20
+ policies := SecurityScanPolicySet{}
21
+ content := must.Return(os.ReadFile("../tasks/fixtures/trivy/report-vulnerable-with-fixes.json"))
22
+ report := trivy.ReportPayload{
23
+ Format: "json",
24
+ Contents: io.NopCloser(bytes.NewReader(content)),
25
+ }
26
+ _ = must.Return(policies.EnrichReport(&report, time.Now()))
27
28
+}
0 commit comments