Skip to content

feat(cve5): warn when the latest release is still affected - #315

Open
Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/276-release-catalog-warning
Open

Anurag-S1ngh wants to merge 1 commit into
apache:mainfrom
Anurag-S1ngh:fix/276-release-catalog-warning

Conversation

@Anurag-S1ngh

Copy link
Copy Markdown

Summary

The email tab now checks the ASF release catalog for the latest release of each product with an ASF software-id Package URL. If that release is still in an affected range, the tab shows a warning before the notification emails are sent.

Changes

  • Add customRoutes/releasecatalog.js, an authenticated proxy for the release-catalog.apache.org/<project>@latest manifest with a 10 minute cache.
  • Add release catalog and semver range helpers in custom/cve5/script.js.
  • Show the warning on the email tab in custom/cve5/edit.pug and style it in custom/cve5/style_overrides.css.
  • Add unit tests for project extraction, version comparison, ranges, changes and default status.

Testing

  • VULNOGRAM_TLS_CERT=unittest/cert.pem VULNOGRAM_TLS_KEY=unittest/key.pem npm run unittest passes.
  • The editor template compiles and contains the warning wiring.
  • The proxy returned 10.1.62 for tomcat, served the second request from the cache, and returned 400/404 for invalid and unknown projects.

Notes

The check only runs for records that carry a pkg:software-id/apache.org/<project> Package URL, because that is the exact catalog key. Records with only ecosystem PURLs are skipped to avoid a wrong project mapping and a false warning.

Closes #276

Look up the latest release for a software-id Package URL in the ASF release catalog and warn on the email tab when it is still in an affected range.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add warning before publishing notification emails when the lastest version is still in the affected range

1 participant