diff --git a/cmd/csaf_checker/processor.go b/cmd/csaf_checker/processor.go index 83d0be7..64f0db2 100644 --- a/cmd/csaf_checker/processor.go +++ b/cmd/csaf_checker/processor.go @@ -715,10 +715,15 @@ func (p *processor) integrity( "Extracting 'tlp level' from %s failed: %v", u, err) } else { tlpe := extractTLP(tlpa) - // If the client has no authorization it shouldn't be able to access TLP:AMBER or TLP:RED advisories - if !p.opts.protectedAccess() && (tlpe == "AMBER" || tlpe == "RED") { + // If the client has no authorization it shouldn't be able + // to access TLP:AMBER or TLP:RED advisories + if !p.opts.protectedAccess() && + (tlpe == csaf.TLPLabelAmber || tlpe == csaf.TLPLabelRed) { + p.badAmberRedPermissions.use() - p.badAmberRedPermissions.error("Advisory %s of TLP level %v is not access protected.", u, tlpe) + p.badAmberRedPermissions.error( + "Advisory %s of TLP level %v is not access protected.", + u, tlpe) } // check if current feed has correct or all of their tlp levels entries. if p.labelChecker != nil { diff --git a/cmd/csaf_checker/roliecheck.go b/cmd/csaf_checker/roliecheck.go index 296e278..f3ac139 100644 --- a/cmd/csaf_checker/roliecheck.go +++ b/cmd/csaf_checker/roliecheck.go @@ -125,7 +125,8 @@ func (ca *rolieLabelChecker) check( "Unexpected Error %v when trying to fetch: %s", err, advisory) } else if res.StatusCode == http.StatusOK { p.badAmberRedPermissions.error( - "Advisory %s of TLP level %v is not properly access protected.", advisory, advisoryLabel) + "Advisory %s of TLP level %v is not properly access protected.", + advisory, advisoryLabel) } }