mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
PY: fix all ql/no-upper-case-variables
This commit is contained in:
@@ -20,14 +20,14 @@ private module Invoke {
|
||||
API::Node invoke() { result = API::moduleImport("invoke") }
|
||||
|
||||
/** Provides models for the `invoke` module. */
|
||||
module invoke {
|
||||
module InvokeModule {
|
||||
/** Gets a reference to the `invoke.context` module. */
|
||||
API::Node context() { result = invoke().getMember("context") }
|
||||
|
||||
/** Provides models for the `invoke.context` module */
|
||||
module context {
|
||||
module Context {
|
||||
/** Provides models for the `invoke.context.Context` class */
|
||||
module Context {
|
||||
module ContextClass {
|
||||
/** Gets a reference to the `invoke.context.Context` class. */
|
||||
API::Node classRef() {
|
||||
result = API::moduleImport("invoke").getMember("context").getMember("Context")
|
||||
@@ -39,7 +39,7 @@ private module Invoke {
|
||||
private DataFlow::TypeTrackingNode instance(DataFlow::TypeTracker t) {
|
||||
t.start() and
|
||||
(
|
||||
result = invoke::context::Context::classRef().getACall()
|
||||
result = InvokeModule::Context::ContextClass::classRef().getACall()
|
||||
or
|
||||
exists(Function func |
|
||||
func.getADecorator() = invoke().getMember("task").getAUse().asExpr() and
|
||||
@@ -56,7 +56,7 @@ private module Invoke {
|
||||
/** Gets a reference to the `run` or `sudo` methods on a `invoke.context.Context` instance. */
|
||||
private DataFlow::TypeTrackingNode instanceRunMethods(DataFlow::TypeTracker t) {
|
||||
t.startInAttr(["run", "sudo"]) and
|
||||
result = invoke::context::Context::instance()
|
||||
result = InvokeModule::Context::ContextClass::instance()
|
||||
or
|
||||
exists(DataFlow::TypeTracker t2 | result = instanceRunMethods(t2).track(t2, t))
|
||||
}
|
||||
@@ -77,7 +77,7 @@ private module Invoke {
|
||||
private class InvokeRunCommandCall extends SystemCommandExecution::Range, DataFlow::CallCfgNode {
|
||||
InvokeRunCommandCall() {
|
||||
this = invoke().getMember(["run", "sudo"]).getACall() or
|
||||
this.getFunction() = invoke::context::Context::instanceRunMethods()
|
||||
this.getFunction() = InvokeModule::Context::ContextClass::instanceRunMethods()
|
||||
}
|
||||
|
||||
override DataFlow::Node getCommand() {
|
||||
|
||||
Reference in New Issue
Block a user