You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add these additional matches to the [Secret Scanning Custom Pattern](https://docs.github.com/en/enterprise-cloud@latest/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#example-of-a-custom-pattern-specified-using-additional-requirements).
689
+
690
+
691
+
692
+
- Match:
693
+
694
+
```regex
695
+
[0-9]
696
+
```
697
+
698
+
- Match:
699
+
700
+
```regex
701
+
[A-Z]
702
+
```
703
+
704
+
- Match:
705
+
706
+
```regex
707
+
[a-z]
708
+
```
709
+
710
+
- Match:
711
+
712
+
```regex
713
+
^.{12,}$
714
+
```
715
+
716
+
</details>
717
+
718
+
## YAML with URI-safe Base64 encoded secrets
719
+
720
+
**⚠️ WARNING: THIS RULE IS EXPERIMENTAL AND MIGHT CAUSE A HIGH FALSE POSITIVE RATE (test before commiting to org level) ⚠️**
721
+
Hardcoded URI-safe Base64-encoded passwords in YAML configuration files
722
+
723
+
_version: v0.1_
724
+
725
+
**Comments / Notes:**
726
+
727
+
728
+
- The Base64 must contain numbers, upper case and lower case and be at least 12 characters long
729
+
730
+
- Some false positives in code might appear
731
+
732
+
- This matches _- instead of +/, for URI-safe Base64
Add these additional matches to the [Secret Scanning Custom Pattern](https://docs.github.com/en/enterprise-cloud@latest/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#example-of-a-custom-pattern-specified-using-additional-requirements).
900
+
901
+
902
+
903
+
- Match:
904
+
905
+
```regex
906
+
[0-9]
907
+
```
908
+
909
+
- Match:
910
+
911
+
```regex
912
+
[A-Z]
913
+
```
914
+
915
+
- Match:
916
+
917
+
```regex
918
+
[a-z]
919
+
```
920
+
921
+
- Match:
922
+
923
+
```regex
924
+
^.{12,}$
925
+
```
926
+
927
+
</details>
928
+
929
+
## JSON with URI-safe Base64 encoded secrets
930
+
931
+
**⚠️ WARNING: THIS RULE IS EXPERIMENTAL AND MIGHT CAUSE A HIGH FALSE POSITIVE RATE (test before commiting to org level) ⚠️**
932
+
Hardcoded URI-safe Base64-encoded passwords in JSON configuration files
933
+
934
+
_version: v0.1_
935
+
936
+
**Comments / Notes:**
937
+
938
+
939
+
- The Base64 must contain numbers, upper case and lower case and be at least 12 characters long
940
+
941
+
- This may match in code, such as Python, that resembles JSON
942
+
943
+
- This will not match some isolated fragments of JSON, so be aware of that when testing it
944
+
945
+
- This matches _- instead of +/, for URI-safe Base64
Add these additional matches to the [Secret Scanning Custom Pattern](https://docs.github.com/en/enterprise-cloud@latest/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning#example-of-a-custom-pattern-specified-using-additional-requirements).
247
+
248
+
249
+
250
+
- Match:
251
+
252
+
```regex
253
+
[0-9]
254
+
```
255
+
256
+
- Match:
257
+
258
+
```regex
259
+
[A-Z]
260
+
```
261
+
262
+
- Match:
263
+
264
+
```regex
265
+
[a-z]
266
+
```
267
+
268
+
- Match:
269
+
270
+
```regex
271
+
^.{12,}$
272
+
```
273
+
274
+
</details>
275
+
276
+
## Generic Password with URI-safe Base64 encoded secrets
277
+
278
+
279
+
280
+
_version: v0.1_
281
+
282
+
**Comments / Notes:**
283
+
284
+
285
+
- The Base64 must contain numbers, upper case and lower case and be at least 12 characters long
286
+
287
+
-`password`, `secret`, `key`, or password like prefix (fuzzy)
288
+
289
+
- Delimiters like `=` or `:` (with padding)
290
+
291
+
- This matches _- instead of +/, for URI-safe Base64
0 commit comments