Skip to content

Create Gemnasium primary identifier when running continuous scanner

Oscar Tovar requested to merge otovar/create-primary-identifiers into master

What does this MR do and why?

To prevent opening duplicate findings that, the finding builder for dependency scanning will recreate the Gemnasium primary identifier. Historically, Gemnasium has created a custom identifier at runtime to guarantee a stable identifier that can be used for deduplication. The identifier is created by sourcing the uuid of an advisory from the Gitlab Advisory Database, and prefixing it with "Gemnasium-". The uuid has now been stored in the PackageMetadata::Advisory model as advisory_xid (where xid stands for external id), which allows the Rails monolith to perfectly recreate, thus preventing duplicates.

Closes #417787 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Oscar Tovar

Merge request reports

Loading