Skip to content

Commit b1679df

Browse files
tighten check against the "iv" argument only
1 parent b077fc5 commit b1679df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

swift/ql/src/queries/Security/CWE-1204/StaticInitializationVector.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class EncryptionInitializationSink extends Expr {
4141
], fName) and
4242
fName.matches("%init(%iv:%") and
4343
arg = [0, 1] and
44-
call.getArgument(arg).getExpr() = this
44+
call.getStaticTarget().(MethodDecl).getParam(pragma[only_bind_into](arg)).getName() = "iv" and
45+
call.getArgument(pragma[only_bind_into](arg)).getExpr() = this
4546
)
4647
}
4748
}

0 commit comments

Comments
 (0)