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

Merge pull request #370 from csaf-poc/fix-pmd-crash

Fix pmd crash
This commit is contained in:
JanHoefelmeyer 2023-06-09 13:17:42 +02:00 committed by GitHub
commit 7eae607810
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 9 deletions

View file

@ -235,13 +235,16 @@ func (p *processor) run(domains []string) (*Report, error) {
}
for _, d := range domains {
if p.checkProviderMetadata(d) {
if err := p.checkDomain(d); err != nil {
if err == errContinue || err == errStop {
continue
}
return nil, err
if !p.checkProviderMetadata(d) {
// We cannot build a report if the provider metadata cannot be parsed.
log.Printf("Could not parse the Provider-Metadata.json of: %s\n", d)
continue
}
if err := p.checkDomain(d); err != nil {
if err == errContinue || err == errStop {
continue
}
return nil, err
}
domain := &Domain{Name: d}