Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/anchore_security_cli/legacy/cve5.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import os
import tomllib
from copy import deepcopy
from dataclasses import dataclass
from glob import iglob
from typing import Any
Expand Down Expand Up @@ -316,6 +317,14 @@ def _process_cve_record(cve: CVERecord, curator: dict[str, Any], output_dir: str
if versions:
p["versions"] = versions

if record_type == "jenkins-plugin":
p2 = deepcopy(p)
p2["collectionURL"] = r["registry"]
p2["packageName"] = r["plugin_name"]
if "packageURL" in p2:
del p2["packageURL"]
cve5_affected.append(p2)

for patch_ref in patch_references:
cve5_references.append(
{
Expand Down Expand Up @@ -388,7 +397,6 @@ def _process_spec_file(spec_file: str, output_dir: str):

def generate(spec_path: str, output: str):
logging.info(f"Start generating CVE 5 from {spec_path}")

for f in iglob(os.path.join(spec_path, "**/ANCHORE-*.toml"), recursive=True):
logging.debug(f"Start processing spec {f}")
_process_spec_file(f, output)
Expand Down