Use attr instead of getAttribute.

This commit is contained in:
Taus Brock-Nannestad
2019-03-20 17:31:49 +01:00
parent f14f7b50ed
commit 391e111189
3 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ FunctionObject temporary_name_function(string mod, string function) {
function = "tempnam"
)
) and
result = ModuleObject::named(mod).getAttribute(function)
result = ModuleObject::named(mod).attr(function)
}
from Call c, string mod, string function

View File

@@ -4,7 +4,7 @@ import semmle.python.web.Http
/** The falcon API class */
ClassObject theFalconAPIClass() {
result = ModuleObject::named("falcon").getAttribute("API")
result = ModuleObject::named("falcon").attr("API")
}

View File

@@ -3,7 +3,7 @@ import python
import semmle.python.security.TaintTracking
private ClassObject theTurboGearsControllerClass() {
result = ModuleObject::named("tg").getAttribute("TGController")
result = ModuleObject::named("tg").attr("TGController")
}
@@ -23,7 +23,7 @@ class TurboGearsControllerMethod extends Function {
(
decorator.(CallNode).getFunction().(NameNode).getId() = "expose"
or
decorator.refersTo(_, ModuleObject::named("tg").getAttribute("expose"), _)
decorator.refersTo(_, ModuleObject::named("tg").attr("expose"), _)
)
}