Skip to content

Commit 1420654

Browse files
author
Sakshis
committed
modification in system-setproperty-hardcoded-secret-kotlin
1 parent 144eb9b commit 1420654

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

rules/kotlin/security/system-setproperty-hardcoded-secret-kotlin.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ note: >-
1515
utils:
1616
match_string_literal:
1717
kind: string_literal
18+
not:
19+
regex: ^""$
1820
inside:
1921
stopBy: end
2022
kind: value_argument
@@ -30,20 +32,21 @@ utils:
3032
kind: call_expression
3133
all:
3234
- has:
33-
stopBy: end
34-
kind: navigation_expression
35-
all:
36-
- has:
37-
stopBy: end
38-
kind: simple_identifier
39-
regex: '^System$'
40-
- has:
41-
stopBy: end
42-
kind: navigation_suffix
43-
has:
44-
stopBy: end
45-
kind: simple_identifier
46-
regex: '^setProperty$'
35+
stopBy: end
36+
kind: navigation_expression
37+
all:
38+
- has:
39+
stopBy: end
40+
kind: simple_identifier
41+
regex: "^System$"
42+
- has:
43+
stopBy: end
44+
kind: navigation_suffix
45+
has:
46+
stopBy: end
47+
kind: simple_identifier
48+
regex: "^setProperty$"
49+
4750
rule:
4851
any:
4952
- matches: match_string_literal

0 commit comments

Comments
 (0)