/
snyk-config.1
98 lines (97 loc) · 3.71 KB
/
snyk-config.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "SNYK\-CONFIG" "1" "August 2021" "Snyk.io"
.SH "NAME"
\fBsnyk\-config\fR \- Manage Snyk CLI configuration
.SH "SYNOPSIS"
\fBsnyk\fR \fBconfig\fR \fBget|set|clear\fR [\fIKEY\fR[=\fIVALUE\fR]] [\fIOPTIONS\fR]
.SH "DESCRIPTION"
Manage your local Snyk CLI config file\.
.P
This command does not manage the \fB\.snyk\fR file that\'s part of your project\. See \fBsnyk policy\fR, \fBsnyk ignore\fR or \fBsnyk wizard\fR\.
.SH "COMMANDS"
.TP
\fBget\fR \fIKEY\fR
Print a config value\.
.TP
\fBset\fR \fIKEY\fR=\fIVALUE\fR
Create a new config value\.
.TP
\fBunset\fR \fIKEY\fR
Remove a config value\.
.TP
\fBclear\fR
Remove all config values\.
.SH "OPTIONS"
.SS "Supported <var>KEY</var> values"
.TP
\fBapi\fR
API token to use when calling Snyk API\.
.TP
\fBendpoint\fR
Defines the API endpoint to use\.
.TP
\fBdisable\-analytics\fR
Turns off analytics reporting\.
.SS "Flags available accross all commands"
.TP
\fB\-\-insecure\fR
Ignore unknown certificate authorities\.
.TP
\fB\-d\fR
Output debug logs\.
.TP
\fB\-\-quiet\fR, \fB\-q\fR
Silence all output\.
.TP
\fB\-\-version\fR, \fB\-v\fR
Prints versions\.
.TP
[\fICOMMAND\fR] \fB\-\-help\fR, \fB\-\-help\fR [\fICOMMAND\fR], \fB\-h\fR
Prints a help text\. You may specify a \fICOMMAND\fR to get more details\.
.SH "EXIT CODES"
Possible exit codes and their meaning:
.P
\fB0\fR: success, no vulns found
.br
\fB1\fR: action_needed, vulns found
.br
\fB2\fR: failure, try to re\-run command
.br
\fB3\fR: failure, no supported projects detected
.br
.SH "ENVIRONMENT"
You can set these environment variables to change CLI run settings\.
.TP
\fBSNYK_TOKEN\fR
Snyk authorization token\. Setting this envvar will override the token that may be available in your \fBsnyk config\fR settings\.
.IP
How to get your account token \fIhttps://snyk\.co/ucT6J\fR
.br
How to use Service Accounts \fIhttps://snyk\.co/ucT6L\fR
.br
.TP
\fBSNYK_CFG_KEY\fR
Allows you to override any key that\'s also available as \fBsnyk config\fR option\.
.IP
E\.g\. \fBSNYK_CFG_ORG\fR=myorg will override default org option in \fBconfig\fR with "myorg"\.
.TP
\fBSNYK_REGISTRY_USERNAME\fR
Specify a username to use when connecting to a container registry\. Note that using the \fB\-\-username\fR flag will override this value\. This will be ignored in favour of local Docker binary credentials when Docker is present\.
.TP
\fBSNYK_REGISTRY_PASSWORD\fR
Specify a password to use when connecting to a container registry\. Note that using the \fB\-\-password\fR flag will override this value\. This will be ignored in favour of local Docker binary credentials when Docker is present\.
.SH "Connecting to Snyk API"
By default Snyk CLI will connect to \fBhttps://snyk\.io/api/v1\fR\.
.TP
\fBSNYK_API\fR
Sets API host to use for Snyk requests\. Useful for on\-premise instances and configuring proxies\. If set with \fBhttp\fR protocol CLI will upgrade the requests to \fBhttps\fR\. Unless \fBSNYK_HTTP_PROTOCOL_UPGRADE\fR is set to \fB0\fR\.
.TP
\fBSNYK_HTTP_PROTOCOL_UPGRADE\fR=0
If set to the value of \fB0\fR, API requests aimed at \fBhttp\fR URLs will not be upgraded to \fBhttps\fR\. If not set, the default behavior will be to upgrade these requests from \fBhttp\fR to \fBhttps\fR\. Useful e\.g\., for reverse proxies\.
.TP
\fBHTTPS_PROXY\fR and \fBHTTP_PROXY\fR
Allows you to specify a proxy to use for \fBhttps\fR and \fBhttp\fR calls\. The \fBhttps\fR in the \fBHTTPS_PROXY\fR means that \fIrequests using \fBhttps\fR protocol\fR will use this proxy\. The proxy itself doesn\'t need to use \fBhttps\fR\.
.SH "NOTICES"
.SS "Snyk API usage policy"
The use of Snyk\'s API, whether through the use of the \'snyk\' npm package or otherwise, is subject to the terms & conditions \fIhttps://snyk\.co/ucT6N\fR