mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Replace acceptingvalue with acceptingValue
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
* - Barriers:
|
* - Barriers:
|
||||||
* `namespace; type; subtypes; name; signature; ext; output; kind; provenance`
|
* `namespace; type; subtypes; name; signature; ext; output; kind; provenance`
|
||||||
* - BarrierGuards:
|
* - BarrierGuards:
|
||||||
* `namespace; type; subtypes; name; signature; ext; input; acceptingvalue; kind; provenance`
|
* `namespace; type; subtypes; name; signature; ext; input; acceptingValue; kind; provenance`
|
||||||
*
|
*
|
||||||
* The interpretation of a row is similar to API-graphs with a left-to-right
|
* The interpretation of a row is similar to API-graphs with a left-to-right
|
||||||
* reading.
|
* reading.
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
* value, and
|
* value, and
|
||||||
* - flow from the _second_ indirection of the 0th argument to the first
|
* - flow from the _second_ indirection of the 0th argument to the first
|
||||||
* indirection of the return value, etc.
|
* indirection of the return value, etc.
|
||||||
* 8. The `acceptingvalue` column of barrier guard models specifies the condition
|
* 8. The `acceptingValue` column of barrier guard models specifies the condition
|
||||||
* under which the guard blocks flow. It can be one of "true" or "false". In
|
* under which the guard blocks flow. It can be one of "true" or "false". In
|
||||||
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
|
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
|
||||||
* 9. The `kind` column is a tag that can be referenced from QL to determine to
|
* 9. The `kind` column is a tag that can be referenced from QL to determine to
|
||||||
@@ -1089,13 +1089,13 @@ private module Cached {
|
|||||||
|
|
||||||
private predicate barrierGuardChecks(IRGuardCondition g, Expr e, boolean gv, TKindModelPair kmp) {
|
private predicate barrierGuardChecks(IRGuardCondition g, Expr e, boolean gv, TKindModelPair kmp) {
|
||||||
exists(
|
exists(
|
||||||
SourceSinkInterpretationInput::InterpretNode n, Public::AcceptingValue acceptingvalue,
|
SourceSinkInterpretationInput::InterpretNode n, Public::AcceptingValue acceptingValue,
|
||||||
string kind, string model
|
string kind, string model
|
||||||
|
|
|
|
||||||
isBarrierGuardNode(n, acceptingvalue, kind, model) and
|
isBarrierGuardNode(n, acceptingValue, kind, model) and
|
||||||
n.asNode().asExpr() = e and
|
n.asNode().asExpr() = e and
|
||||||
kmp = TMkPair(kind, model) and
|
kmp = TMkPair(kind, model) and
|
||||||
gv = convertAcceptingValue(acceptingvalue).asBooleanValue() and
|
gv = convertAcceptingValue(acceptingValue).asBooleanValue() and
|
||||||
n.asNode().(Private::ArgumentNode).getCall().asCallInstruction() = g
|
n.asNode().(Private::ArgumentNode).getCall().asCallInstruction() = g
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1112,14 +1112,14 @@ private module Cached {
|
|||||||
) {
|
) {
|
||||||
exists(
|
exists(
|
||||||
SourceSinkInterpretationInput::InterpretNode interpretNode,
|
SourceSinkInterpretationInput::InterpretNode interpretNode,
|
||||||
Public::AcceptingValue acceptingvalue, string kind, string model, int indirectionIndex,
|
Public::AcceptingValue acceptingValue, string kind, string model, int indirectionIndex,
|
||||||
Private::ArgumentNode arg
|
Private::ArgumentNode arg
|
||||||
|
|
|
|
||||||
isBarrierGuardNode(interpretNode, acceptingvalue, kind, model) and
|
isBarrierGuardNode(interpretNode, acceptingValue, kind, model) and
|
||||||
arg = interpretNode.asNode() and
|
arg = interpretNode.asNode() and
|
||||||
arg.asIndirectExpr(indirectionIndex) = e and
|
arg.asIndirectExpr(indirectionIndex) = e and
|
||||||
kmp = MkKindModelPairIntPair(TMkPair(kind, model), indirectionIndex) and
|
kmp = MkKindModelPairIntPair(TMkPair(kind, model), indirectionIndex) and
|
||||||
gv = convertAcceptingValue(acceptingvalue).asBooleanValue() and
|
gv = convertAcceptingValue(acceptingValue).asBooleanValue() and
|
||||||
arg.getCall().asCallInstruction() = g
|
arg.getCall().asCallInstruction() = g
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ extensible predicate barrierModel(
|
|||||||
*/
|
*/
|
||||||
extensible predicate barrierGuardModel(
|
extensible predicate barrierGuardModel(
|
||||||
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
||||||
string input, string acceptingvalue, string kind, string provenance, QlBuiltins::ExtensionId madId
|
string input, string acceptingValue, string kind, string provenance, QlBuiltins::ExtensionId madId
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -162,13 +162,13 @@ module SourceSinkInterpretationInput implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
predicate barrierGuardElement(
|
predicate barrierGuardElement(
|
||||||
Element e, string input, Public::AcceptingValue acceptingvalue, string kind,
|
Element e, string input, Public::AcceptingValue acceptingValue, string kind,
|
||||||
Public::Provenance provenance, string model
|
Public::Provenance provenance, string model
|
||||||
) {
|
) {
|
||||||
exists(
|
exists(
|
||||||
string package, string type, boolean subtypes, string name, string signature, string ext
|
string package, string type, boolean subtypes, string name, string signature, string ext
|
||||||
|
|
|
|
||||||
barrierGuardModel(package, type, subtypes, name, signature, ext, input, acceptingvalue, kind,
|
barrierGuardModel(package, type, subtypes, name, signature, ext, input, acceptingValue, kind,
|
||||||
provenance, model) and
|
provenance, model) and
|
||||||
e = interpretElement(package, type, subtypes, name, signature, ext)
|
e = interpretElement(package, type, subtypes, name, signature, ext)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* - Barriers:
|
* - Barriers:
|
||||||
* `namespace; type; subtypes; name; signature; ext; output; kind; provenance`
|
* `namespace; type; subtypes; name; signature; ext; output; kind; provenance`
|
||||||
* - BarrierGuards:
|
* - BarrierGuards:
|
||||||
* `namespace; type; subtypes; name; signature; ext; input; acceptingvalue; kind; provenance`
|
* `namespace; type; subtypes; name; signature; ext; input; acceptingValue; kind; provenance`
|
||||||
* - Neutrals:
|
* - Neutrals:
|
||||||
* `namespace; type; name; signature; kind; provenance`
|
* `namespace; type; name; signature; kind; provenance`
|
||||||
* A neutral is used to indicate that a callable is neutral with respect to flow (no summary), source (is not a source) or sink (is not a sink).
|
* A neutral is used to indicate that a callable is neutral with respect to flow (no summary), source (is not a source) or sink (is not a sink).
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
* - "Field[f]": Selects the contents of field `f`.
|
* - "Field[f]": Selects the contents of field `f`.
|
||||||
* - "Property[p]": Selects the contents of property `p`.
|
* - "Property[p]": Selects the contents of property `p`.
|
||||||
*
|
*
|
||||||
* 8. The `acceptingvalue` column of barrier guard models specifies the condition
|
* 8. The `acceptingValue` column of barrier guard models specifies the condition
|
||||||
* under which the guard blocks flow. It can be one of "true" or "false". In
|
* under which the guard blocks flow. It can be one of "true" or "false". In
|
||||||
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
|
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
|
||||||
* 9. The `kind` column is a tag that can be referenced from QL to determine to
|
* 9. The `kind` column is a tag that can be referenced from QL to determine to
|
||||||
@@ -237,11 +237,11 @@ module ModelValidation {
|
|||||||
result = "Unrecognized provenance description \"" + provenance + "\" in " + pred + " model."
|
result = "Unrecognized provenance description \"" + provenance + "\" in " + pred + " model."
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
exists(string acceptingvalue |
|
exists(string acceptingValue |
|
||||||
barrierGuardModel(_, _, _, _, _, _, _, acceptingvalue, _, _, _) and
|
barrierGuardModel(_, _, _, _, _, _, _, acceptingValue, _, _, _) and
|
||||||
invalidAcceptingValue(acceptingvalue) and
|
invalidAcceptingValue(acceptingValue) and
|
||||||
result =
|
result =
|
||||||
"Unrecognized accepting value description \"" + acceptingvalue +
|
"Unrecognized accepting value description \"" + acceptingValue +
|
||||||
"\" in barrier guard model."
|
"\" in barrier guard model."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -489,13 +489,13 @@ private module Cached {
|
|||||||
|
|
||||||
private predicate barrierGuardChecks(Guard g, Expr e, GuardValue gv, TKindModelPair kmp) {
|
private predicate barrierGuardChecks(Guard g, Expr e, GuardValue gv, TKindModelPair kmp) {
|
||||||
exists(
|
exists(
|
||||||
SourceSinkInterpretationInput::InterpretNode n, AcceptingValue acceptingvalue, string kind,
|
SourceSinkInterpretationInput::InterpretNode n, AcceptingValue acceptingValue, string kind,
|
||||||
string model
|
string model
|
||||||
|
|
|
|
||||||
isBarrierGuardNode(n, acceptingvalue, kind, model) and
|
isBarrierGuardNode(n, acceptingValue, kind, model) and
|
||||||
n.asNode().asExpr() = e and
|
n.asNode().asExpr() = e and
|
||||||
kmp = TMkPair(kind, model) and
|
kmp = TMkPair(kind, model) and
|
||||||
gv = convertAcceptingValue(acceptingvalue)
|
gv = convertAcceptingValue(acceptingValue)
|
||||||
|
|
|
|
||||||
g.(Call).getAnArgument() = e or g.(QualifiableExpr).getQualifier() = e
|
g.(Call).getAnArgument() = e or g.(QualifiableExpr).getQualifier() = e
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ extensible predicate barrierModel(
|
|||||||
*/
|
*/
|
||||||
extensible predicate barrierGuardModel(
|
extensible predicate barrierGuardModel(
|
||||||
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
||||||
string input, string acceptingvalue, string kind, string provenance, QlBuiltins::ExtensionId madId
|
string input, string acceptingValue, string kind, string provenance, QlBuiltins::ExtensionId madId
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -253,13 +253,13 @@ module SourceSinkInterpretationInput implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
predicate barrierGuardElement(
|
predicate barrierGuardElement(
|
||||||
Element e, string input, Public::AcceptingValue acceptingvalue, string kind,
|
Element e, string input, Public::AcceptingValue acceptingValue, string kind,
|
||||||
Public::Provenance provenance, string model
|
Public::Provenance provenance, string model
|
||||||
) {
|
) {
|
||||||
exists(
|
exists(
|
||||||
string namespace, string type, boolean subtypes, string name, string signature, string ext
|
string namespace, string type, boolean subtypes, string name, string signature, string ext
|
||||||
|
|
|
|
||||||
barrierGuardModel(namespace, type, subtypes, name, signature, ext, input, acceptingvalue,
|
barrierGuardModel(namespace, type, subtypes, name, signature, ext, input, acceptingValue,
|
||||||
kind, provenance, model) and
|
kind, provenance, model) and
|
||||||
e = interpretElement(namespace, type, subtypes, name, signature, ext, _)
|
e = interpretElement(namespace, type, subtypes, name, signature, ext, _)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* - Barriers:
|
* - Barriers:
|
||||||
* `package; type; subtypes; name; signature; ext; output; kind; provenance`
|
* `package; type; subtypes; name; signature; ext; output; kind; provenance`
|
||||||
* - BarrierGuards:
|
* - BarrierGuards:
|
||||||
* `package; type; subtypes; name; signature; ext; input; acceptingvalue; kind; provenance`
|
* `package; type; subtypes; name; signature; ext; input; acceptingValue; kind; provenance`
|
||||||
* - Neutrals:
|
* - Neutrals:
|
||||||
* `package; type; name; signature; kind; provenance`
|
* `package; type; name; signature; kind; provenance`
|
||||||
* A neutral is used to indicate that a callable is neutral with respect to flow (no summary), source (is not a source) or sink (is not a sink).
|
* A neutral is used to indicate that a callable is neutral with respect to flow (no summary), source (is not a source) or sink (is not a sink).
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
* - "MapValue": Selects a value in a map.
|
* - "MapValue": Selects a value in a map.
|
||||||
* - "Dereference": Selects the value referenced by a pointer.
|
* - "Dereference": Selects the value referenced by a pointer.
|
||||||
*
|
*
|
||||||
* 8. The `acceptingvalue` column of barrier guard models specifies the condition
|
* 8. The `acceptingValue` column of barrier guard models specifies the condition
|
||||||
* under which the guard blocks flow. It can be one of "true" or "false". In
|
* under which the guard blocks flow. It can be one of "true" or "false". In
|
||||||
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
|
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
|
||||||
* 9. The `kind` column is a tag that can be referenced from QL to determine to
|
* 9. The `kind` column is a tag that can be referenced from QL to determine to
|
||||||
@@ -266,11 +266,11 @@ module ModelValidation {
|
|||||||
result = "Unrecognized provenance description \"" + provenance + "\" in " + pred + " model."
|
result = "Unrecognized provenance description \"" + provenance + "\" in " + pred + " model."
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
exists(string acceptingvalue |
|
exists(string acceptingValue |
|
||||||
barrierGuardModel(_, _, _, _, _, _, _, acceptingvalue, _, _, _) and
|
barrierGuardModel(_, _, _, _, _, _, _, acceptingValue, _, _, _) and
|
||||||
invalidAcceptingValue(acceptingvalue) and
|
invalidAcceptingValue(acceptingValue) and
|
||||||
result =
|
result =
|
||||||
"Unrecognized accepting value description \"" + acceptingvalue +
|
"Unrecognized accepting value description \"" + acceptingValue +
|
||||||
"\" in barrier guard model."
|
"\" in barrier guard model."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -478,13 +478,13 @@ private module Cached {
|
|||||||
|
|
||||||
private predicate barrierGuardChecks(DataFlow::Node g, Expr e, boolean gv, TKindModelPair kmp) {
|
private predicate barrierGuardChecks(DataFlow::Node g, Expr e, boolean gv, TKindModelPair kmp) {
|
||||||
exists(
|
exists(
|
||||||
SourceSinkInterpretationInput::InterpretNode n, Public::AcceptingValue acceptingvalue,
|
SourceSinkInterpretationInput::InterpretNode n, Public::AcceptingValue acceptingValue,
|
||||||
string kind, string model
|
string kind, string model
|
||||||
|
|
|
|
||||||
isBarrierGuardNode(n, acceptingvalue, kind, model) and
|
isBarrierGuardNode(n, acceptingValue, kind, model) and
|
||||||
n.asNode().asExpr() = e and
|
n.asNode().asExpr() = e and
|
||||||
kmp = TMkPair(kind, model) and
|
kmp = TMkPair(kind, model) and
|
||||||
gv = convertAcceptingValue(acceptingvalue)
|
gv = convertAcceptingValue(acceptingValue)
|
||||||
|
|
|
|
||||||
g.asExpr().(CallExpr).getAnArgument() = e // TODO: qualifier?
|
g.asExpr().(CallExpr).getAnArgument() = e // TODO: qualifier?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ extensible predicate barrierModel(
|
|||||||
*/
|
*/
|
||||||
extensible predicate barrierGuardModel(
|
extensible predicate barrierGuardModel(
|
||||||
string package, string type, boolean subtypes, string name, string signature, string ext,
|
string package, string type, boolean subtypes, string name, string signature, string ext,
|
||||||
string input, string acceptingvalue, string kind, string provenance, QlBuiltins::ExtensionId madId
|
string input, string acceptingValue, string kind, string provenance, QlBuiltins::ExtensionId madId
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -174,13 +174,13 @@ module SourceSinkInterpretationInput implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
predicate barrierGuardElement(
|
predicate barrierGuardElement(
|
||||||
Element e, string input, Public::AcceptingValue acceptingvalue, string kind,
|
Element e, string input, Public::AcceptingValue acceptingValue, string kind,
|
||||||
Public::Provenance provenance, string model
|
Public::Provenance provenance, string model
|
||||||
) {
|
) {
|
||||||
exists(
|
exists(
|
||||||
string package, string type, boolean subtypes, string name, string signature, string ext
|
string package, string type, boolean subtypes, string name, string signature, string ext
|
||||||
|
|
|
|
||||||
barrierGuardModel(package, type, subtypes, name, signature, ext, input, acceptingvalue, kind,
|
barrierGuardModel(package, type, subtypes, name, signature, ext, input, acceptingValue, kind,
|
||||||
provenance, model) and
|
provenance, model) and
|
||||||
e = interpretElement(package, type, subtypes, name, signature, ext)
|
e = interpretElement(package, type, subtypes, name, signature, ext)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* - Barriers:
|
* - Barriers:
|
||||||
* `package; type; subtypes; name; signature; ext; output; kind; provenance`
|
* `package; type; subtypes; name; signature; ext; output; kind; provenance`
|
||||||
* - BarrierGuards:
|
* - BarrierGuards:
|
||||||
* `package; type; subtypes; name; signature; ext; input; acceptingvalue; kind; provenance`
|
* `package; type; subtypes; name; signature; ext; input; acceptingValue; kind; provenance`
|
||||||
* - Neutrals:
|
* - Neutrals:
|
||||||
* `package; type; name; signature; kind; provenance`
|
* `package; type; name; signature; kind; provenance`
|
||||||
* A neutral is used to indicate that a callable is neutral with respect to flow (no summary), source (is not a source) or sink (is not a sink).
|
* A neutral is used to indicate that a callable is neutral with respect to flow (no summary), source (is not a source) or sink (is not a sink).
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
* in the given range. The range is inclusive at both ends.
|
* in the given range. The range is inclusive at both ends.
|
||||||
* - "ReturnValue": Selects the return value of a call to the selected element.
|
* - "ReturnValue": Selects the return value of a call to the selected element.
|
||||||
* - "Element": Selects the collection elements of the selected element.
|
* - "Element": Selects the collection elements of the selected element.
|
||||||
* 8. The `acceptingvalue` column of barrier guard models specifies the condition
|
* 8. The `acceptingValue` column of barrier guard models specifies the condition
|
||||||
* under which the guard blocks flow. It can be one of "true" or "false". In
|
* under which the guard blocks flow. It can be one of "true" or "false". In
|
||||||
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
|
* the future "no-exception", "not-zero", "null", "not-null" may be supported.
|
||||||
* 9. The `kind` column is a tag that can be referenced from QL to determine to
|
* 9. The `kind` column is a tag that can be referenced from QL to determine to
|
||||||
@@ -365,11 +365,11 @@ module ModelValidation {
|
|||||||
result = "Unrecognized provenance description \"" + provenance + "\" in " + pred + " model."
|
result = "Unrecognized provenance description \"" + provenance + "\" in " + pred + " model."
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
exists(string acceptingvalue |
|
exists(string acceptingValue |
|
||||||
barrierGuardModel(_, _, _, _, _, _, _, acceptingvalue, _, _, _) and
|
barrierGuardModel(_, _, _, _, _, _, _, acceptingValue, _, _, _) and
|
||||||
invalidAcceptingValue(acceptingvalue) and
|
invalidAcceptingValue(acceptingValue) and
|
||||||
result =
|
result =
|
||||||
"Unrecognized accepting value description \"" + acceptingvalue +
|
"Unrecognized accepting value description \"" + acceptingValue +
|
||||||
"\" in barrier guard model."
|
"\" in barrier guard model."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -590,13 +590,13 @@ private module Cached {
|
|||||||
|
|
||||||
private predicate barrierGuardChecks(Guard g, Expr e, GuardValue gv, TKindModelPair kmp) {
|
private predicate barrierGuardChecks(Guard g, Expr e, GuardValue gv, TKindModelPair kmp) {
|
||||||
exists(
|
exists(
|
||||||
SourceSinkInterpretationInput::InterpretNode n, AcceptingValue acceptingvalue, string kind,
|
SourceSinkInterpretationInput::InterpretNode n, AcceptingValue acceptingValue, string kind,
|
||||||
string model
|
string model
|
||||||
|
|
|
|
||||||
isBarrierGuardNode(n, acceptingvalue, kind, model) and
|
isBarrierGuardNode(n, acceptingValue, kind, model) and
|
||||||
n.asNode().asExpr() = e and
|
n.asNode().asExpr() = e and
|
||||||
kmp = TMkPair(kind, model) and
|
kmp = TMkPair(kind, model) and
|
||||||
gv = convertAcceptingValue(acceptingvalue)
|
gv = convertAcceptingValue(acceptingValue)
|
||||||
|
|
|
|
||||||
g.(Call).getAnArgument() = e or g.(MethodCall).getQualifier() = e
|
g.(Call).getAnArgument() = e or g.(MethodCall).getQualifier() = e
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ extensible predicate barrierModel(
|
|||||||
*/
|
*/
|
||||||
extensible predicate barrierGuardModel(
|
extensible predicate barrierGuardModel(
|
||||||
string package, string type, boolean subtypes, string name, string signature, string ext,
|
string package, string type, boolean subtypes, string name, string signature, string ext,
|
||||||
string input, string acceptingvalue, string kind, string provenance, QlBuiltins::ExtensionId madId
|
string input, string acceptingValue, string kind, string provenance, QlBuiltins::ExtensionId madId
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ module SourceSinkInterpretationInput implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
predicate barrierGuardElement(
|
predicate barrierGuardElement(
|
||||||
Element e, string input, Public::AcceptingValue acceptingvalue, string kind,
|
Element e, string input, Public::AcceptingValue acceptingValue, string kind,
|
||||||
Public::Provenance provenance, string model
|
Public::Provenance provenance, string model
|
||||||
) {
|
) {
|
||||||
exists(
|
exists(
|
||||||
@@ -290,7 +290,7 @@ module SourceSinkInterpretationInput implements
|
|||||||
SourceOrSinkElement baseBarrier, string originalInput
|
SourceOrSinkElement baseBarrier, string originalInput
|
||||||
|
|
|
|
||||||
barrierGuardModel(namespace, type, subtypes, name, signature, ext, originalInput,
|
barrierGuardModel(namespace, type, subtypes, name, signature, ext, originalInput,
|
||||||
acceptingvalue, kind, provenance, model) and
|
acceptingValue, kind, provenance, model) and
|
||||||
baseBarrier = interpretElement(namespace, type, subtypes, name, signature, ext, _) and
|
baseBarrier = interpretElement(namespace, type, subtypes, name, signature, ext, _) and
|
||||||
(
|
(
|
||||||
e = baseBarrier and input = originalInput
|
e = baseBarrier and input = originalInput
|
||||||
|
|||||||
@@ -1183,12 +1183,12 @@ private module Cached {
|
|||||||
exists(
|
exists(
|
||||||
FlowSummaryImpl::Public::BarrierGuardElement b,
|
FlowSummaryImpl::Public::BarrierGuardElement b,
|
||||||
FlowSummaryImpl::Private::SummaryComponentStack stack,
|
FlowSummaryImpl::Private::SummaryComponentStack stack,
|
||||||
FlowSummaryImpl::Public::AcceptingValue acceptingvalue, string kind, string model
|
FlowSummaryImpl::Public::AcceptingValue acceptingValue, string kind, string model
|
||||||
|
|
|
|
||||||
FlowSummaryImpl::Private::barrierGuardSpec(b, stack, acceptingvalue, kind, model) and
|
FlowSummaryImpl::Private::barrierGuardSpec(b, stack, acceptingValue, kind, model) and
|
||||||
e = FlowSummaryImpl::StepsInput::getSinkNode(b, stack.headOfSingleton()).asExpr() and
|
e = FlowSummaryImpl::StepsInput::getSinkNode(b, stack.headOfSingleton()).asExpr() and
|
||||||
kmp = TMkPair(kind, model) and
|
kmp = TMkPair(kind, model) and
|
||||||
gv = convertAcceptingValue(acceptingvalue) and
|
gv = convertAcceptingValue(acceptingValue) and
|
||||||
g = b.getCall()
|
g = b.getCall()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2189,10 +2189,10 @@ module Make<
|
|||||||
not exists(interpretComponent(c))
|
not exists(interpretComponent(c))
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Holds if `acceptingvalue` is not a valid barrier guard accepting-value. */
|
/** Holds if `acceptingValue` is not a valid barrier guard accepting-value. */
|
||||||
bindingset[acceptingvalue]
|
bindingset[acceptingValue]
|
||||||
predicate invalidAcceptingValue(string acceptingvalue) {
|
predicate invalidAcceptingValue(string acceptingValue) {
|
||||||
not acceptingvalue instanceof AcceptingValue
|
not acceptingValue instanceof AcceptingValue
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Holds if `provenance` is not a valid provenance value. */
|
/** Holds if `provenance` is not a valid provenance value. */
|
||||||
@@ -2242,10 +2242,10 @@ module Make<
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if an external barrier guard specification exists for `n` with input
|
* Holds if an external barrier guard specification exists for `n` with input
|
||||||
* specification `input`, accepting value `acceptingvalue`, and kind `kind`.
|
* specification `input`, accepting value `acceptingValue`, and kind `kind`.
|
||||||
*/
|
*/
|
||||||
predicate barrierGuardElement(
|
predicate barrierGuardElement(
|
||||||
Element n, string input, AcceptingValue acceptingvalue, string kind,
|
Element n, string input, AcceptingValue acceptingValue, string kind,
|
||||||
Provenance provenance, string model
|
Provenance provenance, string model
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -2371,11 +2371,11 @@ module Make<
|
|||||||
}
|
}
|
||||||
|
|
||||||
private predicate barrierGuardElementRef(
|
private predicate barrierGuardElementRef(
|
||||||
InterpretNode ref, SourceSinkAccessPath input, AcceptingValue acceptingvalue, string kind,
|
InterpretNode ref, SourceSinkAccessPath input, AcceptingValue acceptingValue, string kind,
|
||||||
string model
|
string model
|
||||||
) {
|
) {
|
||||||
exists(SourceOrSinkElement e |
|
exists(SourceOrSinkElement e |
|
||||||
barrierGuardElement(e, input, acceptingvalue, kind, _, model) and
|
barrierGuardElement(e, input, acceptingValue, kind, _, model) and
|
||||||
if inputNeedsReferenceExt(input.getToken(0))
|
if inputNeedsReferenceExt(input.getToken(0))
|
||||||
then e = ref.getCallTarget()
|
then e = ref.getCallTarget()
|
||||||
else e = ref.asElement()
|
else e = ref.asElement()
|
||||||
@@ -2518,10 +2518,10 @@ module Make<
|
|||||||
* given kind in a MaD flow model.
|
* given kind in a MaD flow model.
|
||||||
*/
|
*/
|
||||||
predicate isBarrierGuardNode(
|
predicate isBarrierGuardNode(
|
||||||
InterpretNode node, AcceptingValue acceptingvalue, string kind, string model
|
InterpretNode node, AcceptingValue acceptingValue, string kind, string model
|
||||||
) {
|
) {
|
||||||
exists(InterpretNode ref, SourceSinkAccessPath input |
|
exists(InterpretNode ref, SourceSinkAccessPath input |
|
||||||
barrierGuardElementRef(ref, input, acceptingvalue, kind, model) and
|
barrierGuardElementRef(ref, input, acceptingValue, kind, model) and
|
||||||
interpretInput(input, input.getNumToken(), ref, node)
|
interpretInput(input, input.getNumToken(), ref, node)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ signature module ExtensionsSig {
|
|||||||
*/
|
*/
|
||||||
predicate barrierGuardModel(
|
predicate barrierGuardModel(
|
||||||
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
||||||
string input, string acceptingvalue, string kind, string provenance,
|
string input, string acceptingValue, string kind, string provenance,
|
||||||
QlBuiltins::ExtensionId madId
|
QlBuiltins::ExtensionId madId
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -142,14 +142,14 @@ module ModelsAsData<ExtensionsSig Extensions, InputSig Input> {
|
|||||||
or
|
or
|
||||||
exists(
|
exists(
|
||||||
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
||||||
string input, string acceptingvalue, string kind, string provenance
|
string input, string acceptingValue, string kind, string provenance
|
||||||
|
|
|
|
||||||
Extensions::barrierGuardModel(namespace, type, subtypes, name, signature, ext, input,
|
Extensions::barrierGuardModel(namespace, type, subtypes, name, signature, ext, input,
|
||||||
acceptingvalue, kind, provenance, madId)
|
acceptingValue, kind, provenance, madId)
|
||||||
|
|
|
|
||||||
model =
|
model =
|
||||||
"Barrier Guard: " + namespace + "; " + type + "; " + subtypes + "; " + name + "; " +
|
"Barrier Guard: " + namespace + "; " + type + "; " + subtypes + "; " + name + "; " +
|
||||||
signature + "; " + ext + "; " + input + "; " + acceptingvalue + "; " + kind + "; " +
|
signature + "; " + ext + "; " + input + "; " + acceptingValue + "; " + kind + "; " +
|
||||||
provenance
|
provenance
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
@@ -241,12 +241,12 @@ module ModelsAsData<ExtensionsSig Extensions, InputSig Input> {
|
|||||||
/** Holds if a barrier guard model exists for the given parameters. */
|
/** Holds if a barrier guard model exists for the given parameters. */
|
||||||
predicate barrierGuardModel(
|
predicate barrierGuardModel(
|
||||||
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
string namespace, string type, boolean subtypes, string name, string signature, string ext,
|
||||||
string input, string acceptingvalue, string kind, string provenance, string model
|
string input, string acceptingValue, string kind, string provenance, string model
|
||||||
) {
|
) {
|
||||||
exists(string namespaceOrGroup, QlBuiltins::ExtensionId madId |
|
exists(string namespaceOrGroup, QlBuiltins::ExtensionId madId |
|
||||||
namespace = getNamespace(namespaceOrGroup) and
|
namespace = getNamespace(namespaceOrGroup) and
|
||||||
Extensions::barrierGuardModel(namespaceOrGroup, type, subtypes, name, signature, ext, input,
|
Extensions::barrierGuardModel(namespaceOrGroup, type, subtypes, name, signature, ext, input,
|
||||||
acceptingvalue, kind, provenance, madId) and
|
acceptingValue, kind, provenance, madId) and
|
||||||
model = "MaD:" + madId.toString()
|
model = "MaD:" + madId.toString()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ module SourceSinkInterpretationInput implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
predicate barrierGuardElement(
|
predicate barrierGuardElement(
|
||||||
Element n, string input, Public::AcceptingValue acceptingvalue, string kind,
|
Element n, string input, Public::AcceptingValue acceptingValue, string kind,
|
||||||
Public::Provenance provenance, string model
|
Public::Provenance provenance, string model
|
||||||
) {
|
) {
|
||||||
none()
|
none()
|
||||||
|
|||||||
Reference in New Issue
Block a user