Engineering Release Notes

Git Secret Scanner: Preventing credential leaks locally.

Statically compiled in Go with zero external runtime dependencies, Crenox evaluates staged files locally to prevent credential leakage before they leave the developer workstation.

Published by Khaled Hani on July 3, 2026

Crenox Secret Scanner - Context-aware Git secret scanner in Go | Product Hunt
01 / The Thesis

Why local validation is the final line of defense

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.

Audited Metric Crenox (v2.1.7) Gitleaks (v8.18.2) Betterleaks (v1.6.1)
Peak RAM — Filesystem Scan 13.5 – 17.3 MB 21.6 – 23.9 MB 40.0 – 67.2 MB
Filesystem Scan Time (Avg) 7.0 – 11.8 ms 26.7 – 1822.3 ms 58.2 – 761.0 ms
Git History Scan Time (Avg) 5.4 – 11.9 ms 23.6 – 42.6 ms 30.9 – 202.6 ms
History Recall (sample_secrets) 9 / 9 (100%) 5 / 9 (56%) 5 / 9 (56%)
Dependency Overhead Zero Zero Zero

Transparent & Auditable — Results generated by an open-source benchmark script. Methodology and workflow are publicly visible. View the latest run →

04 / Installation

Deployment and local setup

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.

Option A: One-Line Interactive Installer (Recommended)

The fastest way to install Crenox natively with automatic OS/CPU architecture detection and interactive Git hook setup:

curl -fsSL https://crenoxhq.github.io/crenox/install.sh | bash

Option B: Pre-compiled Binaries

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 D: 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 the index, extracts staged diff blobs, and scans them in-memory. If findings are found, the commit is aborted.

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:

# .crenox.yaml
custom_signatures:
  - id: "internal-api-key"
    description: "Proprietary internal service credential"
    prefix: "mycompany_key_"
    severity: "CRITICAL"
    regex: "^mycompany_key_[a-zA-Z0-9]{32}$"

Path & Extension Exclusions

Skip specific folders (e.g. vendored dependencies) and file types to minimize scan time:

exclude_paths:
  - "vendor/**"
  - "node_modules/**"
exclude_extensions:
  - ".png"
  - ".zip"

Global Allowlist Patterns

Prevent false positives for known mock/test keys used across multiple directories:

allowlist_patterns:
  - "AKIAIOSFODNN7EXAMPLE"   # Exact match
  - "sk_test_*"              # Stripe test keys
07 / Engineering Blog

Technical insights & system logs

Articles written by the developers covering the design, optimization, and security philosophy of Crenox.

September 3, 2026

v2.1.7: Android Seccomp Fix, Zero-Allocation Context Classifiers & Git ANSI Sanitization

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.

August 15, 2026

v2.1.6: 125+ Signatures, Shannon Log2 LUT (+41.4% Throughput), GitLab SAST & Digest Suppression

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.

AUGUST 8, 2026

v2.1.5: 9.8x Benchmark Speedup, hasDiversity Entropy Pre-Filter & Inline Directive Suppression

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.

JULY 20, 2026

v2.1.4: Minified JS Capping, Lazy Buffer Allocation & 100% Test Coverage

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.

JULY 18, 2026

v2.1.3: Dynamic Streaming, Pruned Walks & Allocation-free Entropy

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.

JULY 17, 2026

v2.1.2: New Signatures, Deduplication Overhaul & Cloud Benchmark

Version 2.1.2 adds 8 new built-in provider signatures (Slack/Discord Webhooks, GitHub Client IDs, MongoDB/Postgres DSNs, AWS Secret Key variables), hardens the 4-level deduplication chain, validates PEM keys against footer presence, and introduces an auditable GitHub Actions cloud benchmark comparing Crenox against Gitleaks and Betterleaks.

JULY 13, 2026

Memory Recycling: sync.Pool Bounding on Multi-Gigabyte Scans

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.

JULY 7, 2026

Flat DFA Engine: Obliterating allocations in the hot path

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.

JULY 3, 2026

Memory Optimization: Compiling Rules directly to the Automaton

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.

JUNE 28, 2026

The Fallacy of Post-Push Security Scanning

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 / Other Projects

Other software projects

Explore other security, networking, and system-level applications built in our network ecosystem.

NexusFi

A self-contained, 3-tier Micro-ISP and Local Cloud Ecosystem engineered to run natively on rooted Android devices. Connects L2 deauth daemons, OTG auto-telemetry, and HTB shaping.

NetAnatomy

An advanced network visualization and anatomical mapping tool for complex infrastructural topologies. Delivered via a diagnostic web dashboard.

Decisify

A sophisticated decision-making engine and prioritization framework designed for rapid choice analysis and logic modeling.

09 / Community & Feedback

Get in touch & discuss security

Crenox is an open-source security tool developed as an individual effort. We value feedback, rule suggestions, and reports from all users.

If you would like to report a security issue, propose a new credential signature, or ask questions about workstation deployments, please use our community channels: