release: v0.5.3 - #9
Merged
Merged
Conversation
Implements Python parity with the Node CLI's install-hook subcommand. Bundles pre-commit-hook.sh via importlib.resources and exposes `rafter agent install-hook [--global]` with local and global install modes, idempotency check, existing-hook backup, and executable bit preservation. Closes rc-jou
… crash Typer 0.13.x + Click 8.3.x causes TypeError: Parameter.make_metavar() missing 1 required positional argument: 'ctx'. Upgrade to typer ^0.15.0 (resolves to 0.15.4) which is compatible with click 8.1.x. Add explicit click >=8.0.0,<9.0.0 constraint to prevent future incompatibility. Resolves rc-3ce. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds test-package CI job that gates publish-node: - npm pack, inspect tarball for resources/pre-commit-hook.sh - Install from packed tarball, run agent install-hook end-to-end - Verify .git/hooks/pre-commit installed in temp git repo Runs only on prod push (no per-PR overhead). Blocks npm publish if packaging or hook install fails. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Node.js (binary-manager.ts): - Log exact download URL before fetch - Log downloaded archive size after fetch - Log "chmod +x applied" confirmation - Replace verifyGitleaks() with verifyGitleaksVerbose() that captures stdout/stderr from 'gitleaks version' - Add collectBinaryDiagnostics(): runs file <binary>, uname -a, reports node arch/platform, detects glibc vs musl on Linux - On verification failure, throw structured error with URL, binary path, stdout/stderr, and full diagnostics Node.js (init.ts): - Surface the full error via fmt.error + fmt.warning instead of swallowing it with silent "Falling back to pattern-based scanning" - Include actionable fix instructions (manual install URL) Python (gitleaks.py): - Add GitleaksCheckResult NamedTuple with available/stdout/stderr/error - Add check() method that captures gitleaks version output verbosely - is_available() delegates to check() for backward compat - Add collect_diagnostics(binary_path) static: file, uname -a, python arch/platform, glibc/musl detection on Linux Python (agent.py): - Use scanner.check() instead of is_available() - On failure: print reason, stderr, full diagnostics, fix instructions - Distinguishes not-found-on-PATH from found-but-crashes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-help crash Source issue: rc-3ce (obsidian) Worker: polecat/obsidian MR: rc-pkcz
Source issue: rc-gnl (quartz) Worker: polecat/quartz MR: rc-ib1o
Source issue: rc-2jm (jasper) Worker: polecat/jasper MR: rc-2eyu
Replace basic install-only smoke test with comprehensive smoke-test-node and smoke-test-python jobs that verify --help, --version, and agent scan against a fixture file with a fake AWS key. Both gate after publish and create-release, catching broken releases before users hit them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Agent scan exit codes: 0=clean, 1=findings, 2=runtime error (was 1 for both) - JSON output schema aligned between Node and Python (structured pattern object, no raw secret) - Python redaction threshold aligned with Node (<=8 fully masked, was <16) - CLI_SPEC.md: separate exit code tables for backend vs agent scan, full JSON schema reference - Skill docs: exit codes and JSON output documented Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document the stable audit log schema covering all event types, field names/types, required vs optional fields, redaction behavior, size/rotation notes, and configuration options. Filed rc-7dub for Node/Python schema mismatch (camelCase vs snake_case). Closes: rc-9kq1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When gitleaks is found on PATH or installed locally but fails to execute, Node's agent init now calls verifyGitleaksVerbose() + collectBinaryDiagnostics() and surfaces URL/arch/stderr diagnostics. Mirrors Python's init behavior exactly. Adds findGitleaksOnPath() to BinaryManager (like Python's shutil.which). Makes verifyGitleaksVerbose() and collectBinaryDiagnostics() accept optional binaryPath parameter for PATH-found binaries. Closes: rc-rloz Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two-part fix for rc-672: 1. OpenClaw skill install failure in `rafter agent init` now logs source path, destination path, and full error detail instead of a silent warning. 2. New `rafter agent verify` subcommand checks: gitleaks binary, config.json, Claude Code hooks, and OpenClaw skill — with pass/fail per integration. Exits 0 if all pass, 1 if any fail. Both Node and Python implementations at parity. Python init now also detects OpenClaw and supports --skip-openclaw flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add `rafter agent audit-skill <path>` to Python CLI with full feature parity: secret detection, URL extraction, 11 high-risk command patterns with line tracking, OpenClaw integration, manual review prompt, --json and --skip-openclaw flags. Includes SkillManager utility and 30 tests. Closes: rc-lfg2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ional checks, gitleaks PATH, os.homedir() - audit-skill: exit 1 when secrets > 0 or high_risk_commands > 0 (Node + Python) - verify: Claude Code and OpenClaw checks are now optional (WARN, not FAIL) only Config + Gitleaks are hard failures; exit 1 only on core check failure - verify: gitleaks check now checks PATH first then ~/.rafter/bin (Node + Python parity) - install-hook: replace process.env.HOME with os.homedir() (consistent with codebase)
Covers all 4 scenarios per check function: - Config: pass, missing, invalid JSON - Gitleaks: PATH found, rafter-bin found, not found, binary broken + diagnostics - Claude Code: not detected (warn/optional), settings missing, hooks absent, hooks installed - OpenClaw: not detected (warn/optional), skill missing, skill installed - verify command exit codes: 0 on all-pass, 0 on optional-only absent, 1 on config fail, 1 on gitleaks fail
Node package.json and Python pyproject.toml both set to 0.5.2. CHANGELOG date corrected to 2026-02-21. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Author
Docs updated
Also patched missing flags on existing entries ( Commit: Rome-1/docs@ff315d6 |
….log docs Force push detection (Node + Python): - Add git push -f, --force-with-lease, --force-if-includes patterns - Add refspec force syntax (git push origin +main, +HEAD:main) - 5 new Node tests, 10 new Python tests (85 Node / 189 Python total) Gitleaks tarball extraction (Node): - binary-manager.ts: strip: 1 + filter to gitleaks binary only - Prevents LICENSE and README.md from landing in ~/.rafter/bin/ patterns/ directory (Node + Python): - Write README.md on first init explaining the directory purpose - Clears user confusion about empty folder Docs: - audit.log → audit.jsonl in README.md, node/README.md, CHANGELOG.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add python/rafter_cli/utils/binary_manager.py: full Python port of node/src/utils/binary-manager.ts with platform/arch detection, URL construction, urllib download with progress, tarfile extraction (binary-only filter), chmod 0o755, subprocess verification, and diagnostic collection on failure. - Wire BinaryManager into agent init: after skip_gitleaks check, auto- download if gitleaks not on PATH and not in ~/.rafter/bin/. - Wire BinaryManager into _check_gitleaks: verify_gitleaks_verbose + collect_binary_diagnostics replace direct GitleaksScanner.check usage. - Update test_agent_verify.py to mock BinaryManager instead of GitleaksScanner for the three affected _check_gitleaks tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Custom patterns from disk (Node + Python):
- Load ~/.rafter/patterns/*.txt (one regex/line) and *.json ({name,pattern,severity})
- Merged with built-in 21 patterns at RegexScanner init
.rafterignore suppression (Node + Python):
- Format: path/glob or path/glob:pattern-name per line
- Findings matching suppressed paths/patterns filtered at scan_file()
- Glob matcher supports * and ** syntax
rafter agent status (Node + Python):
- Config, gitleaks version, PreToolUse/PostToolUse hook status
- OpenClaw skill detection, audit log summary (totals + 5 recent events)
Tests: 92 Node / 195 Python
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SARIF 2.1.0 output (Node + Python): - rafter agent scan --format sarif outputs GitHub/GitLab-compatible SARIF JSON - --format flag: text (default), json, sarif (--json still works as alias) - Each finding maps to a SARIF result with ruleId, level, physicalLocation Shell completions (Node + Python): - Node: rafter completion bash|zsh|fish generates complete scripts eval "$(rafter completion bash)" pattern, fish saves to completions dir - Python: Typer built-in completion enabled (add_completion=True) rafter completion bash|zsh|fish command wraps --show-completion Tests: 92 Node / 195 Python Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump node/package.json + python/pyproject.toml to 0.5.3 - Fix node/src/index.ts VERSION constant (was hardcoded 0.5.0) - Add v0.5.3 CHANGELOG section (force push detection, Python gitleaks auto-download, custom patterns, .rafterignore, agent status, SARIF, shell completions) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Raftersecurity
approved these changes
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v0.5.3 — SARIF output, shell completions, custom patterns, agent status, Python gitleaks auto-download, and force push detection.
New Features
rafter agent scan --format sariffor GitHub/GitLab security tabs.--format text|json|sarif;--jsonremains as alias.rafter completion bash|zsh|fish~/.rafter/patterns/*.txtand*.jsonmerged with built-ins.rafterignoresuppression (Node + Python): path/glob rules to suppress findingsrafter agent status(Node + Python): config, gitleaks, hooks, OpenClaw, audit log summarybinary-manager.tsto PythonFixed
git push -f,--force-with-lease,--force-if-includes, refspec force syntax~/.rafter/bin/patterns/README written on first initVERSIONconstant innode/src/index.tswas hardcoded to 0.5.0; now correctTests
Test plan
pnpm test— 92 Node tests passingpython -m pytest— 195 Python tests passingpnpm run build— clean TypeScript compile🤖 Generated with Claude Code