Skip to content

Configure SAST analyzers CI to trigger blocking bridge non-DinD jobs for test projects

Background

In order to properly test and QA our analyzers and their wrapper Secure projects we should setup multi-project pipelines to trigger downstream executions of our test projects from analyzer projects. We currently rely on either manual testing or analyzers' included test/fixtures to ensure there are no regressions. This is time consuming and not very efficient.

We recently introduced new jobs to CI templates in order to trigger test project's pipelines. We done configuring those for in Dependency Scanning analyzers. We should do the same for SAST analysers. You can see how it is done in Dependency Scanning here or you can simply check gemnasium-python

Tasks

  • For each of the analyzers below with existing test projects, add CI job for master/tags to trigger downstream QA projects. Please keep current integration tests in place as that will give us test coverage on MR branches.
  • Update release process docs to explicitly state that master must be passing before creating a tag to release a new version.

Current State

As of May 22, 2020, the MRs that have been created add downstream pipelines that use DinD (via the SAST orchestrator). But, the intent of this issue is to use non-DinD and avoid the SAST orchestrator.

While the downstream DinD pipelines add coverage, this issue should not be considered closed until we have non-DinD coverage given that non-Dind is now the default.

No DinD implementation plan

  • Engineers add their name in the column(s) for projects in which they want to call dibs.
  • If a no_dind-FREEZE does not exist, create it via MR.
  • Create an MR against the test project's no_dind-FREEZE branch to add SAST to the CI, configured without DinD.
  • Add MR establishing a no-DinD configuration to the matrix.

Related issue

#10658 (closed)


Analyzer to test project matrix

Scan tool Test Projects DinD MR No-DinD MR Volunteer
bandit python-pip, python-pipenv !29 gitlab-org/security-products/analyzers/bandit!39 (merged) @twoodham
brakeman ruby-bundler-rails !23 gitlab-org/security-products/analyzers/brakeman!32 (merged) @twoodham
ESLint security plugin js !22 gitlab-org/security-products/analyzers/eslint!39 (merged) @dsearles
ESLint react plugin #214736 (closed) N\A gitlab-org/security-products/analyzers/eslint!39 (merged) @dsearles
Flawfinder c, cplusplus !20 gitlab-org/security-products/analyzers/flawfinder!27 (merged) @theoretick
Gitleaks and TruffleHog secrets !41 N/A N/A
Gosec go, go-modules !37 gitlab-org/security-products/analyzers/gosec!52 (merged) @twoodham
Kubesec #214735 (closed) N/A N/A N/A
NodeJsScan big-node-js, node-js-disable-babel !50 gitlab-org/security-products/analyzers/nodejs-scan!63 (merged) @twoodham
phpcs-security-audit php-composer !23 gitlab-org/security-products/analyzers/phpcs-security-audit!30 (merged) @theoretick
pmd apex-salesforce !13 gitlab-org/security-products/analyzers/pmd-apex!26 (merged) @theoretick
Security Code Scan csharp-dotnetcore-multiproject !28 gitlab-org/security-products/analyzers/security-code-scan!40 (merged) @theoretick
Sobelow elixir-phoenix !20 gitlab-org/security-products/analyzers/sobelow!27 (merged) @theoretick
SpotBugs with the find-sec-bugs plugin java-maven, java-maven-multimodules, java-groovy, java-gradle, scala-sbt !37 gitlab-org/security-products/analyzers/spotbugs!49 (merged) @theoretick
TSLint config security typescript-yarn !14 DESCOPED - This analyzer will be archived in %13.4. @dsearles
Edited by Daniel Paul Searles