diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9265bd2a389e5c9a5469fd24846f90f1810d582f..3af09d34c7cbb16ff7d29ba92845f116521162ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ cache: - venv/ before_script: - - python -V + - python3 -V - make virtualenv - . venv/bin/activate @@ -34,6 +34,45 @@ typing: script: - make type_check +dependency_scanning: + image: docker:stable + before_script: + - apk add -U build-base git postgresql-dev python3 python3-dev + - python3 -V + - make virtualenv + - . venv/bin/activate + - pip freeze > requirements.txt + after_script: + - rm -f requirements.txt + variables: + DOCKER_DRIVER: overlay2 + allow_failure: true + services: + - docker:stable-dind + script: + #- find requirements.d -iname '*.txt' -exec cat '{}' \; > requirements.txt + #- find frontends/* -iname requirements.txt -exec cat '{}' \; >> requirements.txt + #- echo "$(egrep -v '^#|^$' requirements.txt | sort -u)" > requirements.txt + - export DS_VERSION=${SP_VERSION:-$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')} + - | + docker run \ + --env DS_ANALYZER_IMAGES \ + --env DS_ANALYZER_IMAGE_PREFIX \ + --env DS_ANALYZER_IMAGE_TAG \ + --env DS_DEFAULT_ANALYZERS \ + --env DEP_SCAN_DISABLE_REMOTE_CHECKS \ + --env DS_DOCKER_CLIENT_NEGOTIATION_TIMEOUT \ + --env DS_PULL_ANALYZER_IMAGE_TIMEOUT \ + --env DS_RUN_ANALYZER_TIMEOUT \ + --volume "$PWD:/code" \ + --volume /var/run/docker.sock:/var/run/docker.sock \ + "registry.gitlab.com/gitlab-org/security-products/dependency-scanning:$DS_VERSION" /code + #- rm -f requirements.txt + dependencies: [] + artifacts: + reports: + dependency_scanning: gl-dependency-scanning-report.json + # pages: # script: # - pip install sphinx sphinx-rtd-theme