LogSpecter – Schema-aware secret scanner for cloud logs LogSpecter, a schema-aware secret scanner for cloud logs, detects leaked API keys by combining regex, Shannon entropy, and JSON-structure analysis to identify the responsible identity, API call, and JSON path, achieving throughput of up to 55.0 MiB/s with a flat memory ceiling of about 43 MiB on 1 GiB files. The tool, benchmarked on 8 cores with CPython 3.13, supports AWS CloudTrail, GCP Cloud Logging, Kubernetes audit logs, Azure Activity Log, and Elastic Common Schema, and is designed to reduce false positives from long but low-diversity strings. Schema-aware secret scanner for cloud logs. Regex finds candidates; Shannon entropy and a heuristic layer decide whether they are real keys; a JSON-structure layer tells you who leaked what through which field . Streams tens of gigabytes with a flat memory ceiling. bash $ logspecter scan cloudtrail-2026-08-30.json.gz --stats CRITICAL openai-api-key AWS IAM User Alice → action: AssumeRole → requestParameters.headers.Authorization cloudtrail-2026-08-30.json.gz:81421 @byte 24118904 sk-p kAyS len=64 conf 1.00 / H 5.19 Not "a suspicious string on line 800". The actual identity, the actual API call, the actual JSON path. Most log scanners are a pile of regexes. That fails in production for three reasons, and LogSpecter attacks each one directly. A rule like "base64 string of 32+ chars" fires on every pagination cursor, every trace ID, every base64-encoded JSON blob in your logs. LogSpecter runs a second stage on every candidate: | Check | What it kills | |---|---| | Shannon entropy + charset-normalised entropy | low-diversity strings that merely look long | Charset coverage unique chars ÷ achievable unique chars | aaaa… , ababab… , and it does not penalise 64-char hex hashes | | Repeat / sequential runs | xxxxxxxx , abcdefgh , 987654321 | | Natural-language likeness bigram + vowel ratio | SpringBootApplicationConfigurationLoader | | Base64 decode-back | strings that decode to readable text or JSON — encoded data, not keys | | Placeholder & vendor-doc detection | AKIAIOSFODNN7EXAMPLE , changeme ,