Enable OCS users to easily retrieve Trivy scan report

Why are we doing this work

When customers raise support requests for OCS issues. It can be useful to retrieve the Trivy report for debugging. However, this is difficult to perform at this point since the Trivy report is being stored in the chained config map, and its deleted right after a scan.

We should make it easy for the user to disable the deletion of the config map and provide a way to recreate the report from the chained config maps.

Relevant links

Support issues where this could have helped:

  • https://gitlab.com/gitlab-com/sec-sub-department/section-sec-request-for-help/-/issues/358+
  • There was another request raised in slack but I can't recall if we created an issue for it

Implementation Plan

  • Add an agent config delete_report:true that is false by default, to skip the chained config maps deletion.
  • Ensure that existing chained config maps are deleted before a new scan is run
  • Create a script to read the chained config maps into a json file.
Edited Aug 29, 2024 by Shao Ming Tan
Assignee Loading
Time tracking Loading