Skip to content

Commit

Permalink
deps: update sigs.k8s.io/wg-policy-prototypes digest to 0fc2ddc (#447)
Browse files Browse the repository at this point in the history
* deps: update sigs.k8s.io/wg-policy-prototypes digest to 0fc2ddc

* fix: update policy-report

Signed-off-by: Christian Kotzbauer <[email protected]>

---------

Signed-off-by: Christian Kotzbauer <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christian Kotzbauer <[email protected]>
  • Loading branch information
renovate[bot] and ckotzbauer authored Apr 5, 2024
1 parent bb069a0 commit 7e59c55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
sigs.k8s.io/wg-policy-prototypes v0.0.0-20240317184505-5e40564e00ef
sigs.k8s.io/wg-policy-prototypes v0.0.0-20240327135653-0fc2ddc5d3e3
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1664,8 +1664,8 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
sigs.k8s.io/wg-policy-prototypes v0.0.0-20240317184505-5e40564e00ef h1:3J5Ds7wtlYyX0vSqWu+GhTgOOSyaB+UlCbk5/cesjR8=
sigs.k8s.io/wg-policy-prototypes v0.0.0-20240317184505-5e40564e00ef/go.mod h1:SwYw1f7GwlQENppzm94XW/uT/xfbLwKg3iCd4uzpy4k=
sigs.k8s.io/wg-policy-prototypes v0.0.0-20240327135653-0fc2ddc5d3e3 h1:fBHuQKI5AonDZsH6QWmS5ovZwWjbLqSIMBDctZb2+PU=
sigs.k8s.io/wg-policy-prototypes v0.0.0-20240327135653-0fc2ddc5d3e3/go.mod h1:SwYw1f7GwlQENppzm94XW/uT/xfbLwKg3iCd4uzpy4k=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
8 changes: 4 additions & 4 deletions internal/vuln/target/policyreport/policyreport_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func generatePolicyReport(container kubernetes.ContainerInfo, vulnerabilities []
},
},
Scope: &corev1.ObjectReference{Kind: "Pod", Namespace: container.Namespace, Name: container.PodName, UID: container.PodUID},
Results: []*policyreport.PolicyReportResult{},
Results: []policyreport.PolicyReportResult{},
}

t := time.Now()
Expand All @@ -167,7 +167,7 @@ func generatePolicyReport(container kubernetes.ContainerInfo, vulnerabilities []
Source: "vulnerability-operator",
Category: v.vulnerability.Package,
Scored: false,
Subjects: []*corev1.ObjectReference{
Subjects: []corev1.ObjectReference{
{
Kind: "Pod",
Namespace: container.Namespace,
Expand All @@ -184,7 +184,7 @@ func generatePolicyReport(container kubernetes.ContainerInfo, vulnerabilities []
Result: mapResult(v.vulnerability.Severity),
}

report.Results = append(report.Results, &result)
report.Results = append(report.Results, result)
}

report.Summary = toSummaryPolicy(report.Results)
Expand Down Expand Up @@ -213,7 +213,7 @@ func mapResult(s string) policyreport.PolicyResult {
return "pass"
}

func toSummaryPolicy(results []*policyreport.PolicyReportResult) policyreport.PolicyReportSummary {
func toSummaryPolicy(results []policyreport.PolicyReportResult) policyreport.PolicyReportSummary {
var rs policyreport.PolicyReportSummary
for _, v := range results {
switch v.Result {
Expand Down

0 comments on commit 7e59c55

Please sign in to comment.