Skip to content

Commit 247722a

Browse files
authored
Merge pull request #133 from snyk/develop
Merge develop into master to release
2 parents 2687514 + 5b8311f commit 247722a

File tree

5 files changed

+29
-11
lines changed

5 files changed

+29
-11
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,43 @@ This extension requires that Node.js and npm be installed on the build agent. Th
4040
### Simple Application Testing Example
4141

4242
```
43-
- task: SnykSecurityScan@0
43+
- task: SnykSecurityScan@1
4444
inputs:
4545
serviceConnectionEndpoint: 'mySnykToken'
4646
testType: 'app'
47-
monitorWhen: 'always'
4847
failOnIssues: true
48+
monitorWhen: 'always'
49+
```
50+
51+
### If you do not want the Snyk task fail your pipeline when issues are found, but still want to monitor the results in the Snyk UI
52+
53+
To do this, you need to:
54+
55+
- set `failOnIssues` to `false`, which will make sure the Snyk task will not fail your pipeline even if issues (vulnerabilities, etc) are found
56+
- have `monitorWhen` set to `always` (or just leave `monitorWhen` out, since `always` is the default)
57+
58+
Here's a full example:
59+
60+
```
61+
- task: SnykSecurityScan@1
62+
inputs:
63+
serviceConnectionEndpoint: 'mySnykToken'
64+
testType: 'app'
65+
failOnIssues: false
66+
monitorWhen: 'always'
4967
```
5068

5169
### Simple Container Image Testing Example
5270

5371
```
54-
- task: SnykSecurityScan@0
72+
- task: SnykSecurityScan@1
5573
inputs:
5674
serviceConnectionEndpoint: 'mySnykToken'
5775
testType: 'container'
5876
dockerImageName: 'my-container-image-name'
5977
dockerfilePath: 'Dockerfile'
60-
monitorWhen: 'always'
6178
failOnIssues: true
79+
monitorWhen: 'always'
6280
```
6381

6482
---

ops/deploy/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
/* Source Map Options */
2121
"inlineSourceMap": true /* Emit a single file with source maps instead of having a separate file. */,
22-
"inlineSources": true /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
22+
"inlineSources": true /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */,
23+
"useUnknownInCatchVariables": false
2324
}
2425
}

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,13 @@
5050
"dependencies": {
5151
"azure-pipelines-task-lib": "2.9.3",
5252
"jquery": "^3.4.1",
53-
"request": "^2.88.0",
5453
"vss-web-extension-sdk": "^5.141.0"
5554
},
5655
"devDependencies": {
5756
"@semantic-release/changelog": "^5.0.1",
5857
"@semantic-release/exec": "^5.0.0",
5958
"@types/jest": "^24.0.18",
60-
"@types/node": "^12.7.1",
59+
"@types/node": "^16.11.10",
6160
"@types/q": "^1.5.2",
6261
"@typescript-eslint/eslint-plugin": "^2.0.0",
6362
"@typescript-eslint/parser": "^2.0.0",
@@ -70,9 +69,8 @@
7069
"mock-fs": "^4.10.4",
7170
"prettier": "^2.3.1",
7271
"semantic-release": "^17.0.4",
73-
"sync-request": "^6.1.0",
7472
"tfx-cli": "^0.7.11",
7573
"ts-jest": "^26.3.0",
76-
"typescript": "^3.5.3"
74+
"typescript": "^4.5.2"
7775
}
7876
}

snykTask/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
}
149149
],
150150
"execution": {
151-
"Node": {
151+
"Node10": {
152152
"target": "./dist/index.js"
153153
}
154154
}

snykTask/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
/* Source Map Options */
1616
"inlineSourceMap": true /* Emit a single file with source maps instead of having a separate file. */,
17-
"inlineSources": true /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
17+
"inlineSources": true /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */,
18+
"useUnknownInCatchVariables": false
1819
}
1920
}

0 commit comments

Comments
 (0)