Skip to content

Commit 79d8444

Browse files
authored
Merge pull request github#11532 from github/tiferet/endpoint-filter-test
ATM: Test for endpoints scored at inference time
2 parents edfcc0c + d211dec commit 79d8444

File tree

3 files changed

+316
-0
lines changed

3 files changed

+316
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,17 @@ abstract class AtmConfig extends JS::TaintTracking::Configuration {
154154
not AtmResultsInfo::isFlowLikelyInBaseQuery(source.getNode(), sink.getNode()) and
155155
score = AtmResultsInfo::getScoreForFlow(source.getNode(), sink.getNode())
156156
}
157+
158+
/**
159+
* Holds if if `sink` is an effective sink with flow from `source` which gets used as a sink candidate for scoring
160+
* with the ML model.
161+
*/
162+
predicate isSinkCandidateWithFlow(JS::DataFlow::PathNode sink) {
163+
exists(JS::DataFlow::PathNode source |
164+
this.hasFlowPath(source, sink) and
165+
not AtmResultsInfo::isFlowLikelyInBaseQuery(source.getNode(), sink.getNode())
166+
)
167+
}
157168
}
158169

159170
/** DEPRECATED: Alias for AtmConfig */

0 commit comments

Comments
 (0)