Skip to content

Commit f7f9fb8

Browse files
committed
Updated takesConfigurationObject with API graphs
1 parent 42d5b80 commit f7f9fb8

File tree

1 file changed

+5
-3
lines changed
  • javascript/ql/lib/semmle/javascript/frameworks

1 file changed

+5
-3
lines changed

javascript/ql/lib/semmle/javascript/frameworks/AWS.qll

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ module AWS {
6565
* Holds if the `i`th argument of `invk` is an object hash for `AWS.Config`.
6666
*/
6767
private predicate takesConfigurationObject(DataFlow::InvokeNode invk, int i) {
68-
exists(DataFlow::ModuleImportNode mod | mod.getPath() = "aws-sdk" |
68+
exists(API::Node mod | mod = getAWSImport() |
6969
// `AWS.config.update(nd)`
70-
invk = mod.getAPropertyRead("config").getAMemberCall("update") and
70+
invk = mod.getMember("config").getMember("update").getACall() and
7171
i = 0
7272
or
73-
exists(DataFlow::SourceNode cfg | cfg = mod.getAConstructorInvocation("Config") |
73+
exists(DataFlow::SourceNode cfg |
74+
cfg = mod.getMember("Config").getAnInstantiation().getReturn().asSource()
75+
|
7476
// `new AWS.Config(nd)`
7577
invk = cfg and
7678
i = 0

0 commit comments

Comments
 (0)