[CS For Registry] Set report_type to CONTAINER_SCANNING_FOR_REGISTRY for cs report vulnerabilities
Description
- During vulnerability ingestion by CS report, set the vulnerability report type(vulnerability.report_type) to CONTAINER_SCANNING_FOR_REGISTRY.
- After this step, vulnerabilities returned by
report_type: CONTAINER_SCANNING
should not have these vulnerabilities. - This is only required for vulnerabilities created by CS report under this issues
- 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
- Ingest a CS report with
scan.type
container_scanning_for_registry
- Verify that db records are created as per the requirements.
- Run advisory scanner and report parser.
- Verify that the vulnerabilities are created with report_type: CONTAINER_SCANNING_FOR_REGISTRY
Edited by Aditya Tiwari