Skip to content

Identify secure jobs in a pipeline

Cameron Swords requested to merge identify-secure-jobs-in-pipeline into master

What does this MR do?

A Security::JobsFinder has been added to return builds/jobs for a pipeline that are related to the Secure team products. These include SAST, DAST, Dependency Scanning and Container Scanning.

This issue resolves the part of #13662 (closed) regarding finding Secure jobs in a pipeline.

Technical choices

  • We can only determine Secure jobs at the moment by their artifacts:reports:{sast | dast | ...} in the Ci::Build#options
  • There is a feature toggle, :ci_build_metadata_config, that if turned on would cause the options to be stored in Ci::BuildMetadata#config_options. This MR ensures Secure jobs are found independently of the feature being enabled or disabled.
  • When querying, the DB will choose one of the commit_id indexes as we're also searching for pipeline.

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Cameron Swords

Merge request reports