Add Dependency Scanning support for Python 3.12
Context
Python 3.12 has been released as production ready.
The resolution of packages is highly dependent on the version of Python used, so it's important to provide images that are equivalent to the versions running in production for customers.
Not doing so can lead to bugs or inaccurate dependency resolution that results in false negatives and false positives once advisory matching takes place.
Links
-
Python version status
- 3.12 has been released outside of pre-release stages.
Proposal
Our current approach to support additional versions of python is to generate a different container image that can be used as a replacement for the Dependency Scanning CI job. Though, this approach incurs additional maintenance costs for our development team. Alternatives have been discussed and the following solutions have been suggested:
- supporting pip-compile lock files Handle requirements.txt files produced by pip-c... (#418321 - closed):
- it would make the scan a lot faster and skip the dependencies installation.
- It's more accurate. The scanner knows the exact versions used by the project.
- It's compatible with any version of Python, and removes potential compatibility issues.
- It works with offline environments out of the box, because the analyzer doesn't download any packages.
- supporting CycloneDX SBOM generators other than Gemnasium Spike: Replace Gemnasium with open source nativ... (#434143).
- Users can easily integrate the tool they want to generate an SBOM report
- The SCA features don't need to know anything about the project's build specificities, and thus any complexity in supporting them is avoided.
Implementation
TODO