Skip to content

Commit

Permalink
chore: Replace vulnerable golang.org/x/text dependency (#403)
Browse files Browse the repository at this point in the history
* chore: Replace vulnerable 'golang.org/x/text' dependency

* add runtime-watcher changes

* add replace linter exception

* Update runtime-watcher/.golangci.yaml

* Update runtime-watcher/.golangci.yaml
  • Loading branch information
c-pius authored Oct 11, 2024
1 parent e07abd5 commit f157b81
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions listener/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ linters:
- wastedassign # deprecated
- wsl # too strict and mostly code is not more readable
linters-settings:
gomoddirectives:
replace-allow-list:
- golang.org/x/text
gci:
sections:
- standard
Expand Down
3 changes: 3 additions & 0 deletions listener/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module github.com/kyma-project/runtime-watcher/listener

go 1.23.2

// TODO: https://github.com/kyma-project/runtime-watcher/issues/402
replace golang.org/x/text v0.16.0 => golang.org/x/text v0.19.0

require (
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions listener/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
4 changes: 4 additions & 0 deletions runtime-watcher/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ linters:
- wastedassign # deprecated
- wsl # too strict and mostly code is not more readable
linters-settings:
gomoddirectives:
replace-allow-list:
# TODO: https://github.com/kyma-project/runtime-watcher/pull/403
- golang.org/x/text
gci:
sections:
- standard
Expand Down
3 changes: 3 additions & 0 deletions runtime-watcher/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module github.com/kyma-project/runtime-watcher/skr

go 1.23.2

// TODO: https://github.com/kyma-project/runtime-watcher/issues/402
replace golang.org/x/text v0.17.0 => golang.org/x/text v0.19.0

require (
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions runtime-watcher/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,8 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down

0 comments on commit f157b81

Please sign in to comment.