mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
commit
7eae607810
2 changed files with 12 additions and 9 deletions
|
|
@ -235,13 +235,16 @@ func (p *processor) run(domains []string) (*Report, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, d := range domains {
|
for _, d := range domains {
|
||||||
if p.checkProviderMetadata(d) {
|
if !p.checkProviderMetadata(d) {
|
||||||
if err := p.checkDomain(d); err != nil {
|
// We cannot build a report if the provider metadata cannot be parsed.
|
||||||
if err == errContinue || err == errStop {
|
log.Printf("Could not parse the Provider-Metadata.json of: %s\n", d)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
return nil, err
|
if err := p.checkDomain(d); err != nil {
|
||||||
|
if err == errContinue || err == errStop {
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
return nil, err
|
||||||
}
|
}
|
||||||
domain := &Domain{Name: d}
|
domain := &Domain{Name: d}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ func (r *providerMetadataReport) report(p *processor, domain *Domain) {
|
||||||
func (r *securityReporter) report(p *processor, domain *Domain) {
|
func (r *securityReporter) report(p *processor, domain *Domain) {
|
||||||
req := r.requirement(domain)
|
req := r.requirement(domain)
|
||||||
if !p.badSecurity.used() {
|
if !p.badSecurity.used() {
|
||||||
req.message(InfoType, "Performed no in-depth test of security.txt.")
|
req.message(WarnType, "Performed no in-depth test of security.txt.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(p.badSecurity) == 0 {
|
if len(p.badSecurity) == 0 {
|
||||||
|
|
@ -284,7 +284,7 @@ func (r *securityReporter) report(p *processor, domain *Domain) {
|
||||||
func (r *wellknownMetadataReporter) report(p *processor, domain *Domain) {
|
func (r *wellknownMetadataReporter) report(p *processor, domain *Domain) {
|
||||||
req := r.requirement(domain)
|
req := r.requirement(domain)
|
||||||
if !p.badWellknownMetadata.used() {
|
if !p.badWellknownMetadata.used() {
|
||||||
req.message(InfoType, "Since no valid provider-metadata.json was found, no extended check was performed.")
|
req.message(WarnType, "Since no valid provider-metadata.json was found, no extended check was performed.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(p.badWellknownMetadata) == 0 {
|
if len(p.badWellknownMetadata) == 0 {
|
||||||
|
|
@ -298,7 +298,7 @@ func (r *wellknownMetadataReporter) report(p *processor, domain *Domain) {
|
||||||
func (r *dnsPathReporter) report(p *processor, domain *Domain) {
|
func (r *dnsPathReporter) report(p *processor, domain *Domain) {
|
||||||
req := r.requirement(domain)
|
req := r.requirement(domain)
|
||||||
if !p.badDNSPath.used() {
|
if !p.badDNSPath.used() {
|
||||||
req.message(InfoType, "No check about contents from https://csaf.data.security.DOMAIN performed.")
|
req.message(WarnType, "No check about contents from https://csaf.data.security.DOMAIN performed.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(p.badDNSPath) == 0 {
|
if len(p.badDNSPath) == 0 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue