Skip to content

Commit 52ae757

Browse files
author
Max Schaefer
committed
JavaScript: Select Nodes (instead of PathNodes) everywhere.
1 parent e365b72 commit 52ae757

30 files changed

+53
-33
lines changed

javascript/ql/src/Security/CWE-022/TaintedPath.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ import DataFlow::PathGraph
2020

2121
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
2222
where cfg.hasPathFlow(source, sink)
23-
select sink.getNode(), source, sink, "This path depends on $@.", source, "a user-provided value"
23+
select sink.getNode(), source, sink, "This path depends on $@.",
24+
source.getNode(), "a user-provided value"

javascript/ql/src/Security/CWE-078/CommandInjection.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ where cfg.hasPathFlow(source, sink) and
2222
cfg.isSinkWithHighlight(sink.getNode(), highlight)
2323
else
2424
highlight = sink.getNode()
25-
select highlight, source, sink, "This command depends on $@.", source, "a user-provided value"
25+
select highlight, source, sink, "This command depends on $@.",
26+
source.getNode(), "a user-provided value"

javascript/ql/src/Security/CWE-079/ReflectedXss.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ import DataFlow::PathGraph
1818
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
1919
where cfg.hasPathFlow(source, sink)
2020
select sink.getNode(), source, sink, "Cross-site scripting vulnerability due to $@.",
21-
source, "user-provided value"
21+
source.getNode(), "user-provided value"

javascript/ql/src/Security/CWE-079/StoredXss.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ import DataFlow::PathGraph
1818
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
1919
where cfg.hasPathFlow(source, sink)
2020
select sink.getNode(), source, sink, "Stored cross-site scripting vulnerability due to $@.",
21-
source, "stored value"
21+
source.getNode(), "stored value"

javascript/ql/src/Security/CWE-079/Xss.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ import DataFlow::PathGraph
1818
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
1919
where cfg.hasPathFlow(source, sink)
2020
select sink.getNode(), source, sink, sink.getNode().(Sink).getVulnerabilityKind() + " vulnerability due to $@.",
21-
source, "user-provided value"
21+
source.getNode(), "user-provided value"

javascript/ql/src/Security/CWE-089/SqlInjection.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ from DataFlow::Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode
1919
where (cfg instanceof SqlInjection::Configuration or
2020
cfg instanceof NosqlInjection::Configuration) and
2121
cfg.hasPathFlow(source, sink)
22-
select sink.getNode(), source, sink, "This query depends on $@.", source, "a user-provided value"
22+
select sink.getNode(), source, sink, "This query depends on $@.",
23+
source.getNode(), "a user-provided value"

javascript/ql/src/Security/CWE-094/CodeInjection.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ import DataFlow::PathGraph
1818

1919
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
2020
where cfg.hasPathFlow(source, sink)
21-
select sink.getNode(), source, sink, "$@ flows to here and is interpreted as code.", source, "User-provided value"
21+
select sink.getNode(), source, sink, "$@ flows to here and is interpreted as code.",
22+
source.getNode(), "User-provided value"

javascript/ql/src/Security/CWE-134/TaintedFormatString.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ import DataFlow::PathGraph
1515

1616
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
1717
where cfg.hasPathFlow(source, sink)
18-
select sink.getNode(), source, sink, "$@ flows here and is used in a format string.", source, "User-provided value"
18+
select sink.getNode(), source, sink, "$@ flows here and is used in a format string.",
19+
source.getNode(), "User-provided value"

javascript/ql/src/Security/CWE-200/FileAccessToHttp.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ import DataFlow::PathGraph
1414

1515
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
1616
where cfg.hasPathFlow(source, sink)
17-
select sink.getNode(), source, sink, "$@ flows directly to outbound network request", source, "File data"
17+
select sink.getNode(), source, sink, "$@ flows directly to outbound network request",
18+
source.getNode(), "File data"

javascript/ql/src/Security/CWE-209/StackTraceExposure.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ import DataFlow::PathGraph
1818
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
1919
where cfg.hasPathFlow(source, sink)
2020
select sink.getNode(), source, sink, "Stack trace information from $@ may be exposed to an external user here.",
21-
source, "here"
21+
source.getNode(), "here"

0 commit comments

Comments
 (0)