SAST that doesn't rely on Docker-in-Docker
What does this MR do?
This builds on $CI_PROJECT_REPOSITORY_LANGUAGES
being added in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/16477 (merged) and is being done in support of https://gitlab.com/gitlab-org/gitlab-ee/issues/10796
Here, we are leveraging the $SAST_DISABLE_DIND
variable to determine how to run SAST in regards to Docker-in-Docker. This lets us move forward in our efforts to move away from Docker-in-Docker before we have a final solution.
When $SAST_DISABLE_DIND
is set to false, or not set at all, we continue to use the old way of running SAST. But, if it is set to true, we are no longer reliant on Docker-in-Docker to run the various SAST analyzers. We are picking which analyzers to run based on the languages used in the given project.
Notes:
- We run the nodejs-scanner and the eslint scanner for JavaScript projects because we can't determine which of these scanners should be ran.
- We attempt to run brakeman for all Ruby projects, even though we can only run it for Ruby on Rails projects.
There is a lot of discussion in the Epic this belongs to, but I think &971 (comment 213541000) and &971 (comment 216002723) are a good summary for where we are at now.
Screenshots
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