Identify secure jobs in a pipeline
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 theCi::Build#options
- There is a feature toggle,
:ci_build_metadata_config
, that if turned on would cause theoptions
to be stored inCi::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
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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