Skip to content

Commit 4a6de3e

Browse files
committed
Apply suggestion from code review
1 parent a0a742e commit 4a6de3e

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/ATMConfig.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ abstract class AtmConfig extends JS::TaintTracking::Configuration {
147147
* to this ML-boosted configuration, whereas the unboosted base query does not contain this source and sink
148148
* combination.
149149
*/
150-
predicate hasAlert(JS::DataFlow::PathNode source, JS::DataFlow::PathNode sink, float score) {
150+
predicate hasBoostedFlowPath(
151+
JS::DataFlow::PathNode source, JS::DataFlow::PathNode sink, float score
152+
) {
151153
this.hasFlowPath(source, sink) and
152154
not AtmResultsInfo::isFlowLikelyInBaseQuery(source.getNode(), sink.getNode()) and
153155
score = AtmResultsInfo::getScoreForFlow(source.getNode(), sink.getNode())

javascript/ql/experimental/adaptivethreatmodeling/src/NosqlInjectionATM.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import DataFlow::PathGraph
1818
import experimental.adaptivethreatmodeling.NosqlInjectionATM
1919

2020
from AtmConfig cfg, DataFlow::PathNode source, DataFlow::PathNode sink, float score
21-
where cfg.hasAlert(source, sink, score)
21+
where cfg.hasBoostedFlowPath(source, sink, score)
2222
select sink.getNode(), source, sink,
2323
"(Experimental) This may be a database query that depends on $@. Identified using machine learning.",
2424
source.getNode(), "a user-provided value", score

javascript/ql/experimental/adaptivethreatmodeling/src/SqlInjectionATM.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import ATM::ResultsInfo
1818
import DataFlow::PathGraph
1919

2020
from AtmConfig cfg, DataFlow::PathNode source, DataFlow::PathNode sink, float score
21-
where cfg.hasAlert(source, sink, score)
21+
where cfg.hasBoostedFlowPath(source, sink, score)
2222
select sink.getNode(), source, sink,
2323
"(Experimental) This may be a database query that depends on $@. Identified using machine learning.",
2424
source.getNode(), "a user-provided value", score

javascript/ql/experimental/adaptivethreatmodeling/src/TaintedPathATM.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import DataFlow::PathGraph
2222
import experimental.adaptivethreatmodeling.TaintedPathATM
2323

2424
from AtmConfig cfg, DataFlow::PathNode source, DataFlow::PathNode sink, float score
25-
where cfg.hasAlert(source, sink, score)
25+
where cfg.hasBoostedFlowPath(source, sink, score)
2626
select sink.getNode(), source, sink,
2727
"(Experimental) This may be a path that depends on $@. Identified using machine learning.",
2828
source.getNode(), "a user-provided value", score

javascript/ql/experimental/adaptivethreatmodeling/src/XssATM.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import DataFlow::PathGraph
1919
import experimental.adaptivethreatmodeling.XssATM
2020

2121
from AtmConfig cfg, DataFlow::PathNode source, DataFlow::PathNode sink, float score
22-
where cfg.hasAlert(source, sink, score)
22+
where cfg.hasBoostedFlowPath(source, sink, score)
2323
select sink.getNode(), source, sink,
2424
"(Experimental) This may be a cross-site scripting vulnerability due to $@. Identified using machine learning.",
2525
source.getNode(), "a user-provided value", score

0 commit comments

Comments
 (0)