From 5b4c621616323a84e662bb8dfeb79c78f6f939b4 Mon Sep 17 00:00:00 2001 From: Bernhard Herzog Date: Tue, 9 May 2023 20:06:58 +0200 Subject: [PATCH] Check that filename matches ID in csaf_aggregator --- cmd/csaf_aggregator/mirror.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/csaf_aggregator/mirror.go b/cmd/csaf_aggregator/mirror.go index a6ef984..a17a180 100644 --- a/cmd/csaf_aggregator/mirror.go +++ b/cmd/csaf_aggregator/mirror.go @@ -557,6 +557,11 @@ func (w *worker) mirrorFiles(tlpLabel csaf.TLPLabel, files []csaf.AdvisoryFile) continue } + if util.CleanFileName(sum.ID) != filename { + log.Printf("ID %q does not match filename %s", + sum.ID, filename) + } + if err := w.extractCategories(label, advisory); err != nil { log.Printf("error: %s: %v\n", file, err) continue