File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
cpp/ql/src/semmle/code/cpp/security Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -8,31 +8,25 @@ private predicate suspicious(string s) {
88 s .matches ( "%account%" ) or
99 s .matches ( "%accnt%" ) or
1010 s .matches ( "%trusted%" )
11- ) and not (
11+ ) and
12+ not (
1213 s .matches ( "%hashed%" ) or
1314 s .matches ( "%encrypted%" ) or
1415 s .matches ( "%crypt%" )
1516 )
1617}
1718
1819class SensitiveVariable extends Variable {
19- SensitiveVariable ( )
20- {
21- suspicious ( getName ( ) .toLowerCase ( ) )
22- }
20+ SensitiveVariable ( ) { suspicious ( getName ( ) .toLowerCase ( ) ) }
2321}
2422
2523class SensitiveFunction extends Function {
26- SensitiveFunction ( )
27- {
28- suspicious ( getName ( ) .toLowerCase ( ) )
29- }
24+ SensitiveFunction ( ) { suspicious ( getName ( ) .toLowerCase ( ) ) }
3025}
3126
3227class SensitiveExpr extends Expr {
33- SensitiveExpr ( )
34- {
35- this .( VariableAccess ) .getTarget ( ) instanceof SensitiveVariable or
36- this .( FunctionCall ) .getTarget ( ) instanceof SensitiveFunction
28+ SensitiveExpr ( ) {
29+ this .( VariableAccess ) .getTarget ( ) instanceof SensitiveVariable or
30+ this .( FunctionCall ) .getTarget ( ) instanceof SensitiveFunction
3731 }
3832}
You can’t perform that action at this time.
0 commit comments