From f8a8dbe92adfda907ea47fb3e9d85616a9a61e03 Mon Sep 17 00:00:00 2001 From: Weston Steimel Date: Thu, 6 Aug 2026 11:16:38 +0100 Subject: [PATCH] fix: skip openssf entries with temp or missing id Signed-off-by: Weston Steimel --- .../identifiers/providers/openssf_malicious_packages.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/anchore_security_cli/identifiers/providers/openssf_malicious_packages.py b/src/anchore_security_cli/identifiers/providers/openssf_malicious_packages.py index 66cb5c4..3aa3220 100644 --- a/src/anchore_security_cli/identifiers/providers/openssf_malicious_packages.py +++ b/src/anchore_security_cli/identifiers/providers/openssf_malicious_packages.py @@ -29,7 +29,13 @@ def _process_fetch(self, content_dir: str) -> list[ProviderRecord]: with open(file) as f: data = json.load(f) - record_id = data["id"] + record_id = data.get("id") + + if not record_id or not record_id.startswith("MAL-"): + continue + + if record_id.startswith("MAL-0000-"): + continue aliases = data.get("aliases", []) if record_id in self._indexed_alterations: