Normalize package_name for dependency scanning
What does this MR do and why?
Normalize package name for dependency scanning only for python packages.
References
Related issue: Duplicated vulnerabilities due to mismatch in c... (#552648 - closed) • Zamir Martins • 18.4
How to set up and validate locally
- Create a new project
- Add a
requirements.txtfile withFlask==2.0.2as its contents - Create a
.gitlab-ci.ymlwith the below contents:
include:
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
- Commit/push changes and trigger a pipeline run (on default branch)
- Once pipeline has finished, check the vulnerability report on the project and search by
Identifier = CVE-2023-30861 - Observe duplicate vulnerabilities
- One will have scanner
GitLab SBoM Vulnerability Scannerand Vulnerable package =flask:2.0.2 - One will have scanner
gemnasium-pythonand Vulnerable package =Flask:2.0.2 - Note different casing of
F/f
- One will have scanner
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Zamir Martins