You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| serviceConnectionEndpoint | The Azure DevOps service connection endpoint where your Snyk API token is defined. Define this within your Azure DevOps project settings / S | no | none | String / Azure Service Connection Endpoint of type SnykAuth / Snyk Authentication |
25
-
| testType | Used by the task UI only | no | "application" | string: "app" or "container" |
26
-
| dockerImageName | The name of the container image to test. | yes, if container image test | none | string |
27
-
| dockerfilePath | The path to the Dockerfile corresponding to the `dockerImageName`| yes, if container image test | none | string |
28
-
| targetFile | Applicable to application type tests ony. The path to the manifest file to be used by Snyk. Should only be provided if non-standard. | no | none | string |
29
-
| severityThreshold | The severity-threshold to use when testing and reporting. By default, issues of all severity types will be found. | no | "low" | string: "low" or "medium" or "high" or "critical" |
30
-
| failOnThreshold | The `severityThreshold` parameter is used to control the interaction with the Snyk CLI and reporting vulnerabilities. The `failOnThreshold` gives you additional control over build failure behaviour. For example, with `failOnIssues` set to `true` and `failOnThreshold` to `critical`, all issues would be reported on but _only_ critical issues would cause a build failure. See Usage Examples for more information | no | "low" | string: "low" or "medium" or "high" or "critical" |
31
-
| monitorWhen | When to run `snyk monitor`. Valid options are `always` (default), `noIssuesFound`, and `never`. If set, this option overrides the value of `monitorOnBuild`. | no | "always" | boolean |
32
-
| failOnIssues | This specifies if builds should be failed or continued based on issues found by Snyk. Combine with `failOnThreshold` to control which severity of issues causes the build to fail | yes | true | boolean |
33
-
| projectName | A custom name for the Snyk project to be created on snyk.io | no | none | string |
34
-
| organization | Name of the Snyk organisation name, under which this project should be tested and monitored | no | none | string |
35
-
| testDirectory | Alternate working directory. For example, if you want to test a manifest file in a directory other than the root of your repo, you would put in relative path to that directory. | no | none | string |
36
-
| ignoreUnknownCA | Use to ignore unknown or self-signed certificates. This might be useful in for self-hosted build agents with unusual network configurations or for Snyk on-prem installs configured with a self-signed certificate. | no | false | boolean |
37
-
| additionalArguments | Additional Snyk CLI arguments to be passed in. Refer to the Snyk CLI help page for information on additional arguments. | no | none | string |
| serviceConnectionEndpoint | The Azure DevOps service connection endpoint where your Snyk API token is defined. Define this within your Azure DevOps project settings / S | no | none | String / Azure Service Connection Endpoint of type SnykAuth / Snyk Authentication |
25
+
| testType | Used by the task UI only | no | "application" | string: "app" or "container" |
26
+
| dockerImageName | The name of the container image to test. | yes, if container image test | none | string |
27
+
| dockerfilePath | The path to the Dockerfile corresponding to the `dockerImageName`| yes, if container image test | none | string |
28
+
| targetFile | Applicable to application type tests ony. The path to the manifest file to be used by Snyk. Should only be provided if non-standard. | no | none | string |
29
+
| severityThreshold | The severity-threshold to use when testing and reporting. By default, issues of all severity types will be found. | no | "low" | string: "low" or "medium" or "high" or "critical" |
30
+
| failOnThreshold | The `severityThreshold` parameter is used to control the interaction with the Snyk CLI and reporting vulnerabilities. The `failOnThreshold` gives you additional control over build failure behaviour. For example, with `failOnIssues` set to `true` and `failOnThreshold` to `critical`, all issues would be reported on but _only_ critical issues would cause a build failure. See Usage Examples for more information | no | "low" | string: "low" or "medium" or "high" or "critical" |
31
+
| monitorWhen | When to run `snyk monitor`. Valid options are `always` (default), `noIssuesFound`, and `never`. If set, this option overrides the value of `monitorOnBuild`. | no | "always" | boolean |
32
+
| failOnIssues | This specifies if builds should be failed or continued based on issues found by Snyk. Combine with `failOnThreshold` to control which severity of issues causes the build to fail | yes | true | boolean |
33
+
| projectName | A custom name for the Snyk project to be created on snyk.io | no | none | string |
34
+
| organization | Name of the Snyk organisation name, under which this project should be tested and monitored | no | none | string |
35
+
| testDirectory | Alternate working directory. For example, if you want to test a manifest file in a directory other than the root of your repo, you would put in relative path to that directory. | no | none | string |
36
+
| ignoreUnknownCA | Use to ignore unknown or self-signed certificates. This might be useful in for self-hosted build agents with unusual network configurations or for Snyk on-prem installs configured with a self-signed certificate. | no | false | boolean |
37
+
| additionalArguments | Additional Snyk CLI arguments to be passed in. Refer to the Snyk CLI help page for information on additional arguments. | no | none | string |
38
38
39
39
## Usage Examples
40
40
@@ -67,14 +67,14 @@ Here's a full example:
67
67
monitorWhen: 'always'
68
68
```
69
69
70
-
An example that specifies a value for `severityThreshold` as medium and configures `failOnThreshold` to critical. This configuration would _only fail_ the build when critical issues are found, but all issues detected at medium, high and critical would be reported back to your snyk project for analysis
70
+
An example that specifies a value for `severityThreshold` as medium and configures `failOnThreshold` to critical. This configuration would _only fail_ the build when critical issues are found, but all issues detected at medium, high and critical would be reported back to your snyk project for analysis
it('throws error if invalid severity threshold',()=>{
132
-
expect(
133
-
()=>{
134
-
args.severityThreshold='hey';
135
-
args.validate();
136
-
}
137
-
).toThrow(
138
-
newError('If set, severityThreshold must be \'critical\' or \'high\' or \'medium\' or \'low\' (case insensitive). If not set, the default is \'low\'.')
132
+
expect(()=>{
133
+
args.severityThreshold='hey';
134
+
args.validate();
135
+
}).toThrow(
136
+
newError(
137
+
"If set, severityThreshold must be 'critical' or 'high' or 'medium' or 'low' (case insensitive). If not set, the default is 'low'.",
138
+
),
139
139
);
140
-
});
140
+
});
141
141
142
-
it.each(validSeverityThresholds)('passes validation for ${level}',(level)=>{
0 commit comments