Enable vulnerability scanning by default with GitLab >= 18.5
What does this MR do and why?
Enable vulnerability scanning by default with GitLab >= 18.5
- Replace
CIflag withCI_SERVER_VERSIONand use it to validate bothCIpresence and minum Gitlab version - Add semver logic to check minum version and use it to condition vulnerability scanning execution (compare Major.Minor only)
- Temporarily skip vulnerability scanning when SBOM scan API feature flag is disabled or when hitting rate limit (rollout)
This is the second attempt to enable this feature by default in the analyzer. The first attempt did not consider the fact that older self-managed Gitlab instances using the same v0 image would cause the client to try and reach the API but get a 404 response. This leads to failing the whole DS analyzer execution.
This MR ensures that the new behavior is only enabled when used with GitLab instance providing the required API endpoints.
It also ensures the analyzer execution won't fail if the backend api FF is disabled or if the api rate limit is reached. These are two temporary measure during the rollout phase, so we can test the sbom scan api behavior at scale without negatively impacting customers if a problem arises.
Related issues
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
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.