You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2a3fdf7
Browse filesBrowse the repository at this point in the historyBrowse files
Keep each advisory when merging duplicate alerts (#134)
* Keep each advisory when merging duplicate alerts
Dedupe keyed alerts on type, severity, category, file and position. Every
advisory of one severity on a package shares an alert type (criticalCVE,
cve and so on) and has no file, so they all landed on one key and only the
first survived. fullscans.stream() and purl.post() both go through this, so
handlebars@4.0.11 came back with one criticalCVE alert instead of six.
The merge also kept the first alert's action. When the first advisory of a
group was resolved or triaged to monitor or ignore, the Block action on the
others was lost with them, and a caller that blocks on action == "error"
passed.
The alert key now includes the advisory ID (props.ghsaId, then cveId), and
a merged alert keeps the most severe action seen (error > warn > monitor >
ignore). Alerts without an advisory ID merge as before.
Bumps the version to 3.6.3.
* Document dedupe merge details and cover edge cases
Scope the changelog's cross-release merging to purl.post(): fullscans.stream()
rows carry no purl, so each release file stays its own artifact there.
Note in the changelog and code that a merged alert keeps the first sighting's
key while its action can come from another release, and that the extra
advisory prop names mirror socket-python-cli's ADVISORY_ID_PROPS.
An unknown or missing action keeps ranking below ignore, so it never replaces
a known action and can't downgrade a known error. Tests pin that in both
orders, along with the first-key behavior, a CVE next to a non-advisory alert
on one package, and an empty input. Fix blank-line spacing in the new tests.
* Tighten dedupe comments
---------
Co-authored-by: lelia <2418071+lelia@users.noreply.github.com>
0 commit comments