Skip to content

Commit b0aaca0

Browse files
committed
JWT Missing Secret Or Public Key Verification
Add an experimental CodeQL query.
1 parent cafbe14 commit b0aaca0

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

javascript/ql/src/experimental/Security/CWE-347/JWTMissingSecretOrPublicKeyVerification.help

Whitespace-only changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* @name JWT Missing Secret Or Public Key Verification
3+
* @description The software does not verify the JWT token with a cryptographic secret or public key.
4+
* @kind problem
5+
* @problem.severity warning
6+
* @precision high
7+
* @id js/jwt-missing-secret-or-public-key-verification
8+
* @tags security
9+
* external/cwe/cwe-347
10+
*/
11+
12+
import javascript
13+
import DataFlow
14+
15+
from CallNode call
16+
where
17+
call = moduleMember("jsonwebtoken", "verify").getACall() and
18+
call.getArgument(1).analyze().getABooleanValue() = false
19+
select call
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)