File tree 2 files changed +53
-47
lines changed
rules/javascript/security
2 files changed +53
-47
lines changed Original file line number Diff line number Diff line change @@ -39,37 +39,59 @@ utils:
39
39
has :
40
40
stopBy : end
41
41
kind : string_fragment
42
- - any :
43
- - follows :
44
- stopBy : end
45
- kind : lexical_declaration
46
- has :
47
- stopBy : end
48
- kind : variable_declarator
49
- has :
50
- stopBy : end
51
- kind : identifier
52
- pattern : $E
53
- - follows :
54
- stopBy : end
55
- kind : import_statement
56
- has :
57
- stopBy : end
58
- kind : import_clause
59
- has :
60
- stopBy : end
61
- kind : identifier
62
- pattern : $E
63
- - follows :
42
+ - follows :
43
+ stopBy : end
44
+ any :
45
+ - pattern : const $E = require('sequelize')
46
+ - pattern : import $E from 'sequelize'
47
+ - pattern : import * as $E from 'sequelize'
48
+ - pattern : import {$E} from 'sequelize'
49
+ MATCH_BLANK_PASSWORD_with_instance :
50
+ kind : identifier
51
+ pattern : $W
52
+ inside :
53
+ stopBy : end
54
+ kind : lexical_declaration
55
+ all :
56
+ - has :
57
+ stopBy : end
58
+ kind : new_expression
59
+ all :
60
+ - has :
61
+ stopBy : end
62
+ kind : identifier
63
+ pattern : $E
64
+ - has :
65
+ stopBy : end
66
+ kind : arguments
67
+ nthChild : 2
68
+ has :
64
69
stopBy : end
65
- kind : import_statement
66
- has :
67
- stopBy : end
68
- kind : import_clause
69
- has :
70
- stopBy : end
71
- kind : identifier
72
- pattern : $E
70
+ kind : identifier
71
+ nthChild : 3
72
+ pattern : $W
73
+ - follows :
74
+ stopBy : end
75
+ any :
76
+ - pattern : const $E = require('sequelize')
77
+ - pattern : import $E from 'sequelize'
78
+ - pattern : import * as $E from 'sequelize'
79
+ - pattern : import {$E} from 'sequelize'
80
+ - follows :
81
+ stopBy : end
82
+ any :
83
+ - pattern : $W = $R
84
+ - pattern : let $W = $R
73
85
rule :
86
+ any :
87
+ - kind : string
88
+ matches : MATCH_BLANK_PASSWORD
89
+ - kind : identifier
90
+ matches : MATCH_BLANK_PASSWORD_with_instance
91
+ constraints :
92
+ R :
74
93
kind : string
75
- matches : MATCH_BLANK_PASSWORD
94
+ has :
95
+ stopBy : neighbor
96
+ kind : string_fragment
97
+
Original file line number Diff line number Diff line change @@ -42,14 +42,6 @@ snapshots:
42
42
style: secondary
43
43
start: 58
44
44
end: 165
45
- - source : Sequelize
46
- style : secondary
47
- start : 6
48
- end : 15
49
- - source : Sequelize = require('sequelize')
50
- style : secondary
51
- start : 6
52
- end : 38
53
45
- source : const Sequelize = require('sequelize');
54
46
style : secondary
55
47
start : 0
@@ -91,14 +83,6 @@ snapshots:
91
83
style : secondary
92
84
start : 59
93
85
end : 117
94
- - source : Sequelize
95
- style : secondary
96
- start : 6
97
- end : 15
98
- - source : Sequelize = require('sequelize')
99
- style : secondary
100
- start : 6
101
- end : 38
102
86
- source : const Sequelize = require('sequelize');
103
87
style : secondary
104
88
start : 0
You can’t perform that action at this time.
0 commit comments