Non OS packages are present in the CycloneDX SBOM report generated by Trivy (Container Scanning)

Summary

The Container Scanning job using the Trivy scanner is generating an SBOM cycloneDX artifact report that contains OS packages but apparently also Language packages like pypi ones, even if the "Report language-specific findings" option is not enabled (disabled by default).

See this cylcloneDX.json example

Steps to reproduce

Example Project

https://gitlab.com/juliebyrne-amazing-demo/customer-specific-demos/monorepo-work/monorepo-container-scans

What is the current bug behavior?

Non OS packages like pypi purl type are reported in the CycloneDX report generated by trivy even if the "Report language-specific findings" option is not enabled.

What is the expected correct behavior?

Non OS packages like pypi purl type are only reported in the CycloneDX report generated by trivy when the "Report language-specific findings" option is enabled.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes