From 2d68ab71a83083227ec3ff325ec6718a58899d02 Mon Sep 17 00:00:00 2001 From: "rosemary.teague" Date: Wed, 24 Apr 2019 15:59:02 +0100 Subject: [PATCH] feat: Enable snyk-python testing Part of osp-cfc-platform/backlog#1045 --- .travis.yml | 1 + .travis/docker-build.sh | 1 + .travis/docker-push.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 583e162..f6f125c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ env: global: - REGISTRY_USER=ocadotechnologygitlab - VCS_SOURCE="https://github.com/${TRAVIS_REPO_SLUG}" + - SNYK_MODE=WARN - secure: "z0oUHGGWxqtNuOyGz5DGi83gmAUDcS9ksVJrYVBLGUvgxeUCoYtNyySlLE/81bbKyTdLdeqtv0kEKhCIP1G9a1P+f2D9UCuu/pTSgEgjUlbBJqA+3seckQWt/SnfWr3hU/ySqt0UtB47rRyttZBzQmYgf2ECmDhVASRi3B02ogNHW4wwFBUwwYllotKXijz6NyYO85tzE2SeNrO8G2z0UjpLZAQawL3Whx5ApQeMm6iotDkSoQdUY0BtVap3rjG6wiY5WCBraPMWjlEZKCrbs08T7qqSkiB/RklXAppSSwB5OaLsH68xVE1/ZaNvvKa1YutoubJytyKYHYtVLBOyDOyYYPVn/Kgch0jnLL5hLkoyz8PDrHw2Pop9j+yNUUbEEihQbVpsU518IGX0X/z/jiy/nIcFIBo7diXzg+3w425Nk8iRKdmfaOC/t9/+qhpo+ULVloZcVr2Wv6kM34RDoowjit4SVRCn7XFo5PibQO+5neV0jdS5F/NPCF1LdWBV5uxjlLxcMxwEVTi4uvufRBswpOI2P9B9HY2lF02eLtCC7w90A954uIX/Gjojqy0QMbzKfPCl3IV0Geq5lcYhu8Hz9GqOJC/b81KcnvWGNzKYJjUIAWIWxjremkTMS12dgE8DGTx8p7z7nepWRqV63zVIYcRMP22517wZkTNaxEE=" - secure: "E3TDS6rQtk6+yeywcVnHiAYOhzKAbUT4QR3yR0HckPa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ZkLDmnElkaXVZDytWEkvBFK6RCOQjJKS2MZcX9k6hOfXqmvYSi6HlSuJIq17gN69DcM8A/5F5NarxsRBE+NlUz2EX4RalR4FaDC6LeHvRAObc9ElYgDvD7+q9ZbVJbcePuFXQeabUPQy/HKpPM3nJVSU/dOky3wKwpDSjhGViHJQh123pdFwCdABjiWd8qkblFGAI599+A+L74eBDgjET+r5/3s/7HvdG4aHl0aFQyAfIJVLUZGRUEXgkTK5YYCCs62x/vNSNOI=" diff --git a/.travis/docker-build.sh b/.travis/docker-build.sh index 49642fe..921af73 100755 --- a/.travis/docker-build.sh +++ b/.travis/docker-build.sh @@ -4,6 +4,7 @@ testSnykIfEnabled() { if [ -n "${SNYK_ORG}" ] && [ -n "${SNYK_TOKEN}" ]; then local errors_found=false snyk test --org="${SNYK_ORG}" --docker "${TRAVIS_REPO_SLUG}" --policy-path=.snyk --file=Dockerfile || errors_found=true + snyk test --org="${SNYK_ORG}" --policy-path=.snyk --file=requirements.txt || errors_found=true if ${errors_found} && [ "${SNYK_MODE}" != "WARN" ] ; then exit 1 fi diff --git a/.travis/docker-push.sh b/.travis/docker-push.sh index 424780d..4fe73ec 100755 --- a/.travis/docker-push.sh +++ b/.travis/docker-push.sh @@ -3,6 +3,7 @@ performSnykAnalysisIfEnabled() { if [ -n "${SNYK_ORG}" ] && [ -n "${SNYK_TOKEN}" ]; then snyk monitor --org="${SNYK_ORG}" --docker "${TRAVIS_REPO_SLUG}:${TRAVIS_COMMIT}" --policy-path=.snyk + snyk monitor --org="${SNYK_ORG}" --file=requirements.txt --policy-path=.snyk if [[ -n "$TRAVIS_TAG" ]]; then snyk monitor --org="${SNYK_ORG}" --docker "${TRAVIS_REPO_SLUG}:${TRAVIS_TAG}" fi