Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Snyk orb with snyk executable #303

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: 2.1

orbs:
snyk: snyk/snyk@2.2.0
aws-cli: circleci/aws-cli@4.1.3 # use v4 of this orb
aws-ecr: circleci/aws-ecr@9.0.2 # this orb doesn't support OIDC v2, so we use aws-cli to authenticate
crime-forms-end-to-end-tests: ministryofjustice/crime-forms-end-to-end-tests@volatile
Expand Down Expand Up @@ -51,6 +50,14 @@ references:
sudo apt install -y python3-pip
pip install yamllint

_install-snyk: &install-snyk
run:
name: Install snyk CLI
command: |
curl --compressed https://downloads.snyk.io/cli/stable/snyk-linux -o snyk
chmod +x ./snyk
sudo mv ./snyk /usr/local/bin/

commands:
install-requirements:
steps:
Expand Down Expand Up @@ -206,8 +213,7 @@ jobs:
- setup_remote_docker:
docker_layer_caching: false
- build-docker-image-for-scan
- snyk/install:
token-variable: SNYK_TOKEN
- *install-snyk
- run:
name: Run static code analysis
command: snyk code test --severity-threshold=high
Expand Down Expand Up @@ -239,8 +245,7 @@ jobs:
- checkout
- setup_remote_docker:
docker_layer_caching: false
- snyk/install:
token-variable: SNYK_TOKEN
- *install-snyk
- run:
name: Scan container image for vulnerabilities
command: snyk container test metabase/metabase:v0.50.24.4 --policy-path=.snyk --severity-threshold=high
Expand Down