File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
swift/ql/lib/codeql/swift/security Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ private string regexpProbablySafe() {
9191private class SensitiveVarDecl extends VarDecl {
9292 SensitiveDataType sensitiveType ;
9393
94+ cached
9495 SensitiveVarDecl ( ) { this .getName ( ) .regexpMatch ( sensitiveType .getRegexp ( ) ) }
9596
9697 predicate hasInfo ( string label , SensitiveDataType type ) {
@@ -106,6 +107,7 @@ private class SensitiveFunction extends Function {
106107 SensitiveDataType sensitiveType ;
107108 string name ; // name of the function, not including the argument list.
108109
110+ cached
109111 SensitiveFunction ( ) {
110112 name = this .getShortName ( ) and
111113 name .regexpMatch ( sensitiveType .getRegexp ( ) )
@@ -123,6 +125,7 @@ private class SensitiveFunction extends Function {
123125private class SensitiveArgument extends Argument {
124126 SensitiveDataType sensitiveType ;
125127
128+ cached
126129 SensitiveArgument ( ) { this .getLabel ( ) .regexpMatch ( sensitiveType .getRegexp ( ) ) }
127130
128131 predicate hasInfo ( string label , SensitiveDataType type ) {
@@ -174,6 +177,7 @@ class SensitiveExpr extends Expr {
174177 * A function that is likely used to encrypt or hash data.
175178 */
176179private class EncryptionFunction extends Function {
180+ cached
177181 EncryptionFunction ( ) { this .getName ( ) .regexpMatch ( "(?is).*(crypt|hash|encode|protect).*" ) }
178182}
179183
You can’t perform that action at this time.
0 commit comments