Skip to content

Commit a4c3b8e

Browse files
authored
SONARTEXT-9 [S6338] Prevent raising on well-known authentication keys (#160)
1 parent a24f1a4 commit a4c3b8e

File tree

1 file changed

+6
-1
lines changed
  • sonar-text-plugin/src/main/resources/org/sonar/plugins/secrets/configuration

1 file changed

+6
-1
lines changed

sonar-text-plugin/src/main/resources/org/sonar/plugins/secrets/configuration/azure.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ provider:
2424
message: Make sure this Azure Storage Account Key gets revoked, changed, and removed from the code.
2525
detection:
2626
post:
27-
patternNot: "EXAMPLE"
27+
patternNot: "(EXAMPLE|Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==|C2y6yDjf5/R\\+ob0N8A7Cgv30VRDJIWEHLM\\+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==)"
2828

2929
rules:
3030
- rspecKey: S6338
@@ -74,6 +74,11 @@ provider:
7474
const connStr = "DefaultEndpointsProtocol=https;AccountName=testaccountname;AccountKey=4dVw+l0W8My+FwuZ08dWXn+gHxcmBtS7esLAQSrm6/Om3jeyUKKGMkfAh38kWZlItThQYsg31v23A0w/uVP4pg==;EndpointSuffix=core.windows.net";
7575
containsSecret: true
7676
match: 4dVw+l0W8My+FwuZ08dWXn+gHxcmBtS7esLAQSrm6/Om3jeyUKKGMkfAh38kWZlItThQYsg31v23A0w/uVP4pg==
77+
- text: |
78+
const connStr = "DefaultEndpointsProtocol=https;AccountName=testaccountname;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==";
79+
const connStr = "DefaultEndpointsProtocol=https;AccountName=testaccountname;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==";
80+
# These are well-known keys used in emulators only
81+
containsSecret: false
7782
detection:
7883
matching:
7984
pattern: "AccountKey=([a-zA-Z0-9/\\+]{86}==)"

0 commit comments

Comments
 (0)