What this change means
Regex changed. Changes keywords, regex patterns or pairing.
| Field | Before | After |
|---|---|---|
| Regex patterns | Before: (?:^|[^a-zA-Z0-9_-])([a-zA-Z0-9_-]{40,64})(?:[^a-zA-Z0-9_-]|$), \b[a-z0-9-]{1,40}\.okta(?:preview|-emea){0,1}\.com\b, \b00[a-zA-Z0-9_-]{40}\… show all(?:^|[^a-zA-Z0-9_-])([a-zA-Z0-9_-]{40,64})(?:[^a-zA-Z0-9_-]|$), \b[a-z0-9-]{1,40}\.okta(?:preview|-emea){0,1}\.com\b, \b00[a-zA-Z0-9_-]{40}\b, \b0oa[a-zA-Z0-9]{17}\b | After: (?:^|[^a-zA-Z0-9_-])([a-zA-Z0-9_-]{40,64})(?:[^a-zA-Z0-9_-]|$), \b00[a-zA-Z0-9_-]{40}\b, \b[a-z0-9-]{1,40}\.(?:okta(?:preview|-emea|-gov)?\.… show all(?:^|[^a-zA-Z0-9_-])([a-zA-Z0-9_-]{40,64})(?:[^a-zA-Z0-9_-]|$), \b00[a-zA-Z0-9_-]{40}\b, \b[a-z0-9-]{1,40}\.(?:okta(?:preview|-emea|-gov)?\.com|okta\.mil)\b, \b0oa[a-zA-Z0-9]{17}\b |
| @@ -24,9 +24,17 @@ var _ detectors.CustomResultsCleaner = (*Scanner)(nil) | ||
| 24 | 24 | |
| 25 | 25 | var ( |
| 26 | 26 | defaultClient = detectors.DetectorHttpClientWithNoLocalAddresses |
| 27 | removed: domainPat = regexp.MustCompile(`\b[a-z0-9-]{1,40}\.okta(?:preview|-emea){0,1}\.com\b`) | |
| 28 | 27 | tokenPat = regexp.MustCompile(`\b00[a-zA-Z0-9_-]{40}\b`) |
| 29 | 28 | |
| 29 | added: // Okta tenant domains: okta.com, oktapreview.com, okta-emea.com, okta-gov.com | |
| 30 | added: // (FedRAMP), and okta.mil (US Military). Every finding pairs with a matched | |
| 31 | added: // domain, so a suffix missing here means zero findings for that tenant. | |
| 32 | added: // Custom URL domains (e.g. login.example.com) are deliberately not matched: | |
| 33 | added: // they are indistinguishable from any other hostname, and guessing would send | |
| 34 | added: // credentials to unvetted hosts during verification. Such tenants are still | |
| 35 | added: // found when their original *.okta.com hostname appears in the chunk. | |
| 36 | added: domainPat = regexp.MustCompile(`\b[a-z0-9-]{1,40}\.(?:okta(?:preview|-emea|-gov)?\.com|okta\.mil)\b`) | |
| 37 | added: | |
| 30 | 38 | // Okta app/client IDs: "0oa" + 17 base62 characters. |
| 31 | 39 | oauthClientIDPat = regexp.MustCompile(`\b0oa[a-zA-Z0-9]{17}\b`) |
| 32 | 40 | // Delimiters consume a char instead of using \b, since \b breaks on secrets |