Skip to content

Commit 6a8bd41

Browse files
TCE-1226 Bump Gosec 2.22.7
1 parent 07cbb2c commit 6a8bd41

File tree

11 files changed

+132
-796
lines changed

11 files changed

+132
-796
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ target/
99
.DS_Store
1010
*.iml
1111
.codacy-coverage
12+
13+
14+
#Ignore vscode AI rules
15+
.github/copilot-instructions.md
16+
17+
.vscode

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM golang:1.18.10-alpine3.17 as builder
1+
FROM golang:1.23-alpine3.22 as builder
22

33
COPY doc-generation /doc-generation
44

55
WORKDIR /doc-generation
66
RUN mkdir -p /docs/description
77
RUN go run main.go -docFolder=../docs
88

9-
FROM alpine:3.17.3
9+
FROM alpine:3.22
1010

1111
COPY --from=builder /docs /docs
1212
COPY docs/tool-description.md /docs/

build.sbt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
val scalaVersionNumber = "2.13.1"
1+
val scalaVersionNumber = "2.13.16"
22
val circeVersion = "0.12.3"
3-
val graalVersion = "21.2.0"
3+
val graalVersion = "24.2.2"
44

55
lazy val root = (project in file("."))
66
.enablePlugins(JavaAppPackaging)
@@ -12,11 +12,11 @@ lazy val root = (project in file("."))
1212
scalaVersion := scalaVersionNumber,
1313
test in assembly := {},
1414
libraryDependencies ++= Seq(
15-
"com.codacy" %% "codacy-analysis-cli-model" % "2.2.0",
15+
"com.codacy" %% "codacy-analysis-cli-model" % "5.2.1",
1616
"io.circe" %% "circe-core" % circeVersion,
1717
"io.circe" %% "circe-parser" % circeVersion,
18-
"com.github.scopt" %% "scopt" % "3.7.1",
19-
"org.scalatest" %% "scalatest" % "3.1.0" % Test
18+
"com.github.scopt" %% "scopt" % "4.1.0",
19+
"org.scalatest" %% "scalatest" % "3.2.19" % Test
2020
),
2121
graalVMNativeImageGraalVersion := Some(graalVersion),
2222
graalVMNativeImageOptions ++= Seq(

doc-generation/go.mod

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
module github.com/codacy/gosec-doc-generator
22

3-
go 1.18
3+
go 1.23.0
4+
5+
toolchain go1.24.5
46

57
require (
68
github.com/codacy/codacy-engine-golang-seed v1.0.1-0.20230412094526-1a71ba69afe3
7-
github.com/securego/gosec/v2 v2.15.0
8-
golang.org/x/mod v0.10.0
9+
github.com/securego/gosec/v2 v2.22.7
10+
golang.org/x/mod v0.26.0
911
)
1012

1113
require (
12-
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
13-
github.com/sirupsen/logrus v1.9.0 // indirect
14-
golang.org/x/sys v0.4.0 // indirect
15-
golang.org/x/tools v0.5.0 // indirect
14+
github.com/ccojocar/zxcvbn-go v1.0.4 // indirect
15+
github.com/sirupsen/logrus v1.9.3 // indirect
16+
golang.org/x/sync v0.16.0 // indirect
17+
golang.org/x/sys v0.34.0 // indirect
18+
golang.org/x/tools v0.35.0 // indirect
1619
)

doc-generation/go.sum

Lines changed: 36 additions & 757 deletions
Large diffs are not rendered by default.

docs/description/G307.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## G307
2-
Unsafe defer call of a method returning an error
2+
Poor file permissions used when creating a file with os.Create

docs/description/G401.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## G401
2-
Detect the usage of DES, RC4, MD5 or SHA1
2+
Detect the usage of MD5 or SHA1

docs/description/description.json

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
"title": "G112",
5555
"description": "Detect ReadHeaderTimeout not configured as a potential risk"
5656
},
57-
{
58-
"patternId": "G113",
59-
"title": "G113",
60-
"description": "Usage of Rat.SetString in math/big with an overflow"
61-
},
6257
{
6358
"patternId": "G114",
6459
"title": "G114",
@@ -117,12 +112,12 @@
117112
{
118113
"patternId": "G307",
119114
"title": "G307",
120-
"description": "Unsafe defer call of a method returning an error"
115+
"description": "Poor file permissions used when creating a file with os.Create"
121116
},
122117
{
123118
"patternId": "G401",
124119
"title": "G401",
125-
"description": "Detect the usage of DES, RC4, MD5 or SHA1"
120+
"description": "Detect the usage of MD5 or SHA1"
126121
},
127122
{
128123
"patternId": "G402",
@@ -139,6 +134,16 @@
139134
"title": "G404",
140135
"description": "Insecure random number source (rand)"
141136
},
137+
{
138+
"patternId": "G405",
139+
"title": "G405",
140+
"description": "Detect the usage of DES or RC4"
141+
},
142+
{
143+
"patternId": "G406",
144+
"title": "G406",
145+
"description": "Detect the usage of deprecated MD4 or RIPEMD160"
146+
},
142147
{
143148
"patternId": "G501",
144149
"title": "G501",
@@ -164,6 +169,16 @@
164169
"title": "G505",
165170
"description": "Import blocklist: crypto/sha1"
166171
},
172+
{
173+
"patternId": "G506",
174+
"title": "G506",
175+
"description": "Import blocklist: golang.org/x/crypto/md4"
176+
},
177+
{
178+
"patternId": "G507",
179+
"title": "G507",
180+
"description": "Import blocklist: golang.org/x/crypto/ripemd160"
181+
},
167182
{
168183
"patternId": "G601",
169184
"title": "G601",
@@ -224,11 +239,6 @@
224239
"title": "G112",
225240
"description": "Detect ReadHeaderTimeout not configured as a potential risk"
226241
},
227-
{
228-
"patternId": "G113",
229-
"title": "G113",
230-
"description": "Usage of Rat.SetString in math/big with an overflow"
231-
},
232242
{
233243
"patternId": "G114",
234244
"title": "G114",
@@ -287,12 +297,12 @@
287297
{
288298
"patternId": "G307",
289299
"title": "G307",
290-
"description": "Unsafe defer call of a method returning an error"
300+
"description": "Poor file permissions used when creating a file with os.Create"
291301
},
292302
{
293303
"patternId": "G401",
294304
"title": "G401",
295-
"description": "Detect the usage of DES, RC4, MD5 or SHA1"
305+
"description": "Detect the usage of MD5 or SHA1"
296306
},
297307
{
298308
"patternId": "G402",
@@ -309,6 +319,16 @@
309319
"title": "G404",
310320
"description": "Insecure random number source (rand)"
311321
},
322+
{
323+
"patternId": "G405",
324+
"title": "G405",
325+
"description": "Detect the usage of DES or RC4"
326+
},
327+
{
328+
"patternId": "G406",
329+
"title": "G406",
330+
"description": "Detect the usage of deprecated MD4 or RIPEMD160"
331+
},
312332
{
313333
"patternId": "G501",
314334
"title": "G501",
@@ -334,6 +354,16 @@
334354
"title": "G505",
335355
"description": "Import blocklist: crypto/sha1"
336356
},
357+
{
358+
"patternId": "G506",
359+
"title": "G506",
360+
"description": "Import blocklist: golang.org/x/crypto/md4"
361+
},
362+
{
363+
"patternId": "G507",
364+
"title": "G507",
365+
"description": "Import blocklist: golang.org/x/crypto/ripemd160"
366+
},
337367
{
338368
"patternId": "G601",
339369
"title": "G601",

docs/patterns.json

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gosec",
3-
"version": "2.15.0",
3+
"version": "2.22.7",
44
"patterns": [
55
{
66
"patternId": "G101",
@@ -68,12 +68,6 @@
6868
"level": "Error",
6969
"enabled": false
7070
},
71-
{
72-
"patternId": "G113",
73-
"category": "Security",
74-
"level": "Error",
75-
"enabled": false
76-
},
7771
{
7872
"patternId": "G114",
7973
"category": "Security",
@@ -170,6 +164,18 @@
170164
"level": "Error",
171165
"enabled": false
172166
},
167+
{
168+
"patternId": "G405",
169+
"category": "Security",
170+
"level": "Error",
171+
"enabled": false
172+
},
173+
{
174+
"patternId": "G406",
175+
"category": "Security",
176+
"level": "Error",
177+
"enabled": false
178+
},
173179
{
174180
"patternId": "G501",
175181
"category": "Security",
@@ -200,6 +206,18 @@
200206
"level": "Error",
201207
"enabled": false
202208
},
209+
{
210+
"patternId": "G506",
211+
"category": "Security",
212+
"level": "Error",
213+
"enabled": false
214+
},
215+
{
216+
"patternId": "G507",
217+
"category": "Security",
218+
"level": "Error",
219+
"enabled": false
220+
},
203221
{
204222
"patternId": "G601",
205223
"category": "Security",

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 1.3.8
1+
sbt.version = 1.10.1

0 commit comments

Comments
 (0)