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

Aggregator: ignore advisories by given patterns (#421)

* Ignore advisories in checker.

* Rename config.check to config.prepare to make symmerical to other tools.

* Add ignore patterns to aggreagtor.

* Clarified docs on where and how to use ignorepattern for aggregator

---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
This commit is contained in:
Sascha L. Teichmann 2023-08-16 19:38:55 +02:00 committed by GitHub
parent 7bab18fc41
commit 4cd0fc3bb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 2 deletions

View file

@ -500,6 +500,14 @@ func (w *worker) mirrorFiles(tlpLabel csaf.TLPLabel, files []csaf.AdvisoryFile)
continue
}
// Should we ignore this advisory?
if w.provider.ignoreURL(file.URL(), w.processor.cfg) {
if w.processor.cfg.Verbose {
log.Printf("Ignoring %s: %q\n", w.provider.Name, file.URL())
}
continue
}
// Ignore not conforming filenames.
filename := filepath.Base(u.Path)
if !util.ConformingFileName(filename) {