Skip to content

Commit ae858e8

Browse files
authored
chore: switch the JWT library (#29)
1 parent cc23f64 commit ae858e8

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/aquasecurity/trivy-mcp
33
go 1.24.2
44

55
require (
6+
github.com/golang-jwt/jwt/v5 v5.2.2
67
github.com/mark3labs/mcp-go v0.23.1
78
github.com/spf13/cobra v1.9.1
89
github.com/stretchr/testify v1.10.0
@@ -175,7 +176,6 @@ require (
175176
github.com/godbus/dbus/v5 v5.1.0 // indirect
176177
github.com/gogo/protobuf v1.3.2 // indirect
177178
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
178-
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
179179
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
180180
github.com/golang/snappy v0.0.4 // indirect
181181
github.com/google/btree v1.1.3 // indirect
@@ -403,7 +403,6 @@ require (
403403

404404
require (
405405
github.com/aquasecurity/trivy v0.62.1
406-
github.com/dgrijalva/jwt-go v3.2.0+incompatible
407406
github.com/google/uuid v1.6.0 // indirect
408407
github.com/spf13/cast v1.8.0 // indirect
409408
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,8 +994,6 @@ github.com/dgraph-io/badger/v4 v4.7.0 h1:Q+J8HApYAY7UMpL8d9owqiB+odzEc0zn/aqOD9j
994994
github.com/dgraph-io/badger/v4 v4.7.0/go.mod h1:He7TzG3YBy3j4f5baj5B7Zl2XyfNe5bl4Udl0aPemVA=
995995
github.com/dgraph-io/ristretto/v2 v2.2.0 h1:bkY3XzJcXoMuELV8F+vS8kzNgicwQFAaGINAEJdWGOM=
996996
github.com/dgraph-io/ristretto/v2 v2.2.0/go.mod h1:RZrm63UmcBAaYWC1DotLYBmTvgkrs0+XhBd7Npn7/zI=
997-
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
998-
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
999997
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
1000998
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
1001999
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo=

internal/creds/verify.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"time"
1818

1919
"github.com/aquasecurity/trivy/pkg/log"
20-
"github.com/dgrijalva/jwt-go"
20+
"github.com/golang-jwt/jwt/v5"
2121
)
2222

2323
type Response struct {
@@ -28,8 +28,7 @@ type Response struct {
2828
}
2929

3030
type JwtClaims struct {
31-
jwt.StandardClaims
32-
Exp int64 `json:"exp"`
31+
jwt.RegisteredClaims
3332
}
3433

3534
func (c *AquaCreds) Verify() error {

0 commit comments

Comments
 (0)