Skip to content

[CS For Registry] Set report_type to CONTAINER_SCANNING_FOR_REGISTRY for cs report vulnerabilities

Description

  1. During vulnerability ingestion by CS report, set the vulnerability report type(vulnerability.report_type) to CONTAINER_SCANNING_FOR_REGISTRY.
  2. After this step, vulnerabilities returned by report_type: CONTAINER_SCANNING should not have these vulnerabilities.
  3. This is only required for vulnerabilities created by CS report under this issues
  4. Revert gitlab-org/security-products/analyzers/container-scanning!3021 (merged)

User Impact

No direct user impact as this is a backend implementation. Although, make sure that user does not see the vulnerabilities created by registry event in development or OCS vulnerability tab.

Non-functional requirements

  • Benchmarking: Assess the performance impact of using the newly introduced data for filtering.
  • Testing: Add unit tests/specs.

Implementation plan

TODO

Verification steps

  1. Ingest a CS report with scan.type container_scanning_for_registry
  2. Verify that db records are created as per the requirements.
  3. Run advisory scanner and report parser.
  4. Verify that the vulnerabilities are created with report_type: CONTAINER_SCANNING_FOR_REGISTRY
Edited by Aditya Tiwari