1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Be more precise with conditional rules.

This commit is contained in:
Sascha L. Teichmann 2023-06-13 12:25:19 +02:00
parent 7eae607810
commit c7453a6448
3 changed files with 124 additions and 43 deletions

View file

@ -254,7 +254,16 @@ func (p *processor) run(domains []string) (*Report, error) {
continue
}
for _, r := range buildReporters(*domain.Role) {
rules := roleRequirements(*domain.Role)
// TODO: store error base on rules eval in report.
if rules == nil {
log.Printf(
"WARN: Cannot find requirement rules for role %q. Assuming trusted provider.\n",
*domain.Role)
rules = trustedProviderRules
}
for _, r := range rules.reporters() {
r.report(p, domain)
}