Skip to content

Commit 9809a07

Browse files
fix(secret): use secret result when determining Failed status (#2370)
1 parent 484ddd8 commit 9809a07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/types/report.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (s MisconfSummary) Empty() bool {
8989
return s.Successes == 0 && s.Failures == 0 && s.Exceptions == 0
9090
}
9191

92-
// Failed returns whether the result includes any vulnerabilities or misconfigurations
92+
// Failed returns whether the result includes any vulnerabilities, misconfigurations or secrets
9393
func (results Results) Failed() bool {
9494
for _, r := range results {
9595
if len(r.Vulnerabilities) > 0 {
@@ -100,6 +100,9 @@ func (results Results) Failed() bool {
100100
return true
101101
}
102102
}
103+
if len(r.Secrets) > 0 {
104+
return true
105+
}
103106
}
104107
return false
105108
}

0 commit comments

Comments
 (0)