I built Sentinel: A blazing fast, regex-free secret scanner in Go ๐Ÿ›ก๏ธ

์ž‘์„ฑ์ž

์นดํ…Œ๊ณ ๋ฆฌ:

โ† ํ”ผ๋“œ๋กœ
DEV Community ยท Khaled Hani ยท 2026-06-28 ๊ฐœ๋ฐœ(SW)

Khaled Hani

If youโ€™ve ever used standard secret scanners (like Gitleaks or TruffleHog) in a heavy CI/CD pipeline, youโ€™ve probably hit the “Catastrophic Backtracking” wall. A massive minified JS file slips in, the regex engine chokes, and your pipeline freezes.

I got extremely frustrated with the performance bottlenecks and false positives, so I decided to rewrite the architecture from scratch.

Meet Sentinel, an enterprise-grade, ultra-fast pre-commit scanner written in Go.

๐Ÿ”ฅ How itโ€™s different:

  1. Aho-Corasick Engine: Instead of relying purely on Regex, the core engine uses an Aho-Corasick automaton. It scans massive payloads in strict O(n) linear time.
  2. Pre-Decoding Layer: It detects Base64 strings in-memory, decodes them dynamically, and feeds them back into the entropy pipeline to catch nested K8s/GCP keys.
  3. Blob Aggregation: Multi-line certs (like JKS or PEM) are aggregated into a single CRITICAL alert instead of blasting you with 50 lines of fragmented noise.
  4. 100% Silent: Zero “skipping binary file” logs. It acts as a true silent guardianโ€”natively using git ls-files for traversal.

๐Ÿ“Š The Doomsday Benchmark

I built a “Doomsday Payload” (15MB of compressed minified strings mixed with 100+ structural baits like UPPER_SNAKE_CASE constants).
Result: Sentinel ripped through it in ~1.5s with a flawless 100% signal-to-noise ratio.

It is fully open-source under the AGPL-3.0 license. I’d love for the community to try it out, read the code, and give me some harsh feedback!

GitHub Repo: https://github.com/sentinel-cli/sentinel

์›๋ฌธ์—์„œ ๊ณ„์† โ†—

์ถ”์ถœ ๋ณธ๋ฌธ ยท ์ถœ์ฒ˜: dev.to ยท https://dev.to/muslimkh09/i-built-sentinel-a-blazing-fast-regex-free-secret-scanner-in-go-3amm

์ฝ”๋ฉ˜ํŠธ

๋‹ต๊ธ€ ๋‚จ๊ธฐ๊ธฐ

์ด๋ฉ”์ผ ์ฃผ์†Œ๋Š” ๊ณต๊ฐœ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•„์ˆ˜ ํ•„๋“œ๋Š” *๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค