1
+ version : " 2"
1
2
2
3
run :
3
- go : " 1.22"
4
- concurrency : 4
4
+ go : " 1.23"
5
5
timeout : 5m
6
6
tests : false
7
7
issues-exit-code : 1
8
8
modules-download-mode : readonly
9
+ allow-parallel-runners : true
9
10
10
11
issues :
11
- exclude-use-default : false
12
- max-issues-per-linter : 100
13
- max-same-issues : 4
12
+ max-issues-per-linter : 0
13
+ max-same-issues : 0
14
14
new : false
15
- exclude-files :
16
- - " .+_test.go"
17
- exclude-dirs :
18
- - " vendor$"
15
+ fix : false
19
16
20
17
output :
21
18
formats :
22
- - format : line-number
23
- sort-results : true
19
+ text :
20
+ print-linter-name : true
21
+ print-issued-lines : true
24
22
25
- linters-settings :
26
- govet :
27
- check-shadowing : true
28
- enable :
29
- - asmdecl
30
- - assign
31
- - atomic
32
- - atomicalign
33
- - bools
34
- - buildtag
35
- - cgocall
36
- - composites
37
- - copylocks
38
- - deepequalerrors
39
- - errorsas
40
- - findcall
41
- - framepointer
42
- - httpresponse
43
- - ifaceassert
44
- - loopclosure
45
- - lostcancel
46
- - nilfunc
47
- - nilness
48
- - printf
49
- - reflectvaluecompare
50
- - shadow
51
- - shift
52
- - sigchanyzer
53
- - sortslice
54
- - stdmethods
55
- - stringintconv
56
- - structtag
57
- - testinggoroutine
58
- - tests
59
- - unmarshal
60
- - unreachable
61
- - unsafeptr
62
- - unusedresult
63
- - unusedwrite
64
- disable :
65
- - fieldalignment
66
- gofmt :
67
- simplify : true
68
- errcheck :
69
- check-type-assertions : true
70
- check-blank : true
71
- gocyclo :
72
- min-complexity : 30
73
- misspell :
74
- locale : US
75
- prealloc :
76
- simple : true
77
- range-loops : true
78
- for-loops : true
79
- unparam :
80
- check-exported : false
81
- gci :
82
- skip-generated : true
83
- custom-order : false
84
- gosec :
85
- includes :
86
- - G101 # Look for hard coded credentials
87
- - G102 # Bind to all interfaces
88
- - G103 # Audit the use of unsafe block
89
- - G104 # Audit errors not checked
90
- - G106 # Audit the use of ssh.InsecureIgnoreHostKey
91
- - G107 # Url provided to HTTP request as taint input
92
- - G108 # Profiling endpoint automatically exposed on /debug/pprof
93
- - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32
94
- - G110 # Potential DoS vulnerability via decompression bomb
95
- - G111 # Potential directory traversal
96
- - G112 # Potential slowloris attack
97
- - G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772)
98
- - G114 # Use of net/http serve function that has no support for setting timeouts
99
- - G201 # SQL query construction using format string
100
- - G202 # SQL query construction using string concatenation
101
- - G203 # Use of unescaped data in HTML templates
102
- - G204 # Audit use of command execution
103
- - G301 # Poor file permissions used when creating a directory
104
- - G302 # Poor file permissions used with chmod
105
- - G303 # Creating tempfile using a predictable path
106
- - G304 # File path provided as taint input
107
- - G305 # File traversal when extracting zip/tar archive
108
- - G306 # Poor file permissions used when writing to a new file
109
- - G307 # Deferring a method which returns an error
110
- - G401 # Detect the usage of DES, RC4, MD5 or SHA1
111
- - G402 # Look for bad TLS connection settings
112
- - G403 # Ensure minimum RSA key length of 2048 bits
113
- - G404 # Insecure random number source (rand)
114
- - G501 # Import blocklist: crypto/md5
115
- - G502 # Import blocklist: crypto/des
116
- - G503 # Import blocklist: crypto/rc4
117
- - G504 # Import blocklist: net/http/cgi
118
- - G505 # Import blocklist: crypto/sha1
119
- - G601 # Implicit memory aliasing of items from a range statement
120
- excludes :
121
- - G101 # Look for hard coded credentials
122
- - G102 # Bind to all interfaces
123
- - G103 # Audit the use of unsafe block
124
- - G104 # Audit errors not checked
125
- - G106 # Audit the use of ssh.InsecureIgnoreHostKey
126
- - G107 # Url provided to HTTP request as taint input
127
- - G108 # Profiling endpoint automatically exposed on /debug/pprof
128
- - G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32
129
- - G110 # Potential DoS vulnerability via decompression bomb
130
- - G111 # Potential directory traversal
131
- - G112 # Potential slowloris attack
132
- - G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772)
133
- - G114 # Use of net/http serve function that has no support for setting timeouts
134
- - G201 # SQL query construction using format string
135
- - G202 # SQL query construction using string concatenation
136
- - G203 # Use of unescaped data in HTML templates
137
- - G204 # Audit use of command execution
138
- - G301 # Poor file permissions used when creating a directory
139
- - G302 # Poor file permissions used with chmod
140
- - G303 # Creating tempfile using a predictable path
141
- - G304 # File path provided as taint input
142
- - G305 # File traversal when extracting zip/tar archive
143
- - G306 # Poor file permissions used when writing to a new file
144
- - G307 # Deferring a method which returns an error
145
- - G401 # Detect the usage of DES, RC4, MD5 or SHA1
146
- - G402 # Look for bad TLS connection settings
147
- - G403 # Ensure minimum RSA key length of 2048 bits
148
- - G404 # Insecure random number source (rand)
149
- - G501 # Import blocklist: crypto/md5
150
- - G502 # Import blocklist: crypto/des
151
- - G503 # Import blocklist: crypto/rc4
152
- - G504 # Import blocklist: net/http/cgi
153
- - G505 # Import blocklist: crypto/sha1
154
- - G601 # Implicit memory aliasing of items from a range statement
155
- exclude-generated : true
156
- severity : medium
157
- confidence : medium
158
- concurrency : 12
159
- config :
160
- global :
161
- nosec : true
162
- " #nosec " : " #my-custom-nosec"
163
- show-ignored : true
164
- audit : true
165
- G101 :
166
- pattern : " (?i)passwd|pass|password|pwd|secret|token|pw|apiKey|bearer|cred"
167
- ignore_entropy : false
168
- entropy_threshold : " 80.0"
169
- per_char_threshold : " 3.0"
170
- truncate : " 32"
171
- G104 :
172
- fmt :
173
- - Fscanf
174
- G111 :
175
- pattern : " http\\ .Dir\\ (\"\\ /\"\\ )|http\\ .Dir\\ ('\\ /'\\ )"
176
- G301 : " 0750"
177
- G302 : " 0600"
178
- G306 : " 0600"
179
-
180
- lll :
181
- line-length : 130
182
- tab-width : 1
183
- staticcheck :
184
- go : " 1.15"
185
- # SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
186
- # Default: ["*"]
187
- checks : [ "*", "-SA1019" ]
23
+ formatters :
24
+ exclusions :
25
+ paths :
26
+ - vendors/
27
+ enable :
28
+ - gofmt
29
+ - goimports
188
30
189
31
linters :
190
- disable-all : true
32
+ settings :
33
+ staticcheck :
34
+ checks :
35
+ - all
36
+ - -S1023
37
+ - -ST1000
38
+ - -ST1003
39
+ - -ST1020
40
+ gosec :
41
+ excludes :
42
+ - G104
43
+ - G115
44
+ - G301
45
+ - G304
46
+ - G306
47
+ - G501
48
+ - G505
49
+ exclusions :
50
+ paths :
51
+ - vendors/
52
+ default : none
191
53
enable :
192
54
- govet
193
- - gofmt
194
55
- errcheck
195
56
- misspell
196
57
- gocyclo
197
58
- ineffassign
198
- - goimports
199
- - nakedret
200
59
- unparam
201
60
- unused
202
61
- prealloc
@@ -206,7 +65,4 @@ linters:
206
65
- nilerr
207
66
- errorlint
208
67
- bodyclose
209
- - exportloopref
210
68
- gosec
211
- - lll
212
- fast : false
0 commit comments