Skip to content

Commit 391e111

Browse files
committed
Use attr instead of getAttribute.
1 parent f14f7b5 commit 391e111

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

python/ql/src/Security/CWE-377/InsecureTemporaryFile.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ FunctionObject temporary_name_function(string mod, string function) {
2323
function = "tempnam"
2424
)
2525
) and
26-
result = ModuleObject::named(mod).getAttribute(function)
26+
result = ModuleObject::named(mod).attr(function)
2727
}
2828

2929
from Call c, string mod, string function

python/ql/src/semmle/python/web/falcon/General.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import semmle.python.web.Http
44

55
/** The falcon API class */
66
ClassObject theFalconAPIClass() {
7-
result = ModuleObject::named("falcon").getAttribute("API")
7+
result = ModuleObject::named("falcon").attr("API")
88
}
99

1010

python/ql/src/semmle/python/web/turbogears/TurboGears.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import python
33
import semmle.python.security.TaintTracking
44

55
private ClassObject theTurboGearsControllerClass() {
6-
result = ModuleObject::named("tg").getAttribute("TGController")
6+
result = ModuleObject::named("tg").attr("TGController")
77
}
88

99

@@ -23,7 +23,7 @@ class TurboGearsControllerMethod extends Function {
2323
(
2424
decorator.(CallNode).getFunction().(NameNode).getId() = "expose"
2525
or
26-
decorator.refersTo(_, ModuleObject::named("tg").getAttribute("expose"), _)
26+
decorator.refersTo(_, ModuleObject::named("tg").attr("expose"), _)
2727
)
2828
}
2929

0 commit comments

Comments
 (0)