JWT Missing Secret Or Public Key Verification

Add an experimental CodeQL query.
This commit is contained in:
toufik-airane
2020-06-20 16:54:41 +02:00
parent cafbe14dc8
commit b0aaca0e1c
3 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
/**
* @name JWT Missing Secret Or Public Key Verification
* @description The software does not verify the JWT token with a cryptographic secret or public key.
* @kind problem
* @problem.severity warning
* @precision high
* @id js/jwt-missing-secret-or-public-key-verification
* @tags security
* external/cwe/cwe-347
*/
import javascript
import DataFlow
from CallNode call
where
call = moduleMember("jsonwebtoken", "verify").getACall() and
call.getArgument(1).analyze().getABooleanValue() = false
select call