mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
Use more flowTo.
This commit is contained in:
@@ -27,7 +27,7 @@ module AllocationSizeOverflow {
|
||||
private module FindLargeLensFlow = TaintTracking::Global<FindLargeLensConfig>;
|
||||
|
||||
private DataFlow::CallNode getALargeLenCall() {
|
||||
exists(DataFlow::Node lenArg | FindLargeLensFlow::flow(_, lenArg) |
|
||||
exists(DataFlow::Node lenArg | FindLargeLensFlow::flowTo(lenArg) |
|
||||
result.getArgument(0) = lenArg
|
||||
)
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ module UntrustedDataToUnknownExternalApiFlow =
|
||||
|
||||
/** A node representing untrusted data being passed to an external API. */
|
||||
class UntrustedExternalApiDataNode extends ExternalApiDataNode {
|
||||
UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::flow(_, this) }
|
||||
UntrustedExternalApiDataNode() { UntrustedDataToExternalApiFlow::flowTo(this) }
|
||||
|
||||
/** Gets a source of untrusted data which is passed to this external API data node. */
|
||||
DataFlow::Node getAnUntrustedSource() { UntrustedDataToExternalApiFlow::flow(result, this) }
|
||||
|
||||
@@ -21,6 +21,6 @@ where
|
||||
OpenUrlRedirect::Flow::flowPath(source, sink) and
|
||||
// this excludes flow from safe parts of request URLs, for example the full URL when the
|
||||
// doing a redirect from `http://<path>` to `https://<path>`
|
||||
not SafeUrlFlow::Flow::flow(_, sink.getNode())
|
||||
not SafeUrlFlow::Flow::flowTo(sink.getNode())
|
||||
select sink.getNode(), source, sink, "This path to an untrusted URL redirection depends on a $@.",
|
||||
source.getNode(), "user-provided value"
|
||||
|
||||
@@ -21,6 +21,6 @@ where
|
||||
RequestForgery::Flow::flowPath(source, sink) and
|
||||
request = sink.getNode().(RequestForgery::Sink).getARequest() and
|
||||
// this excludes flow from safe parts of request URLs, for example the full URL
|
||||
not SafeUrlFlow::Flow::flow(_, sink.getNode())
|
||||
not SafeUrlFlow::Flow::flowTo(sink.getNode())
|
||||
select request, source, sink, "The $@ of this request depends on a $@.", sink.getNode(),
|
||||
sink.getNode().(RequestForgery::Sink).getKind(), source, "user-provided value"
|
||||
|
||||
Reference in New Issue
Block a user