Release v2.2.0 · Dec 1, 2026 · 138 Built-In Rules

Zero silent blind spots.

Crenox v2.2.0 eliminates 64KB streaming truncation, preserves 15+ special characters in quoted secrets, scans Markdown and documentation by default, adds --include-tests, WooCommerce REST (ck_ / cs_) and Bearer signatures, and hardens every Git and CLI boundary.

crenox scan — fresh qa
$ crenox scan -f json dump_130kb.sql config.json README.md
✓ dump_130kb.sql:75000 aws-access-key   [CAUGHT · exit 1]
✓ config.json:1        generic-password [CAUGHT · "SuperSecret123!"]
✓ README.md:14         aws-access-key   [CAUGHT · docs scanned]
✓ auth_test.go         skipped (test)   [transparent · --include-tests]
Hot-path: 0 B/op · 0 allocs/op · 184 MB/s
$ crenox scan -f json dump_130kb.sql config.json README.md
✗ dump_130kb.sql:75000  missed past 64KB [exit 0 · CRENOX CLEAN]
✗ config.json:1         "SuperSecret123!" [missed · ! & JSON key]
✗ README.md:14          silently dropped [counted as 1 scanned, clean]
! auth_test.go          counted clean    [no opt-in flag]
138
Built-in rules (137 unique IDs + bip39-mnemonic)
0 B/op
0 allocs/op · 184 MB/s hot-path throughput
15+
Special characters preserved in quoted secrets
100%
Files >64KB streamed with exact line framing

01 / Breakthroughs

Four fixes from Fresh QA.

Every critical and high-severity gap uncovered during zero-assumption Fresh QA testing was root-caused in the scanner, classifier, and CLI layers and locked behind end-to-end regression tests.

01 · STREAMING ENGINE

Unlimited 64KB+ Streaming & Exact Line Framing

Problem
ScanReaderErr misfired len(leftover) + n > 8192 across 64KB read boundaries, jumping over lines past 64KB and breaking cross-chunk PEM footers.
Solution
Framed leftover to the first bytes.IndexByte newline, tracked \n\n line counts, flushed final EOF lines, and propagated non-EOF I/O errors.
Outcome
Secrets at 79KB, 130KB, or line 75,000 of 150,000-line files are caught with exact line numbers; read errors fail closed.

02 · GENERIC EXTRACTION

Quoted Special Chars, JSON Keys & Bearer Tokens

Problem
Symbols like ! $ ( ) * . : ; < > [ ] { | } and @ ? & broke extraction, while JSON keys, snake/camelCase names, and Bearer headers slipped past.
Solution
Propagated isQuoted through isPlausibleSecretTokenWithQuote, handled "password": "..." and =>, matched db_password / clientSecret, and added bearer-token.
Outcome
All 15+ special characters in quoted secrets stay intact, pwd length parity is aligned, and Tier 2 entropy runs on .json, .yaml, .yml, .toml, .sql, .txt, and .log.

03 · TRANSPARENT COVERAGE

Docs Scanned by Default & --include-tests

Problem
README.md, *.md, *.rst, docs/, *.po, and checksums were silently dropped as clean, and skipped test files inflated scanned_files.
Solution
Removed doc, seed/, and download/ paths from Tier 3 suppression, added --include-tests (include_tests: true), and stripped commit prefixes via StripCommitPrefix.
Outcome
Leaked tokens in Markdown and runbooks are caught by default while test suites and .env.example report transparently as skipped until opted in.

04 · SIGNATURES & HARDENING

WooCommerce #12, Git Subdirs & Fail-Closed CLI

Problem
Missing WooCommerce REST signatures, subdirectory crenox run drift, dropped +++ diff lines, ANSI leaks in plain output, and permissive install.sh checks.
Solution
Added ck_ / cs_ rules (Issue #12), URL-safe Base64 decoding, NUL-delimited git diff -z from repoRoot, zero-ANSI FormatPlain, and strict SHA-256 verification.
Outcome
138 rules (137 IDs) + bip39-mnemonic with immutable trie.Build slices, safe WalkDir filtering, and fail-closed binary installation.

02 / Architecture

Inside the v2.2.0 engine.

Explore how each subsystem in v2.2.0 eliminates silent blind spots while preserving zero hot-path allocations.

Chunk-Independent Line Framing

ScanReaderErr in internal/scanner/scanner.go decouples line boundary framing from the 64KB read buffer so arbitrary offsets inside large SQL dumps, logs, and PEM keys never truncate.

  • Processes leftover up to the first newline (bytes.IndexByte) without conflating line length with the 64KB chunk size.
  • Tracks \n\n blank lines across chunk seams with zero lineNum drift and flushes final lines lacking trailing newlines on io.EOF.
  • Detects -----END ...----- PEM footers across chunks or inline strings and aborts fail-closed on any non-EOF read error.
// internal/scanner/scanner.go — ScanReaderErr
for {
    n, readErr := r.Read(buf)
    // Frame leftover via bytes.IndexByte without 64KB chunk miscount
    if readErr != nil && readErr != io.EOF {
        return readErr // Fail closed on I/O errors
    }
}

Quote-Aware Plausibility & Structured Configs

Real credentials contain punctuation, escaped quotes, snake_case or camelCase keys, and HTTP Bearer prefixes. Unquoted code expressions remain quiet while quoted secrets surface cleanly.

  • isPlausibleSecretTokenWithQuote preserves 15+ special characters (! $ ( ) * . : ; < > [ ] { | } @ ? &) inside quotes while suppressing getToken().
  • Extracts "password": "..." JSON pairs, 'api_key' => '...' assignments, db_password / clientSecret boundaries, and extractBearerToken headers.
  • Enables Tier 2 entropy on assignments in .json, .yaml, .yml, .toml, .sql, .txt, and .log, plus URL-safe Base64 decoding.
{
  "db_password": "P@ss!word$(*):;<>[|].?&99",
  "clientSecret": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6..."
}

Honest Coverage Without Silent Drops

Documentation, changelogs, translations, and checksums are scanned by default. Test suites and example env files report explicitly as skipped rather than inflating clean file counts.

  • Removed .md, readme, .rst, docs/, doc/, .po, .sum, go.sum, seed/, and download/ from silent suppression while keeping placeholder filters intact.
  • Added --include-tests CLI flag and include_tests: true YAML config to audit test fixtures and .env.example on demand.
  • Strips <commit>: prefixes in history mode via StripCommitPrefix and narrows #nosec / nolint suppression away from CRITICAL findings.
$ crenox scan -r --include-tests .
✓ README.md:14          aws-access-key   [CAUGHT · scanned by default]
✓ auth_test.go:22       generic-secret   [CAUGHT · --include-tests]

WooCommerce #12, Subdir Hooks & Fail-Closed Verification

Expands Tier 1 coverage to 138 rules (137 unique IDs) + bip39-mnemonic at 0 B/op · 0 allocs/op · 184 MB/s, while hardening Git hooks, directory walking, reporters, and installation.

  • Closes Issue #12 with woocommerce-consumer-key (ck_ + 40 hex) and woocommerce-consumer-secret (cs_ + 40 hex), and copies slices in trie.Build.
  • crenox run resolves repoRoot, runs NUL-delimited git diff --cached --name-status -z --diff-filter=ACMRT, and keeps +++ added lines inside hunks.
  • Fixes WalkDir skipping repos under build/dist parent folders, --history --fail-fast SIGPIPE errors, zero-ANSI FormatPlain, gitlab-sast stdout, and fail-closed SHA-256 in install.sh.
$ export CRENOX_NO_TIPS=1
$ curl -fsSL https://crenoxhq.github.io/crenox/install.sh | bash
✓ SHA-256 verified (fail-closed) · crenox v2.2.0 ready

03 / Upgrade

Upgrade in seconds.

Update an existing installation or pull a verified binary, then audit your entire repository including Markdown docs and files past 64KB.

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

Fail-closed installer with automatic OS/architecture detection and mandatory SHA-256 checksum verification.

$ crenox update && crenox version

In-place self-update for existing Crenox installations with atomic binary replacement.

$ brew install crenoxhq/crenox/crenox

Install via the official Homebrew tap on macOS or Linux (use brew upgrade crenoxhq/crenox/crenox to update).

$ go install github.com/crenoxhq/crenox/v2/cmd/crenox@latest

Compile directly into $GOPATH/bin using Go 1.23+.

verify repository after upgrade
$ crenox scan -r .
$ crenox scan -r --include-tests .
$ CRENOX_NO_TIPS=1 crenox run   # Optional: silence interactive hints outside CI

04 / Enterprise

Scale across every workstation.

Crenox v2.2.0 Community remains free under AGPL-3.0 for local development and CI. When engineering organizations need fleet-wide pre-commit enforcement, supervised bypass governance, and automated Git history remediation inside their private network, Crenox Pro bridges the gap.

Capability v2.2.0 Community Crenox Pro (Fleet)
Pre-commit & CI rules 138 built-in (+ bip39-mnemonic) 343+ rules + fleet policy sync
Hook bypass defense Local pre-commit hook Centralized --no-verify alerts
Exception governance Inline // crenox:ignore JIT approval desk + tamper-evident ledger
Git history cleanup Detection (--history) Automated purge + restore points