mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Data flow: Sync files
This commit is contained in:
@@ -709,7 +709,8 @@ private module Cached {
|
|||||||
*/
|
*/
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
||||||
result = viableImplInCallContext(call, ctx)
|
result = viableImplInCallContext(call, ctx) and
|
||||||
|
result = viableCallable(call)
|
||||||
or
|
or
|
||||||
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ module Consistency {
|
|||||||
|
|
||||||
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
||||||
predicate uniquePostUpdateExclude(Node n) { none() }
|
predicate uniquePostUpdateExclude(Node n) { none() }
|
||||||
|
|
||||||
|
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
|
||||||
|
predicate viableImplInCallContextTooLargeExclude(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -217,4 +224,12 @@ module Consistency {
|
|||||||
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
||||||
msg = "PostUpdateNode should not be the target of local flow."
|
msg = "PostUpdateNode should not be the target of local flow."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate viableImplInCallContextTooLarge(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
callable = viableImplInCallContext(call, ctx) and
|
||||||
|
not callable = viableCallable(call) and
|
||||||
|
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -709,7 +709,8 @@ private module Cached {
|
|||||||
*/
|
*/
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
||||||
result = viableImplInCallContext(call, ctx)
|
result = viableImplInCallContext(call, ctx) and
|
||||||
|
result = viableCallable(call)
|
||||||
or
|
or
|
||||||
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ module Consistency {
|
|||||||
|
|
||||||
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
||||||
predicate uniquePostUpdateExclude(Node n) { none() }
|
predicate uniquePostUpdateExclude(Node n) { none() }
|
||||||
|
|
||||||
|
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
|
||||||
|
predicate viableImplInCallContextTooLargeExclude(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -217,4 +224,12 @@ module Consistency {
|
|||||||
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
||||||
msg = "PostUpdateNode should not be the target of local flow."
|
msg = "PostUpdateNode should not be the target of local flow."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate viableImplInCallContextTooLarge(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
callable = viableImplInCallContext(call, ctx) and
|
||||||
|
not callable = viableCallable(call) and
|
||||||
|
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -709,7 +709,8 @@ private module Cached {
|
|||||||
*/
|
*/
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
||||||
result = viableImplInCallContext(call, ctx)
|
result = viableImplInCallContext(call, ctx) and
|
||||||
|
result = viableCallable(call)
|
||||||
or
|
or
|
||||||
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ module Consistency {
|
|||||||
|
|
||||||
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
||||||
predicate uniquePostUpdateExclude(Node n) { none() }
|
predicate uniquePostUpdateExclude(Node n) { none() }
|
||||||
|
|
||||||
|
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
|
||||||
|
predicate viableImplInCallContextTooLargeExclude(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -217,4 +224,12 @@ module Consistency {
|
|||||||
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
||||||
msg = "PostUpdateNode should not be the target of local flow."
|
msg = "PostUpdateNode should not be the target of local flow."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate viableImplInCallContextTooLarge(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
callable = viableImplInCallContext(call, ctx) and
|
||||||
|
not callable = viableCallable(call) and
|
||||||
|
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -709,7 +709,8 @@ private module Cached {
|
|||||||
*/
|
*/
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
||||||
result = viableImplInCallContext(call, ctx)
|
result = viableImplInCallContext(call, ctx) and
|
||||||
|
result = viableCallable(call)
|
||||||
or
|
or
|
||||||
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ module Consistency {
|
|||||||
|
|
||||||
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
||||||
predicate uniquePostUpdateExclude(Node n) { none() }
|
predicate uniquePostUpdateExclude(Node n) { none() }
|
||||||
|
|
||||||
|
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
|
||||||
|
predicate viableImplInCallContextTooLargeExclude(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -217,4 +224,12 @@ module Consistency {
|
|||||||
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
||||||
msg = "PostUpdateNode should not be the target of local flow."
|
msg = "PostUpdateNode should not be the target of local flow."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate viableImplInCallContextTooLarge(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
callable = viableImplInCallContext(call, ctx) and
|
||||||
|
not callable = viableCallable(call) and
|
||||||
|
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -709,7 +709,8 @@ private module Cached {
|
|||||||
*/
|
*/
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
||||||
result = viableImplInCallContext(call, ctx)
|
result = viableImplInCallContext(call, ctx) and
|
||||||
|
result = viableCallable(call)
|
||||||
or
|
or
|
||||||
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ module Consistency {
|
|||||||
|
|
||||||
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
||||||
predicate uniquePostUpdateExclude(Node n) { none() }
|
predicate uniquePostUpdateExclude(Node n) { none() }
|
||||||
|
|
||||||
|
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
|
||||||
|
predicate viableImplInCallContextTooLargeExclude(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -217,4 +224,12 @@ module Consistency {
|
|||||||
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
||||||
msg = "PostUpdateNode should not be the target of local flow."
|
msg = "PostUpdateNode should not be the target of local flow."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate viableImplInCallContextTooLarge(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
callable = viableImplInCallContext(call, ctx) and
|
||||||
|
not callable = viableCallable(call) and
|
||||||
|
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -709,7 +709,8 @@ private module Cached {
|
|||||||
*/
|
*/
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
||||||
result = viableImplInCallContext(call, ctx)
|
result = viableImplInCallContext(call, ctx) and
|
||||||
|
result = viableCallable(call)
|
||||||
or
|
or
|
||||||
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ module Consistency {
|
|||||||
|
|
||||||
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
||||||
predicate uniquePostUpdateExclude(Node n) { none() }
|
predicate uniquePostUpdateExclude(Node n) { none() }
|
||||||
|
|
||||||
|
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
|
||||||
|
predicate viableImplInCallContextTooLargeExclude(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -217,4 +224,12 @@ module Consistency {
|
|||||||
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
||||||
msg = "PostUpdateNode should not be the target of local flow."
|
msg = "PostUpdateNode should not be the target of local flow."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate viableImplInCallContextTooLarge(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
callable = viableImplInCallContext(call, ctx) and
|
||||||
|
not callable = viableCallable(call) and
|
||||||
|
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -709,7 +709,8 @@ private module Cached {
|
|||||||
*/
|
*/
|
||||||
pragma[nomagic]
|
pragma[nomagic]
|
||||||
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
private DataFlowCallable viableImplInCallContextExt(DataFlowCall call, DataFlowCall ctx) {
|
||||||
result = viableImplInCallContext(call, ctx)
|
result = viableImplInCallContext(call, ctx) and
|
||||||
|
result = viableCallable(call)
|
||||||
or
|
or
|
||||||
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
result = viableCallableLambda(call, TDataFlowCallSome(ctx))
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -38,6 +38,13 @@ module Consistency {
|
|||||||
|
|
||||||
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
/** Holds if `n` should be excluded from the consistency test `uniquePostUpdate`. */
|
||||||
predicate uniquePostUpdateExclude(Node n) { none() }
|
predicate uniquePostUpdateExclude(Node n) { none() }
|
||||||
|
|
||||||
|
/** Holds if `(call, ctx)` should be excluded from the consistency test `viableImplInCallContextTooLargeExclude`. */
|
||||||
|
predicate viableImplInCallContextTooLargeExclude(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
none()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class RelevantNode extends Node {
|
private class RelevantNode extends Node {
|
||||||
@@ -217,4 +224,12 @@ module Consistency {
|
|||||||
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
not any(ConsistencyConfiguration c).postWithInFlowExclude(n) and
|
||||||
msg = "PostUpdateNode should not be the target of local flow."
|
msg = "PostUpdateNode should not be the target of local flow."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query predicate viableImplInCallContextTooLarge(
|
||||||
|
DataFlowCall call, DataFlowCall ctx, DataFlowCallable callable
|
||||||
|
) {
|
||||||
|
callable = viableImplInCallContext(call, ctx) and
|
||||||
|
not callable = viableCallable(call) and
|
||||||
|
not any(ConsistencyConfiguration c).viableImplInCallContextTooLargeExclude(call, ctx, callable)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user