| @@ -24,9 +24,17 @@ var _ detectors.CustomResultsCleaner = (*Scanner)(nil) |
| 24 | | 24 | |
| 25 | var ( | 25 | var ( |
| 26 | defaultClient = detectors.DetectorHttpClientWithNoLocalAddresses | 26 | defaultClient = detectors.DetectorHttpClientWithNoLocalAddresses |
| 27 | −removed: domainPat = regexp.MustCompile(`\b[a-z0-9-]{1,40}\.okta(?:preview|-emea){0,1}\.com\b`) | | |
| 28 | tokenPat = regexp.MustCompile(`\b00[a-zA-Z0-9_-]{40}\b`) | 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 | // Okta app/client IDs: "0oa" + 17 base62 characters. | 38 | // Okta app/client IDs: "0oa" + 17 base62 characters. |
| 31 | oauthClientIDPat = regexp.MustCompile(`\b0oa[a-zA-Z0-9]{17}\b`) | 39 | oauthClientIDPat = regexp.MustCompile(`\b0oa[a-zA-Z0-9]{17}\b`) |
| 32 | // Delimiters consume a char instead of using \b, since \b breaks on secrets | 40 | // Delimiters consume a char instead of using \b, since \b breaks on secrets |