mirror of
https://github.com/github/codeql.git
synced 2025-12-19 02:13:17 +01:00
Python: Fix ql4ql alerts
The rest will be ignored.
This commit is contained in:
@@ -157,11 +157,10 @@ class UnresolvedCall extends InterestingExternalApiCall, TUnresolvedCall {
|
||||
|
||||
/** A node representing data being passed to an external API through a call. */
|
||||
class ExternalApiDataNode extends DataFlow::Node {
|
||||
InterestingExternalApiCall call;
|
||||
DataFlowPrivate::ArgumentPosition apos;
|
||||
|
||||
ExternalApiDataNode() {
|
||||
this = call.getArgument(apos) and
|
||||
exists(InterestingExternalApiCall call, DataFlowPrivate::ArgumentPosition apos |
|
||||
this = call.getArgument(apos)
|
||||
) and
|
||||
// Not already modeled as a taint step
|
||||
not exists(DataFlow::Node next | TaintTrackingPrivate::defaultAdditionalTaintStep(this, next)) and
|
||||
// for `list.append(x)`, we have a additional taint step from x -> [post] list.
|
||||
|
||||
@@ -81,7 +81,7 @@ module PointsToBasedCallGraph {
|
||||
*/
|
||||
class ResolvableCallRelevantTarget extends ResolvableCall {
|
||||
ResolvableCallRelevantTarget() {
|
||||
exists(Target target | target = getTarget() |
|
||||
exists(Target target | target = this.getTarget() |
|
||||
exists(target.getLocation().getFile().getRelativePath())
|
||||
)
|
||||
}
|
||||
@@ -137,7 +137,7 @@ module TypeTrackingBasedCallGraph {
|
||||
*/
|
||||
class ResolvableCallRelevantTarget extends ResolvableCall {
|
||||
ResolvableCallRelevantTarget() {
|
||||
exists(Target target | target = getTarget() |
|
||||
exists(Target target | target = this.getTarget() |
|
||||
exists(target.getLocation().getFile().getRelativePath())
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user