mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 18:15:42 +01:00
Break overly long lines. Use defined constants for TLP levels.
This commit is contained in:
parent
a02d9c36a7
commit
65536f51a4
2 changed files with 10 additions and 4 deletions
|
|
@ -715,10 +715,15 @@ func (p *processor) integrity(
|
||||||
"Extracting 'tlp level' from %s failed: %v", u, err)
|
"Extracting 'tlp level' from %s failed: %v", u, err)
|
||||||
} else {
|
} else {
|
||||||
tlpe := extractTLP(tlpa)
|
tlpe := extractTLP(tlpa)
|
||||||
// If the client has no authorization it shouldn't be able to access TLP:AMBER or TLP:RED advisories
|
// If the client has no authorization it shouldn't be able
|
||||||
if !p.opts.protectedAccess() && (tlpe == "AMBER" || tlpe == "RED") {
|
// to access TLP:AMBER or TLP:RED advisories
|
||||||
|
if !p.opts.protectedAccess() &&
|
||||||
|
(tlpe == csaf.TLPLabelAmber || tlpe == csaf.TLPLabelRed) {
|
||||||
|
|
||||||
p.badAmberRedPermissions.use()
|
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.
|
// check if current feed has correct or all of their tlp levels entries.
|
||||||
if p.labelChecker != nil {
|
if p.labelChecker != nil {
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,8 @@ func (ca *rolieLabelChecker) check(
|
||||||
"Unexpected Error %v when trying to fetch: %s", err, advisory)
|
"Unexpected Error %v when trying to fetch: %s", err, advisory)
|
||||||
} else if res.StatusCode == http.StatusOK {
|
} else if res.StatusCode == http.StatusOK {
|
||||||
p.badAmberRedPermissions.error(
|
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)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue