fix format warnings/errors

This commit is contained in:
amammad
2023-06-25 23:24:12 +10:00
parent 307187f6c1
commit c16a2827d7
6 changed files with 8 additions and 12 deletions

View File

@@ -5,7 +5,7 @@
* @problem.severity error
* @security-severity 7.8
* @precision medium
* @id js/user-controlled-file-decompression
* @id js/user-controlled-file-decompression-jszip
* @tags security
* experimental
* external/cwe/cwe-409

View File

@@ -5,13 +5,12 @@
* @problem.severity error
* @security-severity 7.8
* @precision medium
* @id js/user-controlled-file-decompression
* @id js/user-controlled-file-decompression--tar
* @tags security
* experimental
* external/cwe/cwe-409
*/
import javascript
import DataFlow::PathGraph
import API
import semmle.javascript.Concepts

View File

@@ -5,7 +5,7 @@
* @problem.severity error
* @security-severity 7.8
* @precision medium
* @id js/user-controlled-file-decompression
* @id js/user-controlled-file-decompression-Zlib-Pako-AdmZip
* @tags security
* experimental
* external/cwe/cwe-409
@@ -65,11 +65,7 @@ class BombConfiguration extends TaintTracking::Configuration {
)
or
sink =
[
DataFlow::moduleMember("pako", ["inflate", "inflateRaw", "ungzip"])
.getACall()
.getArgument(0)
]
DataFlow::moduleMember("pako", ["inflate", "inflateRaw", "ungzip"]).getACall().getArgument(0)
or
exists(API::Node n | n = API::moduleImport("adm-zip").getInstance() |
(
@@ -85,7 +81,7 @@ class BombConfiguration extends TaintTracking::Configuration {
readablePipeAdditionalTaintStep(pred, succ)
or
// succ = new Uint8Array(pred)
exists(DataFlow::Node n, NewExpr ne | ne = n.asExpr().(NewExpr) |
exists(DataFlow::Node n, NewExpr ne | ne = n.asExpr() |
pred.asExpr() = ne.getArgument(0) and
succ.asExpr() = ne and
ne.getCalleeName() = "Uint8Array"

View File

@@ -3,6 +3,7 @@ import DataFlow::PathGraph
import API
/**
* A Command Line argument as a Flow Source
* there are FP when the types are not str
* because int,boolean types are not really dangerous as a source node
*/

View File

@@ -10,7 +10,7 @@
import javascript
import DataFlow::PathGraph
import sequelizeModelTypes::sequelizeModel
import sequelizeModelTypes::SequelizeModel
import API
class SequelizeModelConfiguration extends TaintTracking::Configuration {

View File

@@ -1,7 +1,7 @@
import javascript
import DataFlow
module sequelizeModel {
module SequelizeModel {
SourceNode sequelizeModelAsSourceNode(TypeTracker t) {
t.start() and
exists(