1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 18:15:42 +01:00

Treat invalid PMDs as error and stop processing if needed

*  Improve how PMD validation result is used when searching for a valid PMD.
   We now stop if no PMD can be validated against the json schema.
This commit is contained in:
Sascha L. Teichmann 2022-08-26 16:53:18 +02:00 committed by GitHub
parent 3bb8ea0019
commit 70b4e18b58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 12 deletions

View file

@ -1062,7 +1062,7 @@ func (p *processor) checkProviderMetadata(domain string) error {
lpmd := csaf.LoadProviderMetadataForDomain(client, domain, p.badProviderMetadata.warn)
if lpmd == nil {
if !lpmd.Valid() {
p.badProviderMetadata.error("No valid provider-metadata.json found.")
p.badProviderMetadata.error("STOPPING here - cannot perform other checks.")
return errStop