File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
sonar-text-plugin/src/main/resources/org/sonar/plugins/secrets/configuration Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,17 @@ provider:
19
19
name : Planetscale database passwords should not be disclosed
20
20
detection :
21
21
matching :
22
- pattern : " (\\ bpscale_pw_[a-zA-Z0-9 \\ -_ \\ .]{43})"
22
+ pattern : " (?i) \\ b(pscale_pw_[ \\ w \\ - \\ .]{43})"
23
23
examples :
24
+ - text : |
25
+ # Noncompliant code example
26
+ props.set("planetscale_password", "pscale_pw_hatgoG_EprhgnblWotaJGbeOeFE7q9BwW0_g5ML486D")
27
+ containsSecret: true
28
+ match: pscale_pw_hatgoG_EprhgnblWotaJGbeOeFE7q9BwW0_g5ML486D
29
+ - text : |
30
+ # Compliant solution
31
+ props.set("planetscale_password", System.getenv("PLANETSCALE_PASSWORD"))
32
+ containsSecret: false
24
33
- text : |
25
34
spring.datasource.username=user
26
35
spring.datasource.password=pscale_pw_CoNLTwSMJwvKspy89_2JdSoxmGWaElypgmlzel5KolA
You can’t perform that action at this time.
0 commit comments