mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
Merge branch 'main' of https://github.com/github/codeql into oscarsj/merge-back-rc-3.20
This commit is contained in:
@@ -97,7 +97,7 @@ class ExternalApiDataNode extends DataFlow::Node instanceof Sink { }
|
||||
|
||||
/** A node representing untrusted data being passed to an external API. */
|
||||
class UntrustedExternalApiDataNode extends ExternalApiDataNode {
|
||||
UntrustedExternalApiDataNode() { ExternalAPIUsedWithUntrustedDataFlow::flow(_, this) }
|
||||
UntrustedExternalApiDataNode() { ExternalAPIUsedWithUntrustedDataFlow::flowTo(this) }
|
||||
|
||||
/** Gets a source of untrusted data which is passed to this external API data node. */
|
||||
DataFlow::Node getAnUntrustedSource() { ExternalAPIUsedWithUntrustedDataFlow::flow(result, this) }
|
||||
@@ -110,7 +110,7 @@ private newtype TExternalApi =
|
||||
/** An external API sink with `name`. */
|
||||
MkExternalApiNode(string name) {
|
||||
exists(Sink sink |
|
||||
ExternalAPIUsedWithUntrustedDataFlow::flow(_, sink) and
|
||||
ExternalAPIUsedWithUntrustedDataFlow::flowTo(sink) and
|
||||
name = sink.getApiName()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -36,6 +36,6 @@ import UnverifiedDecodeFlow::PathGraph
|
||||
from UnverifiedDecodeFlow::PathNode source, UnverifiedDecodeFlow::PathNode sink
|
||||
where
|
||||
UnverifiedDecodeFlow::flowPath(source, sink) and
|
||||
not VerifiedDecodeFlow::flow(source.getNode(), _)
|
||||
not VerifiedDecodeFlow::flowFrom(source.getNode())
|
||||
select source.getNode(), source, sink, "Decoding JWT $@.", sink.getNode(),
|
||||
"without signature verification"
|
||||
|
||||
@@ -32,5 +32,5 @@ class BasicBarrierGuard extends DataFlow::CallNode {
|
||||
deprecated class ConsistencyConfig extends ConsistencyConfiguration {
|
||||
ConsistencyConfig() { this = "ConsistencyConfig" }
|
||||
|
||||
override DataFlow::Node getAnAlert() { Flow::flow(_, result) }
|
||||
override DataFlow::Node getAnAlert() { Flow::flowTo(result) }
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ predicate passwordVarAssign(Variable v, DataFlow::Node nd) {
|
||||
module PasswordFlow = DataFlow::Global<PasswordConfig>;
|
||||
|
||||
query predicate test_query17(DataFlow::Node sink, string res) {
|
||||
exists(Variable v | PasswordFlow::flow(_, sink) and passwordVarAssign(v, sink) |
|
||||
exists(Variable v | PasswordFlow::flowTo(sink) and passwordVarAssign(v, sink) |
|
||||
res = "Password variable " + v.toString() + " is assigned a constant string."
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user