Skip to content

Commit 84907f9

Browse files
committed
JS: Fix copy/paste error in XSS ML-powered queries results patterns
We didn’t catch this because our unit tests test only library code due to the previous difficulty of running queries with an ML model (the ML models in packs work should fix that), and because the end-to-end evaluation runs separate queries that have different result patterns. Going forward we should create unit tests for the queries themselves, which will require using the ML model in tests. We should also be able to catch this type of error using DCA.
1 parent 117795c commit 84907f9

File tree

1 file changed

+2
-2
lines changed
  • javascript/ql/experimental/adaptivethreatmodeling/src

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ where
2323
not isFlowLikelyInBaseQuery(source.getNode(), sink.getNode()) and
2424
score = getScoreForFlow(source.getNode(), sink.getNode())
2525
select sink.getNode(), source, sink,
26-
"(Experimental) This may be a cross-site scripting vulnerability due to $@. Identified using machine learning."
27-
+ "a user-provided value", score
26+
"(Experimental) This may be a cross-site scripting vulnerability due to $@. Identified using machine learning.",
27+
source.getNode(), "a user-provided value", score

0 commit comments

Comments
 (0)