Skip to content

Commit

Permalink
handle platform cpes
Browse files Browse the repository at this point in the history
Signed-off-by: Weston Steimel <[email protected]>
  • Loading branch information
westonsteimel committed Jan 31, 2025
1 parent 55f29ef commit 0a8e819
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,26 @@ def generate():
}
)

platform_cpes = affected.get("platformCpes", [])
if platform_cpes:
configuration["operator"] = "AND"
matches = []
for cpe in platform_cpes:
match = {
"vulnerable": False,
"criteria": cpe,
}
match["matchCriteriaId"] = generator.generate(cpe_match)
matches.append(match)

configuration["nodes"].append(
{
"cpeMatch": matches,
"negate": False,
"operator": "OR",
}
)

override["cve"]["configurations"].append(configuration)

references = enriched["adp"].get("references")
Expand Down

0 comments on commit 0a8e819

Please sign in to comment.