From e25fcaa5d77b6ed47a55722a6d9b409d9c9169ca Mon Sep 17 00:00:00 2001 From: Arthur Granado Date: Thu, 26 Mar 2020 16:46:36 +0000 Subject: [PATCH 1/2] docs: Typo in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f9e118..bf70cce 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,14 @@ Use the Snyk orb to easily incorporate Snyk into your CircleCI Workflows. -By utilizing this orb in your projects workflow, it is possible to use Snyk to test, fix and monitor your project for vulnerabilities in the app dependencies and Docker images, all with a single command. You can set thresholds for vulnerability tolerance in your app or Docker image (and fail the workflows when threshold is exceeded), apply proprietary Snyk patches, and save dependency snapshots on snyk.io for continuous monitoring and alerting. +By utilizing this orb in your project workflow, it is possible to use Snyk to test, fix and monitor your project for vulnerabilities in the app dependencies and Docker images, all with a single command. You can set thresholds for vulnerability tolerance in your app or Docker image (and fail the workflows when threshold is exceeded), apply proprietary Snyk patches, and save dependency snapshots on snyk.io for continuous monitoring and alerting. ## How to use the Snyk Orb In fact, it is very easy to start using the Orb. All you need to do is: -1. Follow the instructions at the [Orb Quick Start Guide](https://circleci.com/orbs/registry/orb/snyk/snyk#quick-start) to enable usage of Orbs in your projects workflow. +1. Follow the instructions at the [Orb Quick Start Guide](https://circleci.com/orbs/registry/orb/snyk/snyk#quick-start) to enable usage of Orbs in your project workflow. 2. Set up an environment variable (`SNYK_TOKEN`) with your Snyk API token, which you can get from your [account](https://app.snyk.io/account). 3. In the app build job, call the `snyk/scan` 4. Optionally, supply parameters to customize orb behaviour From 2c956862e319c119c7a91efdeefb0cd7dc48cb37 Mon Sep 17 00:00:00 2001 From: Arthur Granado Date: Thu, 26 Mar 2020 16:47:02 +0000 Subject: [PATCH 2/2] fix: replace wget to curl --- src/commands/scan.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/commands/scan.yml b/src/commands/scan.yml index e0596a3..eb142e5 100644 --- a/src/commands/scan.yml +++ b/src/commands/scan.yml @@ -15,7 +15,7 @@ parameters: protect: description: Protect the app by applying patches specified in your .snyk file (after running the Snyk wizard) type: boolean - default: false + default: false fail-on-issues: description: This specifies if builds should be failed or continued based on issues found by Snyk. type: boolean @@ -32,7 +32,7 @@ parameters: description: The image name, if scanning a container image type: string default: "" - organization: + organization: description: > Name of the Snyk organisation name, under which this project should be tested and monitored If omitted the default organization will be used. @@ -56,17 +56,17 @@ parameters: install-alpine-dependencies: description: Install additional dependencies required by the alpine cli type: boolean - default: true + default: true steps: # install snyk - - run: + - run: name: Download Snyk CLI command: | if [[ ! -x "/usr/local/bin/snyk" ]]; then if [[ "<>" == "alpine" && "<>" == "true" ]]; then apk add -q --no-progress --no-cache curl wget libstdc++ sudo fi - curl -s https://api.github.com/repos/snyk/snyk/releases/latest | grep "browser_download_url" | grep <> | cut -d '"' -f 4 | xargs wget -q + curl -s https://api.github.com/repos/snyk/snyk/releases/latest | grep "browser_download_url" | grep <> | cut -d '"' -f 4 | xargs -n 1 curl -LO sha256sum -c snyk-<>.sha256 sudo mv snyk-<> /usr/local/bin/snyk sudo chmod +x /usr/local/bin/snyk @@ -85,7 +85,7 @@ steps: - run: name: "Run Snyk test to scan app for vulnerabilities" command: > - snyk test + snyk test <<#parameters.docker-image-name>>--docker <><> <<#parameters.severity-threshold>>--severity-threshold=<><> <<#parameters.organization>>--org=<><> @@ -99,7 +99,7 @@ steps: - run: name: "Run Snyk monitor for continuous monitoring on snyk.io" command: > - snyk monitor + snyk monitor <<#parameters.docker-image-name>>--docker <><> <<#parameters.project>>--project-name=<><> <<#parameters.organization>>--org=<><>