Remove requirement for Docker-In-Docker for SAST scanners
Problem to solve
Requiring Docker-in-Docker (DinD) for security scanners causes security, performance and setup concerns for many users. DinD is only required to be able to orchestrate the analyzers. One solution would be to port the code of the sast orchestrator directly into the runner.
NB: SAST and Dependency scanning share a common library and the same orchestration model, see Dependency Scanning issue
See &971 for previous comments.
As describe here:
Ideally, https://gitlab.com/gitlab-org/gitlab-ee/blob/master/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml would just contain:
include: template: SAST-bandit.gitlab-ci.yml template: SAST-brakeman.gitlab-ci.yml template: SAST-gosec.gitlab-ci.yml [...]
So that we have only one SSOT and one single location to update for analyzers. Users who want to use specific analyzers can use the one-liner
- Decide what to do with some variables not being used anymore, like https://gitlab.com/gitlab-org/security-products/sast#timeouts
- Port the report aggregation to the Rails backend (currently done in common; ported by #10857 (closed))
- Port the vulnerabilities deduplication to the Rails backend (currently done in common; ported by #10857 (closed))
- Port other features like "ignore paths" to the Rails backend (currently done in common (refs #10030 (closed))
- Explore improving the CI configuration with files detection &971 (comment 200189550)
- Decide on a plan for deprecating, and ultimately archiving the existing SAST tool &971 (comment 211694279)
- Update the vendored templates
- Update the documentation
- Update all related tests projects in https://gitlab.com/gitlab-org/security-products/tests
What does success look like, and how can we measure that?
There is no more orchestration layer for SAST, instead each analyzer has its own job configured by the corresponding vendored template.