version: v0.1
Comments / Notes:
- Only supports Visa, MasterCard, and American Express
Pattern Format
(4[0-9]{12}(?:[0-9]{3})?|(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|(34|37)[0-9]{13})
# 4[0-9]{12}(?:[0-9]{3})?|[25][1-7][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}
version: v0.1
Pattern Format
4[0-9]{12}(?:[0-9]{3})?
version: v0.1
Pattern Format
(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}
version: v0.1
Pattern Format
(34|37)[0-9]{13}
version: v0.1
Pattern Format
6(?:011|5[0-9]{2})[0-9]{12}
version: v0.1
Comments / Notes:
-
This can produce false positives, since it doesn't check the checksum pair after the Country Code
-
Examples include YouTube playlist IDs and Italian tax codes
-
If this is a problem, try the individual country IBAN patterns, based on the published IBAN structures on https://iban.com/structure
Pattern Format
[A-Z]{2}[0-9]{2}(?:[ -]?[A-Z0-9]{4}|(?:[ -]?[0-9]){4})?(?:[ -]?[0-9]){9,25}(?:[ -]?[A-Z0-9]){0,3}
Start Pattern
\A|[^A-Za-z0-9-]
End Pattern
\z|[^A-Za-z0-9 -]|[ ][^0-9A-Z]|[ ]?\z
Additional Matches
Add these additional matches to the Secret Scanning Custom Pattern.
-
Not Match:
^(?:(?:A[ABC]|BC|C[BE]|D[A-DF]|E[ABDF]|F[A-F]).*|[A-Z]{2}(?:0[ -]?)+)$
-
Not Match:
^(?:AL35202111090000000001234567|AD1400080001001234567890|AT483200000012345864|AZ77VTBA00000000001234567890|BH02CITI00001077181611|BE71096123456769|BA393385804800211234|BR1500000000000010932840814P2|BG18RZBB91550123456789|CR23015108410026012345|HR1723600001101234565|CY21002001950000357001234567|CZ5508000000001234567899|FO9264600123456789|GL8964710123456789|DK9520000123456789|DO22ACAU00000000000123456789|EE471000001020145685|EG800002000156789012345180002|FI1410093000123458|FR7630006000011234567890189|GE60NB0000000123456789|DE75512108001245126199|GI56XAPO000001234567890|GR9608100010000001234567890|GT20AGRO00000000001234567890|HU93116000060000000012345676|IS750001121234563108962099|IE64IRCE92050112345678|IL170108000000012612345|IT60X0542811101000000123456|JO71CBJO0000000000001234567890|KZ244350000012344567|XK051212012345678906|KW81CBKU0000000000001234560101|LV97HABA0012345678910|LB92000700000000123123456123|LI7408806123456789012|LT601010012345678901|LU120010001234567891)$
-
Not Match:
^(?:MK07200002785123453|MT31MALT01100000000000000000123|MR1300020001010000123456753|MU43BOMM0101123456789101000MUR|MD21EX000000000001234567|MC5810096180790123456789085|ME25505000012345678951|NL02ABNA0123456789|NO8330001234567|PK36SCBL0000001123456702|PS92PALS000000000400123456702|PL10105000997603123456789123|PT50002700000001234567833|QA54QNBA000000000000693123456|RO66BACX0000001234567890|SM76P0854009812123456789123|LC14BOSL123456789012345678901234|ST23000200000289355710148|SA4420000001234567891234|RS35105008123123123173|SK8975000000000012345671|SI56192001234567892|ES7921000813610123456789|SE7280000810340009783242|CH5604835012345678009|TL380010012345678910106|TN5904018104004942712345|TR320010009999901234567890|AE460090000000123456789|GB33BUKB20201555555555|VA59001123000012345678|VG07ABVI0000000123456789|UA903052992990004149123456789|SC74MCBL01031234567890123456USD|IQ20CBIQ861800101010500|BY86AKBB10100000002966000000|SV43ACAT00000000000000123123|LY38021001000000123456789)$
-
Not Match:
^(?:SD8811123456789012|BI43220001131012345678912345|DJ2110002010010409943020008|RU0204452560040702810412345678901|SO061000001123123456789|GB82[ -]?[TW]EST[ -]?1234[ -]?5698[ -]?7654[ -]?325?|SA03[ -]?8000[ -]?0000[ -]?6080[ -]?1016[ -]?7519|DE89[ -]?3704[ -]?0044[ -]?0532[ -]?0130[ -]?00|AT61[ -]?1904[ -]?3002[ -]?3457[ -]?3201|NL20INGB0001234567|AZ96AZEJ00000000001234567890|GI04BARC000001234567890|VA22VA59001123000012345678|KZ563190000012344567|RO09BCYP0000001234567890|SC52BAHL01031234567890123456USD|VG21PACG0000000123456789|FR14[ -]?2004[ -]?1010[ -]?0505[ -]?0001[ -]?3|AO06004400006729503010102|BF42BF0840101300463574000390|BJ66BJ0610100100144390000769|CF4220001000010120069700160|CG3930011000101013451300019|CI93CI0080111301134291200589|CM2110002000300277976315008|CV64000500000020108215144|DZ580002100001113000000570|GA2140021010032001890020126|GQ7050002001003715228190196|GW04GW1430010181800637601|IR710570029971601460641001|MA64011519000001205000534921)
-
Not Match:
^(?:MG4600005030071289421016045|ML13ML0160120102600100668497|MZ59000301080016367102371|NE58NE0380100100130305000268|SN08SN0100152000048500003035|TD8960002000010271091600153|TG53TG0090604310346500400070|KM4600005000010010904400137|HN54PISA00000000000000123124|NI92BAMC000000000000000003123123|MN580050099123456789)$
version: v0.1
Comments / Notes:
-
With no validation of the checksum this can cause a lot of false positives
-
The example test data does not have a valid checksum - it is one of the examples used with one digit in the checksum changed
-
You can test using the correct checksum, but it is used as a NOT match here to prevent false positives on other test data
Pattern Format
(([04][1-9]|[15][0-9]|[26][0-9])(0[1-9]|1[0-2])|[37]0(0[469]|11)|[37][01](0[13578]|1[02]))[0-9]{2} ?[0-9]{3} ?[0-9]{2}
Start Pattern
\A|[^0-9A-Za-z_.+/\\-]
End Pattern
\z|[^0-9A-Za-z_.+/\\=-]
Additional Matches
Add these additional matches to the Secret Scanning Custom Pattern.
-
Not Match:
1111111111[123]|11112222333|01123456978|410185 ?123 ?45|220676 ?123 ?45|01010202010|01010101023