How do you enable security scanning in GitLab CI?
BeginnerConceptTool Internals and Comparisons
Answer
GitLab ships maintained job templates that you include in .gitlab-ci.yml:
include:
- template: Jobs/SAST.gitlab-ci.yml
- template: Jobs/Secret-Detection.gitlab-ci.yml
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
- template: Jobs/Container-Scanning.gitlab-ci.yml
stages: [build, test]
The jobs produce JSON reports in GitLab's security schema. SAST and secret detection run on all tiers; the merge request security widget, vulnerability report and security policies (scan and merge request approval policies) require Ultimate.
More on Tool Internals and Comparisons
How does Trivy get its vulnerability data, and how do you run it air-gapped?AdvancedWhich scan targets and scanners does Trivy support?IntermediateHow does Falco capture system calls?AdvancedHow does OPA evaluate a Rego policy? Give an example.IntermediateWhat are the ways to deploy OPA, and what are decision logs?AdvancedHow does Vault achieve high availability with integrated storage?Advanced