Engineered in Go • Zero External Dependencies • Sub-20ms
Prevent credential leaks before they escape.
Statically compiled in Go with zero external runtime dependencies, Crenox inspects staged Git buffers in workstation memory to stop secret leaks before commit finalization.
Lightweight Git pre-commit scanner for individual developers. Intercepts secrets locally in workstation memory before they leave your machine. Fast, private, and free forever.
In modern DevSecOps, secret scanning is often offloaded to continuous integration (CI) platforms or post-push webhooks. While valuable, these remote validations operate after the secret has already reached the remote hosting repository. Once a credential resides in the git database, it must be considered compromised—triggering costly key rotation, access log audits, and multi-team incident responses.
"Once a private credential escapes the local workstation, security changes from prevention to remediation."
Crenox blocks leaks at the edge. By installing as a native git pre-commit hook directly in your local environment, it evaluates staged deltas and aborts the commit if an active credential, private key, or password configuration is matched. Because it operates locally, it requires no internet connection and does not log data to external analytics collectors.
02 / Technical Architecture
Verifying credentials in under 20 milliseconds
Developer velocity is a major constraint for pre-commit verification. Hooks that introduce noticeable latency encourage developers to bypass the validation workflow entirely. To meet this constraint, Crenox implements a three-tier pipeline that processes staging areas in milliseconds while maintaining high recall accuracy.
Tier 1: Prefix Automaton
Every file is parsed through an O(N) Aho-Corasick multi-pattern search trie. Custom user signatures and known credential templates are compiled directly into the state machine, allowing the engine to discover candidates in a single linear character pass.
Tier 2: Shannon Entropy Filtering
Candidate tokens matched in the first pass are evaluated for character randomness. Crenox calculates the exact entropy of the string to differentiate actual randomized access tokens from standard code templates or placeholder variables.
Tier 3: Context Analysis
Finally, the parser audits surrounding lines, variable assignments, and comments. This layer suppresses findings located in test assertions, mock environments, or lines specifically appended with a // crenox:ignore directive.
Output Demonstration
When Crenox identifies a leak, it aborts the commit process and renders a detailed breakdown of the findings in the console:
03 / Performance
Crenox vs Gitleaks vs Betterleaks: Cloud Runner Comparison
Performance is measured on real-world public repositories against the most popular alternatives, running on a standard GitHub Actions Ubuntu cloud runner — the same infrastructure used in real-world CI/CD pipelines.
Crenox is statically compiled to run natively across Linux, macOS, and Android/Termux. It does not require Go, Python, or additional runtime setups on the workstation.
Download pre-built binaries directly without dependencies. Example for Linux AMD64:
# 1. Download the target binary (example for Linux AMD64)
wget https://github.com/crenoxhq/crenox/releases/download/v2.1.5/crenox-v2.1.5-linux-amd64 -O crenox
# 2. Add execution permissions
chmod +x crenox
# 3. Move to your binary path (/usr/local/bin)
sudo mv crenox /usr/local/bin/
# 4. Verify deployment
crenox version
Option C: Package Manager (Android / Termux)
If you are on Android/Termux, you can install Crenox easily in just two command lines via the Termux User Repository (TUR):
pkg install tur-repo
pkg install crenox
Option D: Go package installer
If you have Go installed on your path, fetch and compile the latest release directly:
go install github.com/crenoxhq/crenox/v2/cmd/crenox@latest
Option E: Compile from source
Clone the repository and build manually using our Makefile configurations:
git clone https://github.com/crenoxhq/crenox.git
cd crenox
make build
./dist/crenox version
Activating the Git Hook
Once the binary is in your path, initialize the pre-commit validator inside your target repository:
# Enable for the current repository
crenox install
# Enable globally for all future clones/initializations
crenox install --global
05 / Execution Specs
Workstation run modes and directives
Crenox supports several CLI run modes to fit different developer workflows, ranging from automated Git pre-commit hooks to manual, ad-hoc filesystem scans.
1. The Commit-Time Validator
Executed automatically by the Git pre-commit hook during the staging process. It reads staged diffs and scans them in-memory under a strict zero-tolerance and fail-closed policy: any finding of any severity or any unreadable file aborts the commit (exit code 1).
crenox run
2. Local Directory Scan
Used to run manual ad-hoc audits on any directory or file tree recursively. Excellent for auditing directories before initial commits.
crenox scan -r ./path/to/project
3. Continuous Integration Export
Generate structured logs in JSON or SARIF format for integration into external pipelines and alert aggregators.
crenox scan -r -f sarif . > report.sarif
06 / Custom Tuning
Tailoring Crenox to your codebase
Crenox works out of the box with production-ready defaults. For enterprise teams or complex workspaces, behavior can be customized by placing a .crenox.yaml file in the repository root.
Custom API Signatures
You can define proprietary rules and compile them directly into the Aho-Corasick automaton alongside built-in rules, avoiding regex overhead:
Version 2.1.10 introduces dedicated Tier 1 Aho-Corasick detection for Age encryption secret keys with variable collision guards, generalized forward-compatible Mozilla SOPS encrypted block suppression across all ciphers, Tier 3 context suppression for Age recipient public keys and SOPS metadata, complete repository ownership assignment to CrenoxHQ, an industry-standard dual-licensing legal framework (CLA.md), zero-emoji GitHub issue forms, and a dynamic PR compliance workflow with live zero-allocation benchmark enforcement.
Version 2.1.9 addresses core engine edge cases and optimizes execution latency: fixes a deduplication bug where multiple distinct secrets on the same line overwrote each other, ensures ad-hoc scans report repeated secrets across different files instead of suppressing them globally, eliminates redundant Git subprocess invocations in pre-commit hook runs, prevents unhandled panics on malformed custom regex rules, adds resilient DNS fallback for offline or firewalled environments, suppresses duplicate Shannon entropy hits on lines already matched by specific pattern rules, and extends test-path classification to pytest and Bun ecosystems.
Version 2.1.8 introduces defensive zero-plaintext secret masking across text, JSON, and SARIF reports, a hardened and cryptographically verified installer (featuring SHA-256 integrity checks, script truncation protection, rootless fallback, and /dev/tty interactive support), multi-worker parallel Git history auditing with merge commit and commit message coverage, pre-scan format and path validations, 6 new modern cloud & AI signatures (DeepSeek, Alibaba AccessKey, Azure Storage, Grafana Cloud, Terraform Cloud, Infracost), and zero-allocation stack optimizations.
Version 2.1.7 introduces dedicated Android/Termux cross-compilation resolving Linux Seccomp faccessat2 restrictions (SIGSYS), eliminates per-token heap allocations across Tier 3 context classifiers (achieving 0 B/op, 0 allocs/op in hot search paths), and hardens Git history/diff scanning with automatic ANSI color stripping (--no-color) and mnemonic prefix support.
Version 2.1.6 expands built-in signature coverage to 125+ patterns (adding Cohere, Together AI, Mistral AI, Datadog, and AWS AppSync), accelerates Shannon entropy analysis by +41.4% using a precomputed Log2 Look-Up Table (LUT), implements native GitLab Secret Detection SAST report generation (-f gitlab-sast), and eliminates false positives on package digests, Go module checksums (h1:, .ziphash), and SRI attributes.
Version 2.1.5 introduces a mathematical O(n) diversity pre-filter (hasDiversity) in the Shannon entropy engine yielding a 39% scan speedup on massive codebases, inline #nosec / // nolint directive suppression, fmt.Sprintf format-string verb filtering, O(1) deduplication, 30+ modern provider signatures, and 9.8x average speedup over Gitleaks across real-world open-source benchmarks.
Version 2.1.4 introduces 8KB line buffer capping protection against 15MB+ minified files (achieving a 53x scanning speedup), lazy buffer allocation dropping clean file memory footprint by 480x, and a 100% pass comprehensive test suite across all core internal packages.
Version 2.1.3 introduces dynamic bounded-channel scanning (reducing peak memory by 22.6%), early directory walk exclusion pruning, and zero-allocation inlined token extraction loops within the entropy scanning paths to completely eliminate closure-based garbage collection overhead.
How version 2.0.7 introduces an 8 MB chunk-streaming ScanReader coupled with a global sync.Pool buffer cache. This limits absolute memory footprint to concurrent CPU worker counts, preventing heap allocation buildup and dropping peak RSS by up to 13x.
How version 2.0.5 implements a flat, contiguous, integer-indexed DFA table for Aho-Corasick matching. This reduces the Trie's active memory to 500 KB, bringing absolute peak RSS down to Go runtime limits (~11 MB) with zero scan heap allocations.
How version 2.0.4 achieves a 27% memory footprint reduction (RSS) by compiling user-defined signatures directly into the search trie transitions, removing runtime regex parsing overhead.
Why remote repository scanning is too late. A study on the rotation window of exposed cloud credentials and why preventing the commit locally is the only zero-exposure security posture.
08 / Community & Feedback
Community, Support & Feedback
Crenox is an open-source security project maintained by CrenoxHQ. We welcome feedback, signature proposals, and community contributions.
If you would like to report an issue, propose a new credential signature, or contribute, please use our community channels:
GitHub Issues & Discussions: Share feature requests, signature proposals, or report false positives on our GitHub Repository.
Community Support & Discussions: Visit the Crenox Community Forum to engage with contributors and users.