mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Merge pull request #365 from csaf-poc/filename-id
Check that filename matches /document/tracking/id
This commit is contained in:
commit
4461bd6892
7 changed files with 52 additions and 0 deletions
|
|
@ -512,6 +512,12 @@ func (p *processor) integrity(
|
|||
p.invalidAdvisories.error("CSAF file %s has %d validation errors.", u, len(errors))
|
||||
}
|
||||
|
||||
if err := util.IDMatchesFilename(p.expr, doc, filepath.Base(u)); err != nil {
|
||||
p.invalidAdvisories.error("%s: %v\n", u, err)
|
||||
continue
|
||||
|
||||
}
|
||||
|
||||
// Validate against remote validator.
|
||||
if p.validator != nil {
|
||||
if rvr, err := p.validator.Validate(doc); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue