File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
sonar-text-plugin/src/main/resources/org/sonar/plugins/secrets/configuration Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
1
provider :
2
2
metadata :
3
- name : Firebase
3
+ name : Firebase Cloud Messaging
4
4
category : Messaging System
5
- message : Make sure this Firebase key gets revoked, changed, and removed from the code.
5
+ message : Make sure this FCM key gets revoked, changed, and removed from the code.
6
6
detection :
7
7
pre :
8
8
include :
@@ -16,11 +16,20 @@ provider:
16
16
- id : legacy-fcm-api-key
17
17
rspecKey : S6710
18
18
metadata :
19
- name : Legacy Firebase Cloud Messaging API Key
19
+ name : Legacy Firebase Cloud Messaging API Keys
20
20
detection :
21
21
matching :
22
- pattern : " (?i)\\ b([a-z0-9 \\ -_ ]{11}:apa91b[a-z0-9 \\ -_ +]{134})\\ b"
22
+ pattern : " (?i)\\ b([\\ w \\ - ]{11}:apa91b[\\ w \\ - +]{134})\\ b"
23
23
examples :
24
+ - text : |
25
+ # Noncompliant code example
26
+ props.set("fcm_key", "cfUDlZL9YBQ:APA91bJxU9oMf3RbiyqnmUO60KU_JLawjf2yrTfSs3_ZAp3dxZS0J88G5P5AoKWoviAdUK5i-2SB7iHcb4Wd38EMsZXBAAb6GZMaSOeKfaI0DuLxAFTOgGNKRSmj2R9gIQyzpjoThmqe")
27
+ containsSecret: true
28
+ match: "cfUDlZL9YBQ:APA91bJxU9oMf3RbiyqnmUO60KU_JLawjf2yrTfSs3_ZAp3dxZS0J88G5P5AoKWoviAdUK5i-2SB7iHcb4Wd38EMsZXBAAb6GZMaSOeKfaI0DuLxAFTOgGNKRSmj2R9gIQyzpjoThmqe"
29
+ - text : |
30
+ # Compliant solution
31
+ props.set("fcm_key", System.getenv("FCM_KEY"))
32
+ containsSecret: false
24
33
- text : |
25
34
self.current_datetime = strftime("%Y-%m-%d %H:%M:%S", gmtime())
26
35
self.firebase = "kCIN6c4oo49:APA91bJxU9oMf3RbiyqnmUO60KU_JLawjf2yrTfSs3_ZAp3dxZS0J88G5P5AoKWoviAdUK5i-2SB7iHcb4Wd38EMsZXBAAb6GZMaSOeKfaI0DuLxAFTOgGNKRSmj2R9gIQyzpjoThmqe"
You can’t perform that action at this time.
0 commit comments