Rails Backend: Support Secrets-specific report type

Goal

We need to support a new Secrets-specific report type in order to support the frontend work for adding Secret Detection to the Configuration Page in #204987 (closed)

Requirements

We need to add a new report type. We can base this off of SAST and call it "Secret Detection" in its various forms.

SAST Secret Detection counterpart
sast secret detection / secret_detection
Sast Secret Detection / Secret-Detection
SAST context dependent, but probably Secret Detection
sast_reports secret_detection_reports
gl-sast-report.json gl-secret-detection-report.json
SAST.gitlab-ci.yml Secret-Detection.gitlab-ci.yml
secrets-sast (pipeline job name) secret-detection

And here is a not-necessarily-complete list of the files that will need to be changed:

  • app/models/ci/job_artifact.rb
  • ee/app/controllers/ee/projects/merge_requests_controller.rb
  • ee/app/models/ee/ci/build.rb
  • ee/app/models/ee/ci/job_artifact.rb
  • ee/app/models/ee/ci/pipeline.rb
  • ee/app/models/ee/merge_request.rb
  • ee/app/models/ee/merge_request.rb
  • ee/app/models/ee/namespace.rb
  • ee/app/models/license.rb
  • ee/app/models/security/scan.rb
  • ee/app/models/vulnerabilities/feedback.rb
  • ee/app/models/vulnerabilities/occurrence.rb
  • ee/app/presenters/ee/ci/pipeline_presenter.rb
  • ee/app/presenters/projects/security/configuration_presenter.rb
  • ee/app/views/projects/merge_requests/show.html.haml
  • ee/lib/ee/gitlab/ci/parsers.rb
  • ee/lib/ee/gitlab/ci/parsers.rb
  • ee/lib/ee/gitlab/usage_data.rb

Internal gitlab CI yml files that will likely need to be updated:

  • .gitlab/ci/rules.gitlab-ci.yml:
  • .gitlab/ci/reports.gitlab-ci.yml:

We will also need to change the related spec files and documentation.

Edited by Lucas Charles