File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
test/query-tests/Security/CWE/CWE-311/semmle/tests Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ class FromSensitiveConfiguration extends TaintTracking::Configuration {
2929 override predicate isSource ( DataFlow:: Node source ) { source .asExpr ( ) instanceof SensitiveExpr }
3030
3131 override predicate isSink ( DataFlow:: Node sink ) { any ( FileWrite w ) .getASource ( ) = sink .asExpr ( ) }
32+
33+ override predicate isSanitizer ( DataFlow:: Node node ) {
34+ node .asExpr ( ) .getUnspecifiedType ( ) instanceof IntegralType
35+ }
3236}
3337
3438/**
Original file line number Diff line number Diff line change @@ -234,6 +234,10 @@ class FromSensitiveConfiguration extends TaintTracking::Configuration {
234234 // flow through encryption functions to the return value (in case we can reach other sinks)
235235 node2 .asExpr ( ) .( Encrypted ) .( FunctionCall ) .getAnArgument ( ) = node1 .asExpr ( )
236236 }
237+
238+ override predicate isSanitizer ( DataFlow:: Node node ) {
239+ node .asExpr ( ) .getUnspecifiedType ( ) instanceof IntegralType
240+ }
237241}
238242
239243from
Original file line number Diff line number Diff line change 11edges
2- | test2.cpp:52:44:52:57 | password_tries | test2.cpp:52:40:52:58 | * ... |
32| test2.cpp:62:18:62:25 | password | test2.cpp:65:31:65:34 | cpy1 |
43| test2.cpp:72:17:72:24 | password | test2.cpp:73:30:73:32 | buf |
54| test2.cpp:72:17:72:24 | password | test2.cpp:76:30:76:32 | buf |
98| test2.cpp:44:37:44:45 | thepasswd | semmle.label | thepasswd |
109| test2.cpp:45:38:45:47 | accountkey | semmle.label | accountkey |
1110| test2.cpp:50:41:50:53 | passwd_config | semmle.label | passwd_config |
12- | test2.cpp:52:40:52:58 | * ... | semmle.label | * ... |
13- | test2.cpp:52:44:52:57 | password_tries | semmle.label | password_tries |
1411| test2.cpp:54:41:54:52 | widepassword | semmle.label | widepassword |
1512| test2.cpp:55:40:55:51 | widepassword | semmle.label | widepassword |
1613| test2.cpp:57:39:57:49 | call to getPassword | semmle.label | call to getPassword |
You can’t perform that action at this time.
0 commit comments