snyk 1.783.0 → 1.784.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/cli/85.index.js +2 -2
- package/dist/cli/85.index.js.map +1 -1
- package/dist/cli/917.index.js +2 -1
- package/dist/cli/917.index.js.map +1 -1
- package/help/README.md +9 -8
- package/help/{commands-md → cli-commands}/snyk-auth.md +10 -26
- package/help/{commands-md → cli-commands}/snyk-code.md +11 -27
- package/help/{commands-md → cli-commands}/snyk-config.md +11 -27
- package/help/{commands-md → cli-commands}/snyk-container.md +11 -27
- package/help/{commands-md → cli-commands}/snyk-iac.md +12 -27
- package/help/{commands-md → cli-commands}/snyk-ignore.md +10 -25
- package/help/{commands-md → cli-commands}/snyk-monitor.md +14 -53
- package/help/{commands-md → cli-commands}/snyk-policy.md +10 -26
- package/help/{commands-md → cli-commands}/snyk-protect.md +10 -26
- package/help/{commands-md → cli-commands}/snyk-test.md +10 -55
- package/help/{commands-md → cli-commands}/snyk-wizard.md +10 -26
- package/help/{commands-md → cli-commands}/snyk.md +0 -0
- package/package.json +4 -5
- package/help/commands-md/snyk-help.md +0 -99
- package/help/commands-md/snyk-woof.md +0 -103
package/help/README.md
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
# CLI Help files
|
|
2
2
|
|
|
3
|
-
Snyk CLI help files are
|
|
4
|
-
|
|
5
|
-
There is a simple templating system that pieces markdown sources together into a markdown that gets rendered.
|
|
3
|
+
Snyk CLI help files are in the `help/cli-commands` folder.
|
|
6
4
|
|
|
7
5
|
## Updating or adding help documents
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
All commands are documented in a Markdown format. They are automatically pushed to the [Snyk User Documentation site](https://docs.snyk.io).
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Don't use HTML tags. These markdown files are the source for the `--help` command output in the Snyk CLI.
|
|
10
|
+
|
|
11
|
+
Contact **Team Hammer** or open an issue in this repository when in doubt.
|
|
12
12
|
|
|
13
13
|
### CLI options
|
|
14
14
|
|
|
15
15
|
```markdown
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
### `--severity-threshold=low|medium|high|critical`
|
|
17
|
+
|
|
18
|
+
Only report vulnerabilities of provided level or higher.
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
CLI flag should be in backticks.
|
|
21
|
+
CLI flag should be a heading and in backticks. See already documented commands and flags for more examples.
|
|
@@ -18,9 +18,6 @@ Your Snyk token. May be an user token or a service account.<br />
|
|
|
18
18
|
[How to get your account token](https://snyk.co/ucT6J)<br />
|
|
19
19
|
[How to use Service Accounts](https://snyk.co/ucT6L)<br />
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
21
|
### Flags available accross all commands
|
|
25
22
|
|
|
26
23
|
#### `--insecure`
|
|
@@ -43,19 +40,6 @@ Prints versions.
|
|
|
43
40
|
|
|
44
41
|
Prints a help text. You may specify a `<COMMAND>` to get more details.
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## Exit codes
|
|
50
|
-
|
|
51
|
-
Possible exit codes and their meaning:
|
|
52
|
-
|
|
53
|
-
**0**: success, no vulns found<br />
|
|
54
|
-
**1**: action_needed, vulns found<br />
|
|
55
|
-
**2**: failure, try to re-run command<br />
|
|
56
|
-
**3**: failure, no supported projects detected<br />
|
|
57
|
-
|
|
58
|
-
|
|
59
43
|
## Environment
|
|
60
44
|
|
|
61
45
|
You can set these environment variables to change CLI settings.
|
|
@@ -81,27 +65,27 @@ Specify a username to use when connecting to a container registry. Note that usi
|
|
|
81
65
|
|
|
82
66
|
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
|
|
83
67
|
|
|
84
|
-
|
|
68
|
+
### Connecting to Snyk API
|
|
85
69
|
|
|
86
70
|
By default Snyk CLI will connect to `https://snyk.io/api/v1`.
|
|
87
71
|
|
|
88
|
-
|
|
72
|
+
#### `SNYK_API`
|
|
89
73
|
|
|
90
74
|
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies. If set with `http` protocol CLI will upgrade the requests to `https`. Unless `SNYK_HTTP_PROTOCOL_UPGRADE` is set to `0`.
|
|
91
75
|
|
|
92
|
-
|
|
76
|
+
#### `SNYK_HTTP_PROTOCOL_UPGRADE=0`
|
|
93
77
|
|
|
94
78
|
If set to the value of `0`, API requests aimed at `http` URLs will not be upgraded to `https`. If not set, the default behavior will be to upgrade these requests from `http` to `https`. Useful e.g., for reverse proxies.
|
|
95
79
|
|
|
96
|
-
|
|
80
|
+
#### `HTTPS_PROXY` and `HTTP_PROXY`
|
|
97
81
|
|
|
98
82
|
Allows you to specify a proxy to use for `https` and `http` calls. The `https` in the `HTTPS_PROXY` means that _requests using `https` protocol_ will use this proxy. The proxy itself doesn't need to use `https`.
|
|
99
83
|
|
|
84
|
+
## Exit codes
|
|
100
85
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
### Snyk API usage policy
|
|
104
|
-
|
|
105
|
-
The use of Snyk's API, whether through the use of the 'snyk' npm package or otherwise, is subject to the terms & conditions
|
|
106
|
-
https://snyk.co/ucT6N
|
|
86
|
+
Possible exit codes and their meaning:
|
|
107
87
|
|
|
88
|
+
**0**: success, no vulns found<br />
|
|
89
|
+
**1**: action_needed, vulns found<br />
|
|
90
|
+
**2**: failure, try to re-run command<br />
|
|
91
|
+
**3**: failure, no supported projects detected<br />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Usage
|
|
4
4
|
|
|
5
|
-
`snyk code [<COMMAND>] [<OPTIONS>] <PATH
|
|
5
|
+
`snyk code [<COMMAND>] [<OPTIONS>] [<PATH>]`
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
8
|
|
|
@@ -41,9 +41,6 @@ Default: uses <ORG_NAME> that sets as default in your [Account settings](https:/
|
|
|
41
41
|
|
|
42
42
|
Return results in SARIF format.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
44
|
### Flags available accross all commands
|
|
48
45
|
|
|
49
46
|
#### `--insecure`
|
|
@@ -66,19 +63,6 @@ Prints versions.
|
|
|
66
63
|
|
|
67
64
|
Prints a help text. You may specify a `<COMMAND>` to get more details.
|
|
68
65
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
## Exit codes
|
|
73
|
-
|
|
74
|
-
Possible exit codes and their meaning:
|
|
75
|
-
|
|
76
|
-
**0**: success, no vulns found<br />
|
|
77
|
-
**1**: action_needed, vulns found<br />
|
|
78
|
-
**2**: failure, try to re-run command<br />
|
|
79
|
-
**3**: failure, no supported projects detected<br />
|
|
80
|
-
|
|
81
|
-
|
|
82
66
|
## Environment
|
|
83
67
|
|
|
84
68
|
You can set these environment variables to change CLI settings.
|
|
@@ -104,27 +88,27 @@ Specify a username to use when connecting to a container registry. Note that usi
|
|
|
104
88
|
|
|
105
89
|
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
|
|
106
90
|
|
|
107
|
-
|
|
91
|
+
### Connecting to Snyk API
|
|
108
92
|
|
|
109
93
|
By default Snyk CLI will connect to `https://snyk.io/api/v1`.
|
|
110
94
|
|
|
111
|
-
|
|
95
|
+
#### `SNYK_API`
|
|
112
96
|
|
|
113
97
|
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies. If set with `http` protocol CLI will upgrade the requests to `https`. Unless `SNYK_HTTP_PROTOCOL_UPGRADE` is set to `0`.
|
|
114
98
|
|
|
115
|
-
|
|
99
|
+
#### `SNYK_HTTP_PROTOCOL_UPGRADE=0`
|
|
116
100
|
|
|
117
101
|
If set to the value of `0`, API requests aimed at `http` URLs will not be upgraded to `https`. If not set, the default behavior will be to upgrade these requests from `http` to `https`. Useful e.g., for reverse proxies.
|
|
118
102
|
|
|
119
|
-
|
|
103
|
+
#### `HTTPS_PROXY` and `HTTP_PROXY`
|
|
120
104
|
|
|
121
105
|
Allows you to specify a proxy to use for `https` and `http` calls. The `https` in the `HTTPS_PROXY` means that _requests using `https` protocol_ will use this proxy. The proxy itself doesn't need to use `https`.
|
|
122
106
|
|
|
107
|
+
## Exit codes
|
|
123
108
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
### Snyk API usage policy
|
|
127
|
-
|
|
128
|
-
The use of Snyk's API, whether through the use of the 'snyk' npm package or otherwise, is subject to the terms & conditions
|
|
129
|
-
https://snyk.co/ucT6N
|
|
109
|
+
Possible exit codes and their meaning:
|
|
130
110
|
|
|
111
|
+
**0**: success, no vulns found<br />
|
|
112
|
+
**1**: action_needed, vulns found<br />
|
|
113
|
+
**2**: failure, try to re-run command<br />
|
|
114
|
+
**3**: failure, no supported projects detected<br />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Usage
|
|
4
4
|
|
|
5
|
-
`snyk config
|
|
5
|
+
`snyk config <COMMAND> [<OPTIONS>]`
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
8
|
|
|
@@ -56,9 +56,6 @@ Configures the username for an OCI registry used in IaC scannings with custom ru
|
|
|
56
56
|
|
|
57
57
|
Configures the password for an OCI registry used in IaC scannings with custom rules.
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
59
|
### Flags available accross all commands
|
|
63
60
|
|
|
64
61
|
#### `--insecure`
|
|
@@ -81,19 +78,6 @@ Prints versions.
|
|
|
81
78
|
|
|
82
79
|
Prints a help text. You may specify a `<COMMAND>` to get more details.
|
|
83
80
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## Exit codes
|
|
88
|
-
|
|
89
|
-
Possible exit codes and their meaning:
|
|
90
|
-
|
|
91
|
-
**0**: success, no vulns found<br />
|
|
92
|
-
**1**: action_needed, vulns found<br />
|
|
93
|
-
**2**: failure, try to re-run command<br />
|
|
94
|
-
**3**: failure, no supported projects detected<br />
|
|
95
|
-
|
|
96
|
-
|
|
97
81
|
## Environment
|
|
98
82
|
|
|
99
83
|
You can set these environment variables to change CLI settings.
|
|
@@ -119,27 +103,27 @@ Specify a username to use when connecting to a container registry. Note that usi
|
|
|
119
103
|
|
|
120
104
|
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
|
|
121
105
|
|
|
122
|
-
|
|
106
|
+
### Connecting to Snyk API
|
|
123
107
|
|
|
124
108
|
By default Snyk CLI will connect to `https://snyk.io/api/v1`.
|
|
125
109
|
|
|
126
|
-
|
|
110
|
+
#### `SNYK_API`
|
|
127
111
|
|
|
128
112
|
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies. If set with `http` protocol CLI will upgrade the requests to `https`. Unless `SNYK_HTTP_PROTOCOL_UPGRADE` is set to `0`.
|
|
129
113
|
|
|
130
|
-
|
|
114
|
+
#### `SNYK_HTTP_PROTOCOL_UPGRADE=0`
|
|
131
115
|
|
|
132
116
|
If set to the value of `0`, API requests aimed at `http` URLs will not be upgraded to `https`. If not set, the default behavior will be to upgrade these requests from `http` to `https`. Useful e.g., for reverse proxies.
|
|
133
117
|
|
|
134
|
-
|
|
118
|
+
#### `HTTPS_PROXY` and `HTTP_PROXY`
|
|
135
119
|
|
|
136
120
|
Allows you to specify a proxy to use for `https` and `http` calls. The `https` in the `HTTPS_PROXY` means that _requests using `https` protocol_ will use this proxy. The proxy itself doesn't need to use `https`.
|
|
137
121
|
|
|
122
|
+
## Exit codes
|
|
138
123
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
### Snyk API usage policy
|
|
142
|
-
|
|
143
|
-
The use of Snyk's API, whether through the use of the 'snyk' npm package or otherwise, is subject to the terms & conditions
|
|
144
|
-
https://snyk.co/ucT6N
|
|
124
|
+
Possible exit codes and their meaning:
|
|
145
125
|
|
|
126
|
+
**0**: success, no vulns found<br />
|
|
127
|
+
**1**: action_needed, vulns found<br />
|
|
128
|
+
**2**: failure, try to re-run command<br />
|
|
129
|
+
**3**: failure, no supported projects detected<br />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Usage
|
|
4
4
|
|
|
5
|
-
`snyk container
|
|
5
|
+
`snyk container <COMMAND> [<OPTIONS>] [<IMAGE>]`
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
8
|
|
|
@@ -77,9 +77,6 @@ Specify a username to use when connecting to a container registry. This will be
|
|
|
77
77
|
|
|
78
78
|
Specify a password to use when connecting to a container registry. This will be ignored in favour of local Docker binary credentials when Docker is present.
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
80
|
### Flags available accross all commands
|
|
84
81
|
|
|
85
82
|
#### `--insecure`
|
|
@@ -102,19 +99,6 @@ Prints versions.
|
|
|
102
99
|
|
|
103
100
|
Prints a help text. You may specify a `<COMMAND>` to get more details.
|
|
104
101
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
## Exit codes
|
|
109
|
-
|
|
110
|
-
Possible exit codes and their meaning:
|
|
111
|
-
|
|
112
|
-
**0**: success, no vulns found<br />
|
|
113
|
-
**1**: action_needed, vulns found<br />
|
|
114
|
-
**2**: failure, try to re-run command<br />
|
|
115
|
-
**3**: failure, no supported projects detected<br />
|
|
116
|
-
|
|
117
|
-
|
|
118
102
|
## Environment
|
|
119
103
|
|
|
120
104
|
You can set these environment variables to change CLI settings.
|
|
@@ -140,27 +124,27 @@ Specify a username to use when connecting to a container registry. Note that usi
|
|
|
140
124
|
|
|
141
125
|
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
|
|
142
126
|
|
|
143
|
-
|
|
127
|
+
### Connecting to Snyk API
|
|
144
128
|
|
|
145
129
|
By default Snyk CLI will connect to `https://snyk.io/api/v1`.
|
|
146
130
|
|
|
147
|
-
|
|
131
|
+
#### `SNYK_API`
|
|
148
132
|
|
|
149
133
|
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies. If set with `http` protocol CLI will upgrade the requests to `https`. Unless `SNYK_HTTP_PROTOCOL_UPGRADE` is set to `0`.
|
|
150
134
|
|
|
151
|
-
|
|
135
|
+
#### `SNYK_HTTP_PROTOCOL_UPGRADE=0`
|
|
152
136
|
|
|
153
137
|
If set to the value of `0`, API requests aimed at `http` URLs will not be upgraded to `https`. If not set, the default behavior will be to upgrade these requests from `http` to `https`. Useful e.g., for reverse proxies.
|
|
154
138
|
|
|
155
|
-
|
|
139
|
+
#### `HTTPS_PROXY` and `HTTP_PROXY`
|
|
156
140
|
|
|
157
141
|
Allows you to specify a proxy to use for `https` and `http` calls. The `https` in the `HTTPS_PROXY` means that _requests using `https` protocol_ will use this proxy. The proxy itself doesn't need to use `https`.
|
|
158
142
|
|
|
143
|
+
## Exit codes
|
|
159
144
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### Snyk API usage policy
|
|
163
|
-
|
|
164
|
-
The use of Snyk's API, whether through the use of the 'snyk' npm package or otherwise, is subject to the terms & conditions
|
|
165
|
-
https://snyk.co/ucT6N
|
|
145
|
+
Possible exit codes and their meaning:
|
|
166
146
|
|
|
147
|
+
**0**: success, no vulns found<br />
|
|
148
|
+
**1**: action_needed, vulns found<br />
|
|
149
|
+
**2**: failure, try to re-run command<br />
|
|
150
|
+
**3**: failure, no supported projects detected<br />
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# snyk
|
|
1
|
+
# snyk iac -- Find security issues in your Infrastructure as Code files
|
|
2
2
|
|
|
3
3
|
## Usage
|
|
4
4
|
|
|
5
|
-
`snyk
|
|
5
|
+
`snyk iac <COMMAND> [<OPTIONS>] [<PATH>]`
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
8
|
|
|
@@ -87,9 +87,6 @@ This flag cannot be used if the custom rules settings were configured via the Sn
|
|
|
87
87
|
Default: If the `--rules` flag is not provided it would scan the configuration files using the internal Snyk rules only.
|
|
88
88
|
Example: `--rules=bundle.tar.gz` (scans the configuration files using custom rules and internal Snyk rules)
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
90
|
### Flags available accross all commands
|
|
94
91
|
|
|
95
92
|
#### `--insecure`
|
|
@@ -112,7 +109,6 @@ Prints versions.
|
|
|
112
109
|
|
|
113
110
|
Prints a help text. You may specify a `<COMMAND>` to get more details.
|
|
114
111
|
|
|
115
|
-
|
|
116
112
|
## Examples
|
|
117
113
|
|
|
118
114
|
[For more information see IaC help page](https://snyk.co/ucT6Q)
|
|
@@ -147,17 +143,6 @@ Prints a help text. You may specify a `<COMMAND>` to get more details.
|
|
|
147
143
|
|
|
148
144
|
\$ snyk iac test /path/to/directory --rules=bundle.tar.gz
|
|
149
145
|
|
|
150
|
-
|
|
151
|
-
## Exit codes
|
|
152
|
-
|
|
153
|
-
Possible exit codes and their meaning:
|
|
154
|
-
|
|
155
|
-
**0**: success, no vulns found<br />
|
|
156
|
-
**1**: action_needed, vulns found<br />
|
|
157
|
-
**2**: failure, try to re-run command<br />
|
|
158
|
-
**3**: failure, no supported projects detected<br />
|
|
159
|
-
|
|
160
|
-
|
|
161
146
|
## Environment
|
|
162
147
|
|
|
163
148
|
You can set these environment variables to change CLI settings.
|
|
@@ -183,27 +168,27 @@ Specify a username to use when connecting to a container registry. Note that usi
|
|
|
183
168
|
|
|
184
169
|
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
|
|
185
170
|
|
|
186
|
-
|
|
171
|
+
### Connecting to Snyk API
|
|
187
172
|
|
|
188
173
|
By default Snyk CLI will connect to `https://snyk.io/api/v1`.
|
|
189
174
|
|
|
190
|
-
|
|
175
|
+
#### `SNYK_API`
|
|
191
176
|
|
|
192
177
|
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies. If set with `http` protocol CLI will upgrade the requests to `https`. Unless `SNYK_HTTP_PROTOCOL_UPGRADE` is set to `0`.
|
|
193
178
|
|
|
194
|
-
|
|
179
|
+
#### `SNYK_HTTP_PROTOCOL_UPGRADE=0`
|
|
195
180
|
|
|
196
181
|
If set to the value of `0`, API requests aimed at `http` URLs will not be upgraded to `https`. If not set, the default behavior will be to upgrade these requests from `http` to `https`. Useful e.g., for reverse proxies.
|
|
197
182
|
|
|
198
|
-
|
|
183
|
+
#### `HTTPS_PROXY` and `HTTP_PROXY`
|
|
199
184
|
|
|
200
185
|
Allows you to specify a proxy to use for `https` and `http` calls. The `https` in the `HTTPS_PROXY` means that _requests using `https` protocol_ will use this proxy. The proxy itself doesn't need to use `https`.
|
|
201
186
|
|
|
187
|
+
## Exit codes
|
|
202
188
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
### Snyk API usage policy
|
|
206
|
-
|
|
207
|
-
The use of Snyk's API, whether through the use of the 'snyk' npm package or otherwise, is subject to the terms & conditions
|
|
208
|
-
https://snyk.co/ucT6N
|
|
189
|
+
Possible exit codes and their meaning:
|
|
209
190
|
|
|
191
|
+
**0**: success, no vulns found<br />
|
|
192
|
+
**1**: action_needed, vulns found<br />
|
|
193
|
+
**2**: failure, try to re-run command<br />
|
|
194
|
+
**3**: failure, no supported projects detected<br />
|
|
@@ -30,9 +30,6 @@ Expiry date, according to [RFC2822](https://tools.ietf.org/html/rfc2822)
|
|
|
30
30
|
|
|
31
31
|
Human-readable <REASON> to ignore this issue.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
33
|
### Flags available accross all commands
|
|
37
34
|
|
|
38
35
|
#### `--insecure`
|
|
@@ -55,24 +52,12 @@ Prints versions.
|
|
|
55
52
|
|
|
56
53
|
Prints a help text. You may specify a `<COMMAND>` to get more details.
|
|
57
54
|
|
|
58
|
-
|
|
59
55
|
## Examples
|
|
60
56
|
|
|
61
57
|
### `Ignore a specific vulnerability`
|
|
62
58
|
|
|
63
59
|
\$ snyk ignore --id='npm:qs:20170213' --expiry='2021-01-10' --reason='Module not affected by this vuln'
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
## Exit codes
|
|
67
|
-
|
|
68
|
-
Possible exit codes and their meaning:
|
|
69
|
-
|
|
70
|
-
**0**: success, no vulns found<br />
|
|
71
|
-
**1**: action_needed, vulns found<br />
|
|
72
|
-
**2**: failure, try to re-run command<br />
|
|
73
|
-
**3**: failure, no supported projects detected<br />
|
|
74
|
-
|
|
75
|
-
|
|
76
61
|
## Environment
|
|
77
62
|
|
|
78
63
|
You can set these environment variables to change CLI settings.
|
|
@@ -98,27 +83,27 @@ Specify a username to use when connecting to a container registry. Note that usi
|
|
|
98
83
|
|
|
99
84
|
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
|
|
100
85
|
|
|
101
|
-
|
|
86
|
+
### Connecting to Snyk API
|
|
102
87
|
|
|
103
88
|
By default Snyk CLI will connect to `https://snyk.io/api/v1`.
|
|
104
89
|
|
|
105
|
-
|
|
90
|
+
#### `SNYK_API`
|
|
106
91
|
|
|
107
92
|
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies. If set with `http` protocol CLI will upgrade the requests to `https`. Unless `SNYK_HTTP_PROTOCOL_UPGRADE` is set to `0`.
|
|
108
93
|
|
|
109
|
-
|
|
94
|
+
#### `SNYK_HTTP_PROTOCOL_UPGRADE=0`
|
|
110
95
|
|
|
111
96
|
If set to the value of `0`, API requests aimed at `http` URLs will not be upgraded to `https`. If not set, the default behavior will be to upgrade these requests from `http` to `https`. Useful e.g., for reverse proxies.
|
|
112
97
|
|
|
113
|
-
|
|
98
|
+
#### `HTTPS_PROXY` and `HTTP_PROXY`
|
|
114
99
|
|
|
115
100
|
Allows you to specify a proxy to use for `https` and `http` calls. The `https` in the `HTTPS_PROXY` means that _requests using `https` protocol_ will use this proxy. The proxy itself doesn't need to use `https`.
|
|
116
101
|
|
|
102
|
+
## Exit codes
|
|
117
103
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
### Snyk API usage policy
|
|
121
|
-
|
|
122
|
-
The use of Snyk's API, whether through the use of the 'snyk' npm package or otherwise, is subject to the terms & conditions
|
|
123
|
-
https://snyk.co/ucT6N
|
|
104
|
+
Possible exit codes and their meaning:
|
|
124
105
|
|
|
106
|
+
**0**: success, no vulns found<br />
|
|
107
|
+
**1**: action_needed, vulns found<br />
|
|
108
|
+
**2**: failure, try to re-run command<br />
|
|
109
|
+
**3**: failure, no supported projects detected<br />
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
Create a project on the Snyk website that will be continuously monitored for new vulnerabilities. After running this command you will see it by logging in to the website and viewing Your projects.
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
## Options
|
|
13
12
|
|
|
14
13
|
To see command-specific flags and usage, see `help` command, e.g. `snyk container --help`.
|
|
@@ -16,32 +15,27 @@ For advanced usage, we offer language and context specific flags, listed further
|
|
|
16
15
|
|
|
17
16
|
### `--all-projects`
|
|
18
17
|
|
|
19
|
-
(only in `test` and `monitor` commands)
|
|
20
18
|
Auto-detect all projects in working directory
|
|
21
19
|
|
|
22
20
|
### `--detection-depth=<DEPTH>`
|
|
23
21
|
|
|
24
|
-
(only in `test` and `monitor` commands)
|
|
25
22
|
Use with --all-projects or --yarn-workspaces to indicate how many sub-directories to search. `DEPTH` must be a number.
|
|
26
23
|
|
|
27
24
|
Default: 4 (the current working directory and 3 sub-directories)
|
|
28
25
|
|
|
29
26
|
### `--exclude=<DIRECTORY>[,<DIRECTORY>]...>`
|
|
30
27
|
|
|
31
|
-
(only in `test` and `monitor` commands)
|
|
32
28
|
Can be used with --all-projects and --yarn-workspaces to indicate sub-directories and files to exclude. Must be comma separated.
|
|
33
29
|
|
|
34
30
|
If using with `--detection-depth` exclude ignores directories at any level deep.
|
|
35
31
|
|
|
36
32
|
### `--prune-repeated-subdependencies`, `-p`
|
|
37
33
|
|
|
38
|
-
(only in `test` and `monitor` commands)
|
|
39
34
|
Prune dependency trees, removing duplicate sub-dependencies.
|
|
40
35
|
Will still find all vulnerabilities, but potentially not all of the vulnerable paths.
|
|
41
36
|
|
|
42
37
|
### `--print-deps`
|
|
43
38
|
|
|
44
|
-
(only in `test` and `monitor` commands)
|
|
45
39
|
Print the dependency tree before sending it for analysis.
|
|
46
40
|
|
|
47
41
|
### `--remote-repo-url=<URL>`
|
|
@@ -97,23 +91,19 @@ A reference which differentiates this project. For example, a branch name or ver
|
|
|
97
91
|
|
|
98
92
|
### `--project-environment=<ENVIRONMENT>[,<ENVIRONMENT>]...>`
|
|
99
93
|
|
|
100
|
-
(
|
|
101
|
-
Set the project environment to one or more values (comma-separated). Allowed values: frontend, backend, internal, external, mobile, saas, onprem, hosted, distributed
|
|
94
|
+
Set the project environment to one or more values (comma-separated). To clear the project environment set `--project-environment=`. Allowed values: frontend, backend, internal, external, mobile, saas, onprem, hosted, distributed
|
|
102
95
|
|
|
103
96
|
### `--project-lifecycle=<LIFECYCLE>[,<LIFECYCLE>]...>`
|
|
104
97
|
|
|
105
|
-
(
|
|
106
|
-
Set the project lifecycle to one or more values (comma-separated). Allowed values: production, development, sandbox
|
|
98
|
+
Set the project lifecycle to one or more values (comma-separated). To clear the project lifecycle set `--project-lifecycle=`. Allowed values: production, development, sandbox
|
|
107
99
|
|
|
108
100
|
### `--project-business-criticality=<BUSINESS_CRITICALITY>[,<BUSINESS_CRITICALITY>]...>`
|
|
109
101
|
|
|
110
|
-
(
|
|
111
|
-
Set the project business criticality to one or more values (comma-separated). Allowed values: critical, high, medium, low
|
|
102
|
+
Set the project business criticality to one or more values (comma-separated). To clear the project business criticality set `--project-business-criticality=`. Allowed values: critical, high, medium, low
|
|
112
103
|
|
|
113
104
|
### `--project-tags=<TAG>[,<TAG>]...>`
|
|
114
105
|
|
|
115
|
-
(
|
|
116
|
-
Set the project tags to one or more values (comma-separated key value pairs with an "=" separator). e.g. --project-tags=department=finance,team=alpha
|
|
106
|
+
Set the project tags to one or more values (comma-separated key value pairs with an "=" separator). e.g. --project-tags=department=finance,team=alpha. To clear the project tags set `--project-tags=`
|
|
117
107
|
|
|
118
108
|
### `--tags=<TAG>[,<TAG>]...>`
|
|
119
109
|
|
|
@@ -127,22 +117,10 @@ Manually pass a path to a snyk policy file.
|
|
|
127
117
|
|
|
128
118
|
Prints results in JSON format.
|
|
129
119
|
|
|
130
|
-
### `--json-file-output=<OUTPUT_FILE_PATH>`
|
|
131
|
-
|
|
132
|
-
(only in `test` command)
|
|
133
|
-
Save test output in JSON format directly to the specified file, regardless of whether or not you use the `--json` option.
|
|
134
|
-
This is especially useful if you want to display the human-readable test output via stdout and at the same time save the JSON format output to a file.
|
|
135
|
-
|
|
136
120
|
### `--sarif`
|
|
137
121
|
|
|
138
122
|
Return results in SARIF format.
|
|
139
123
|
|
|
140
|
-
### `--sarif-file-output=<OUTPUT_FILE_PATH>`
|
|
141
|
-
|
|
142
|
-
(only in `test` command)
|
|
143
|
-
Save test output in SARIF format directly to the <OUTPUT_FILE_PATH> file, regardless of whether or not you use the `--sarif` option.
|
|
144
|
-
This is especially useful if you want to display the human-readable test output via stdout and at the same time save the SARIF format output to a file.
|
|
145
|
-
|
|
146
124
|
### `--severity-threshold=low|medium|high|critical`
|
|
147
125
|
|
|
148
126
|
Only report vulnerabilities of provided level or higher.
|
|
@@ -172,7 +150,6 @@ Auto detects maven jars, aars, and wars in given directory. Individual testing c
|
|
|
172
150
|
|
|
173
151
|
#### `--reachable`
|
|
174
152
|
|
|
175
|
-
(only in `test` and `monitor` commands)
|
|
176
153
|
Analyze your source code to find which vulnerable
|
|
177
154
|
functions and packages are called.
|
|
178
155
|
|
|
@@ -204,7 +181,6 @@ Select certain values of configuration attributes to resolve the dependencies. E
|
|
|
204
181
|
|
|
205
182
|
#### `--reachable`
|
|
206
183
|
|
|
207
|
-
(only in `test` and `monitor` commands)
|
|
208
184
|
Analyze your source code to find which vulnerable
|
|
209
185
|
functions and packages are called.
|
|
210
186
|
|
|
@@ -250,7 +226,6 @@ Default: true
|
|
|
250
226
|
|
|
251
227
|
#### `--yarn-workspaces`
|
|
252
228
|
|
|
253
|
-
(only in `test` and `monitor` commands)
|
|
254
229
|
Detect and scan yarn workspaces. You can specify how many sub-directories to search using `--detection-depth` and exclude directories and files using `--exclude`.
|
|
255
230
|
|
|
256
231
|
### CocoaPods options
|
|
@@ -274,7 +249,6 @@ Example: `--command=python3`
|
|
|
274
249
|
|
|
275
250
|
Allow skipping packages that are not found in the environment.
|
|
276
251
|
|
|
277
|
-
|
|
278
252
|
### Flags available accross all commands
|
|
279
253
|
|
|
280
254
|
#### `--insecure`
|
|
@@ -297,19 +271,6 @@ Prints versions.
|
|
|
297
271
|
|
|
298
272
|
Prints a help text. You may specify a `<COMMAND>` to get more details.
|
|
299
273
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
## Exit codes
|
|
304
|
-
|
|
305
|
-
Possible exit codes and their meaning:
|
|
306
|
-
|
|
307
|
-
**0**: success, no vulns found<br />
|
|
308
|
-
**1**: action_needed, vulns found<br />
|
|
309
|
-
**2**: failure, try to re-run command<br />
|
|
310
|
-
**3**: failure, no supported projects detected<br />
|
|
311
|
-
|
|
312
|
-
|
|
313
274
|
## Environment
|
|
314
275
|
|
|
315
276
|
You can set these environment variables to change CLI settings.
|
|
@@ -335,27 +296,27 @@ Specify a username to use when connecting to a container registry. Note that usi
|
|
|
335
296
|
|
|
336
297
|
Specify a password to use when connecting to a container registry. Note that using the `--password` flag will override this value. This will be ignored in favour of local Docker binary credentials when Docker is present.
|
|
337
298
|
|
|
338
|
-
|
|
299
|
+
### Connecting to Snyk API
|
|
339
300
|
|
|
340
301
|
By default Snyk CLI will connect to `https://snyk.io/api/v1`.
|
|
341
302
|
|
|
342
|
-
|
|
303
|
+
#### `SNYK_API`
|
|
343
304
|
|
|
344
305
|
Sets API host to use for Snyk requests. Useful for on-premise instances and configuring proxies. If set with `http` protocol CLI will upgrade the requests to `https`. Unless `SNYK_HTTP_PROTOCOL_UPGRADE` is set to `0`.
|
|
345
306
|
|
|
346
|
-
|
|
307
|
+
#### `SNYK_HTTP_PROTOCOL_UPGRADE=0`
|
|
347
308
|
|
|
348
309
|
If set to the value of `0`, API requests aimed at `http` URLs will not be upgraded to `https`. If not set, the default behavior will be to upgrade these requests from `http` to `https`. Useful e.g., for reverse proxies.
|
|
349
310
|
|
|
350
|
-
|
|
311
|
+
#### `HTTPS_PROXY` and `HTTP_PROXY`
|
|
351
312
|
|
|
352
313
|
Allows you to specify a proxy to use for `https` and `http` calls. The `https` in the `HTTPS_PROXY` means that _requests using `https` protocol_ will use this proxy. The proxy itself doesn't need to use `https`.
|
|
353
314
|
|
|
315
|
+
## Exit codes
|
|
354
316
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
### Snyk API usage policy
|
|
358
|
-
|
|
359
|
-
The use of Snyk's API, whether through the use of the 'snyk' npm package or otherwise, is subject to the terms & conditions
|
|
360
|
-
https://snyk.co/ucT6N
|
|
317
|
+
Possible exit codes and their meaning:
|
|
361
318
|
|
|
319
|
+
**0**: success, no vulns found<br />
|
|
320
|
+
**1**: action_needed, vulns found<br />
|
|
321
|
+
**2**: failure, try to re-run command<br />
|
|
322
|
+
**3**: failure, no supported projects detected<br />
|