mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Merge branch 'main' into js/shared-dataflow-merge-main
This commit is contained in:
19
javascript/ql/lib/utils/test/LegacyDataFlowDiff.qll
Normal file
19
javascript/ql/lib/utils/test/LegacyDataFlowDiff.qll
Normal file
@@ -0,0 +1,19 @@
|
||||
private import javascript
|
||||
|
||||
private signature class LegacyConfigSig {
|
||||
predicate hasFlow(DataFlow::Node source, DataFlow::Node sink);
|
||||
}
|
||||
|
||||
module DataFlowDiff<DataFlow::GlobalFlowSig NewFlow, LegacyConfigSig LegacyConfig> {
|
||||
query predicate legacyDataFlowDifference(
|
||||
DataFlow::Node source, DataFlow::Node sink, string message
|
||||
) {
|
||||
NewFlow::flow(source, sink) and
|
||||
not any(LegacyConfig cfg).hasFlow(source, sink) and
|
||||
message = "only flow with NEW data flow library"
|
||||
or
|
||||
not NewFlow::flow(source, sink) and
|
||||
any(LegacyConfig cfg).hasFlow(source, sink) and
|
||||
message = "only flow with OLD data flow library"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user