MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / hasGatingViolation

Function hasGatingViolation

app/cli/cmd/attestation_push.go:192–199  ·  view source on GitHub ↗

hasGatingViolation reports whether any of the supplied violations should count toward the policy gate. Entries flagged Suppress (typically because an assessment renders the finding NOT_AFFECTED) are excluded.

(violations []*action.PolicyViolation)

Source from the content-addressed store, hash-verified

190// count toward the policy gate. Entries flagged Suppress (typically because
191// an assessment renders the finding NOT_AFFECTED) are excluded.
192func hasGatingViolation(violations []*action.PolicyViolation) bool {
193 for _, v := range violations {
194 if !v.Suppress {
195 return true
196 }
197 }
198 return false
199}
200
201func validatePolicyEnforcement(status *action.AttestationStatusResult, bypassPolicyCheck bool) error {
202 // Block if any of the policies has been configured as a gate. Entries

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected