File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
javascript/ql/src/experimental/Security/CWE-340
python/ql/src/experimental/Security/CWE-340 Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ class TokenAssignmentValueSink extends DataFlow::Node {
30
30
TokenAssignmentValueSink ( ) {
31
31
exists ( string name | name .toLowerCase ( ) .matches ( [ "%token" , "%code" ] ) |
32
32
exists ( PropWrite pw | this = pw .getRhs ( ) | pw .getPropertyName ( ) .toLowerCase ( ) = name )
33
- or
34
- exists ( AssignExpr ae | this = ae .getRhs ( ) .flow ( ) |
33
+ or
34
+ exists ( AssignExpr ae | this = ae .getRhs ( ) .flow ( ) |
35
35
ae .getLhs ( ) .( VariableAccess ) .getVariable ( ) .getName ( ) .toLowerCase ( ) = name
36
36
)
37
37
)
Original file line number Diff line number Diff line change @@ -20,10 +20,7 @@ import DataFlow::PathGraph
20
20
class PredictableResultSource extends DataFlow:: Node {
21
21
PredictableResultSource ( ) {
22
22
exists ( API:: Node uuidCallRet |
23
- uuidCallRet =
24
- API:: moduleImport ( "uuid" )
25
- .getMember ( [ "uuid1" , "uuid3" , "uuid5" ] )
26
- .getReturn ( )
23
+ uuidCallRet = API:: moduleImport ( "uuid" ) .getMember ( [ "uuid1" , "uuid3" , "uuid5" ] ) .getReturn ( )
27
24
|
28
25
this = uuidCallRet .asSource ( )
29
26
or
@@ -36,7 +33,7 @@ class TokenAssignmentValueSink extends DataFlow::Node {
36
33
TokenAssignmentValueSink ( ) {
37
34
exists ( string name | name .toLowerCase ( ) .matches ( [ "%token" , "%code" ] ) |
38
35
exists ( DefinitionNode n | n .getValue ( ) = this .asCfgNode ( ) | name = n .( NameNode ) .getId ( ) )
39
- or
36
+ or
40
37
exists ( DataFlow:: AttrWrite aw | aw .getValue ( ) = this | name = aw .getAttributeName ( ) )
41
38
)
42
39
}
You can’t perform that action at this time.
0 commit comments