From 759d3f8709fd293c6c2c1d4e6ca1e8003c827fad Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sat, 10 Nov 2018 22:39:22 +0500 Subject: [PATCH] gitlab-ci: enable SAST --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c3a6cb8..13663a9d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,3 +20,24 @@ precise: <<: *ubuntu_def image: ubuntu:precise + +# +# flawfinder +# see https://docs.gitlab.com/ee/user/project/merge_requests/sast.html +# +sast: + image: docker:stable + variables: + DOCKER_DRIVER: overlay2 + allow_failure: true + services: + - docker:stable-dind + script: + - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') + - docker run + --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" + --volume "$PWD:/code" + --volume /var/run/docker.sock:/var/run/docker.sock + "registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code + artifacts: + paths: [gl-sast-report.json]