Skip to content

Commit 2136929

Browse files
committed
clean tests
1 parent bc6a0fc commit 2136929

File tree

2,720 files changed

+2383
-1256740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,720 files changed

+2383
-1256740
lines changed

go/ql/lib/semmle/go/security/JWT.qll

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ class GolangJwtParseFromRequest extends Function {
104104
exists(DataFlow::Function f |
105105
f.hasQualifiedName([
106106
"github.com/golang-jwt/jwt/request", "github.com/golang-jwt/jwt/v4/request",
107-
"github.com/dgrijalva/jwt-go/request", "github.com/golang-jwt/jwt/v4/request",
108-
"github.com/dgrijalva/jwt-go/v5/request"
107+
"github.com/dgrijalva/jwt-go/request", "github.com/dgrijalva/jwt-go/v4/request"
109108
], "ParseFromRequest")
110109
|
111110
this = f
@@ -125,8 +124,7 @@ class GolangJwtParseFromRequestWithClaims extends Function {
125124
exists(DataFlow::Function f |
126125
f.hasQualifiedName([
127126
"github.com/golang-jwt/jwt/request", "github.com/golang-jwt/jwt/v4/request",
128-
"github.com/dgrijalva/jwt-go/request", "github.com/golang-jwt/jwt/v4/request",
129-
"github.com/dgrijalva/jwt-go/v5/request"
127+
"github.com/dgrijalva/jwt-go/request", "github.com/dgrijalva/jwt-go/v4/request"
130128
], "ParseFromRequestWithClaims")
131129
|
132130
this = f
@@ -181,13 +179,17 @@ class GoJoseUnsafeClaims extends Function {
181179
predicate golangJwtIsAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
182180
exists(DataFlow::Function f, DataFlow::CallNode call |
183181
f.hasQualifiedName([
184-
"github.com/golang-jwt/jwt", "github.com/golang-jwt/jwt/v4", "github.com/golang-jwt/jwt/v5",
185-
"github.com/dgrijalva/jwt-go", "github.com/dgrijalva/jwt-go/v4"
182+
"github.com/golang-jwt/jwt", "github.com/golang-jwt/jwt/v4", "github.com/golang-jwt/jwt/v5"
186183
],
187184
[
188185
"ParseECPrivateKeyFromPEM", "ParseECPublicKeyFromPEM", "ParseEdPrivateKeyFromPEM",
189186
"ParseEdPublicKeyFromPEM", "ParseRSAPrivateKeyFromPEM", "ParseRSAPublicKeyFromPEM",
190187
"RegisterSigningMethod"
188+
]) or
189+
f.hasQualifiedName(["github.com/dgrijalva/jwt-go", "github.com/dgrijalva/jwt-go/v4"],
190+
[
191+
"ParseECPrivateKeyFromPEM", "ParseECPublicKeyFromPEM", "ParseRSAPrivateKeyFromPEM",
192+
"ParseRSAPrivateKeyFromPEMWithPassword", "ParseRSAPublicKeyFromPEM"
191193
])
192194
|
193195
call = f.getACall() and
@@ -211,15 +213,6 @@ predicate golangJwtIsAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node
211213
)
212214
}
213215

214-
predicate test(DataFlow::Function f, DataFlow::CallNode call) {
215-
f.hasQualifiedName([
216-
"gopkg.in/square/go-jose/jwt", "gopkg.in/square/go-jose.v2/jwt",
217-
"gopkg.in/square/go-jose.v3/jwt", "github.com/go-jose/go-jose/jwt",
218-
"github.com/go-jose/go-jose/v3/jwt"
219-
], ["ParseEncrypted", "ParseSigned",]) and
220-
call = f.getACall().getArgument(0)
221-
}
222-
223216
predicate goJoseIsAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
224217
exists(DataFlow::Function f, DataFlow::CallNode call |
225218
f.hasQualifiedName([
@@ -253,7 +246,7 @@ predicate goJoseIsAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nod
253246
"gopkg.in/square/go-jose.v2/jwt.NestedJSONWebToken",
254247
"gopkg.in/square/go-jose.v3/jwt.NestedJSONWebToken",
255248
"github.com/go-jose/go-jose/jwt.NestedJSONWebToken",
256-
"github.com/go-jose/go-jose/v3/jw.NestedJSONWebTokent"
249+
"github.com/go-jose/go-jose/v3/jw.NestedJSONWebToken"
257250
], "Decrypt")
258251
|
259252
call = f.getACall() and

go/ql/test/experimental/CWE-321-NoVerification/NoVerification.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.

go/ql/test/experimental/CWE-321-NoVerification/vendor/github.com/bytedance/sonic/.gitignore

Lines changed: 0 additions & 52 deletions
This file was deleted.

go/ql/test/experimental/CWE-321-NoVerification/vendor/github.com/bytedance/sonic/.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

go/ql/test/experimental/CWE-321-NoVerification/vendor/github.com/bytedance/sonic/.licenserc.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

go/ql/test/experimental/CWE-321-NoVerification/vendor/github.com/bytedance/sonic/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 128 deletions
This file was deleted.

go/ql/test/experimental/CWE-321-NoVerification/vendor/github.com/bytedance/sonic/CONTRIBUTING.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

go/ql/test/experimental/CWE-321-NoVerification/vendor/github.com/bytedance/sonic/CREDITS

Whitespace-only changes.

0 commit comments

Comments
 (0)