LS-DB-018: Elastic Cloud API Key¶
| Severity | HIGH |
| Blast radius | Search/log cluster data compromise |
| Rotate at | https://www.elastic.co/guide/en/cloud/current/ec-api-keys.html |
If this leaks¶
Grants access to the Elasticsearch cluster per the key's privileges, potentially including reading or deleting indices containing logs and application data.
What to do¶
- Rotate or revoke the credential at https://www.elastic.co/guide/en/cloud/current/ec-api-keys.html.
- Check the provider's audit logs for use you don't recognise.
- Remove it from git history (
leakscan purge --help) and load it from an environment variable or secret manager instead.
Pattern¶
(?i)(?:elastic|es)[_-]?(?:cloud[_-]?)?api[_-]?key\s*[=:]\s*['\"]?([A-Za-z0-9+/]{20,}={0,2})['\"]?
Suppress¶
On one line: # leakscan:ignore LS-DB-018. For the whole project:
disable_rules: [LS-DB-018]