Skip to content

Release v0.5.9 - #12

Merged
Raftersecurity merged 73 commits into
prodfrom
main
Mar 8, 2026
Merged

Release v0.5.9#12
Raftersecurity merged 73 commits into
prodfrom
main

Conversation

@Rome-1

@Rome-1 Rome-1 commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

v0.5.9 — Bug fixes from Codex end-to-end evaluation

  • [CRITICAL] Fix gitleaks false negatives: file-scan catch block deleted report before reading leaks — reordered to read first
  • Fix staged/diff path resolution: paths now resolve relative to git repo root, not cwd — fixes missed files from subdirectories
  • Fix output format consistency: --staged/--diff no-file paths now respect --format json/sarif
  • Fix gitleaks verify false failures: accept exit code 0 instead of checking stdout content
  • Strict engine/format validation: invalid --engine/--format values now error before scan starts
  • Reduce false positives: default excludes for .venv, vendor, results, etc. + tightened Generic Secret (12+ chars, mixed) and Bearer Token (20+ chars) regexes

v0.5.8

  • rafter agent audit --share — redacted diagnostic excerpt for issue reports (Node + Python)
  • Structured pretool hook messages — rich block/approval messages with rule, risk, and next steps
  • Gitleaks version check fix — Python verify_gitleaks_verbose now checks exit code, not string match
  • README quickstart — 90-second concrete walkthrough

Also includes

  • New integrations: Gemini CLI, Cursor, Windsurf, Continue.dev, Aider
  • GitHub Issues integration test suite
  • Codex/OpenClaw audit fixes
  • Agent init UX: --with-* opt-in replaces --skip-* flags
  • Scan command restructure (rafter scan local, rafter agent scan deprecation)

Test plan

  • rafter agent scan --engine gitleaks --format json <file-with-secret> returns findings (was returning [])
  • rafter agent scan --staged --format json with no staged files returns valid JSON (was plain text)
  • rafter agent scan --staged from subdirectory finds secrets in staged files
  • rafter agent verify passes with valid gitleaks install
  • rafter agent scan --engine nope returns validation error
  • rafter agent scan --format yaml returns validation error before scan starts
  • Scan on repo with .venv/vendor dirs produces minimal false positives
  • Version sync: node/package.json == python/pyproject.toml == 0.5.9

🤖 Generated with Claude Code

Rome-1 and others added 10 commits February 23, 2026 12:25
Watch a path for file changes and re-scan on each change. Prints
findings inline without exiting; logs secrets to audit.jsonl in
real time. Ctrl+C exits watch mode.

- Node: uses chokidar (new dep)
- Python: uses watchdog (new dep, optional with helpful error)
- CLI_SPEC.md updated with --watch documentation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…isting configs

Old default pattern treated the pipe as regex alternation, matching any
command containing "sh" as a substring—flagging git push, grep commands
with shell patterns, .sh filenames, etc.

DEFAULT_REQUIRE_APPROVAL was already updated to use word-bounded shell
names, but existing ~/.rafter/config.json files written by older installs
kept the bad pattern. Add migration logic to ConfigManager.migrate() (Node)
and ConfigManager._migrate() (Python) to silently upgrade the old pattern
on first load.

Also update rafter-agent-security SKILL.md: clarify that command blocking
is handled automatically by the PreToolUse hook, and that /rafter-bash is
only needed in environments without the hook installed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
F005: gitleaks v8.x outputs "v8.18.2" (no prefix), not "gitleaks version
v8.18.2". The old check `stdout.includes("gitleaks version")` and
`"gitleaks version" in result.stdout` always returned False, causing
`rafter agent verify` to report a working binary as failed. Fix: accept
any successful exit (code 0) with non-empty stdout. Also surface stdout
in the error detail string so the actual output is visible when things do
go wrong.

F006: `rafter agent init` printed "Restart OpenClaw to load skill" even
when the skill install had just failed. Track install success separately
(openclawOk / claudeCodeOk) and gate the Next Steps suggestions on actual
success. Both Python and Node fixed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump version 0.4.0 → 0.5.6 in all three skill files
- rafter/SKILL.md: sharpen description to SAST/code analysis; remove
  CVE/dependency language that implied SCA (Rafter does SAST, not SCA)
- rafter-security-skill.md (OpenClaw): update last_updated, add hook-first
  caveat to /rafter-bash, fix pipe-to-shell display text formatting
- rafter-agent-security/SKILL.md: version bump only (language already
  updated in previous session)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ands (v0.5.7)

- `rafter scan` (no subcommand) → remote backend scan (same as `rafter run`)
- `rafter scan remote` → explicit alias for remote backend scan
- `rafter scan local [path]` → local secret scanner (formerly `rafter agent scan`)
- `rafter agent scan` → still works, prints deprecation warning to stderr
- All hook scripts, CI templates, and skill files updated to `rafter scan local`
- Both Node (TypeScript) and Python implementations in parity
- All tests updated and passing (142 Node, 252 Python)
- Version bumped to 0.5.7

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
binary_manager.py: gitleaks v8.x outputs just the version string
(e.g. "v8.18.2"), not "gitleaks version v8.18.2". Check exit code 0
+ non-empty output instead of string matching.

README: add concrete quickstart showing scan → protect → audit loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
audit --share: generates a redacted diagnostic excerpt safe for pasting
into GitHub issues—CLI version, OS/arch, policy fingerprint (via
loadWithPolicy for correct .rafter.yml merge), and last 5 events with
truncated commands. Node + Python with full test coverage.

pretool hooks: replace flat error strings with structured multi-line
messages showing matched rule, risk level with description, and
actionable next steps (approve command, adjust config). Node + Python
parity maintained.

Closes rc-pv014, rc-hjmmw

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updates assertions to match new multi-line message format. No new
test secrets added—existing AKIA/sk_live fixtures unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Rome-1 Rome-1 changed the title release: v0.5.6 Release v0.5.8 Feb 27, 2026
Rome-1 and others added 19 commits March 3, 2026 23:24
…es (rc-0as)

Generic API Key and Generic Secret patterns now:
- Require a negative lookbehind to avoid matching when the keyword
  (api_key, password, etc.) is part of a longer identifier
  (e.g. anthropic_api_key, user_password)
- Require the value to be quoted, filtering out variable references
  and function calls that aren't actual hardcoded secrets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Codex CLI detection (~/.codex) to agent init (Node + Python)
- Add --skip-codex flag to agent init (Node + Python)
- Add Codex skill installation to ~/.agents/skills/ (Node + Python)
- Add codex environment to config schema and defaults (Node + Python)
- Add Codex CLI status to agent status command (Node + Python)
- Update Codex policy export with improved usage instructions
- Bump all skill versions to 0.5.8 (rafter, rafter-agent-security, OpenClaw)
- Update shell completions (bash, zsh, fish) with --skip-codex
Two-part GitHub Issues integration:
- `rafter issues create from-scan`: Create issues from backend scan results
  (--scan-id) or local scan JSON (--from-local). Includes dedup by
  file+pattern fingerprint hash, severity labels, and batch creation.
- `rafter issues create from-text`: Create issues from natural language
  input via stdin pipe, --file, or --text. Extracts title, severity,
  security labels, and file references from text.

Both node/ and python/ implementations with identical CLI surface.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uos)

Generic API Key and Generic Secret patterns now require the matched value
to contain at least one digit (API Key) or digit/special char (Secret).
This prevents false positives when the value is an env var name like
ANTHROPIC_API_KEY or DATABASE_PASSWORD rather than an actual secret.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ons (rc-9ag)

Extend agent support beyond Claude Code and OpenClaw. New MCP-based
integrations detect each AI engine's config directory and install the
rafter MCP server entry into their respective config files:

- Gemini CLI: ~/.gemini/settings.json
- Cursor: ~/.cursor/mcp.json
- Windsurf: ~/.codeium/windsurf/mcp_config.json
- Continue.dev: ~/.continue/config.json
- Aider: ~/.aider.conf.yml

Updates init command with --skip-{gemini,aider,cursor,windsurf,continue}
flags and status command to show all integrations.
# Conflicts:
#	node/src/commands/agent/init.ts
#	node/src/commands/agent/status.ts
#	node/src/core/config-defaults.ts
#	node/src/core/config-schema.ts
Add DOCS_SYNC_CHECKLIST.md to shared-docs/ with:
- Source of truth file mapping
- Per-change-type checklist of which docs files to update
- Common pitfalls (deprecated commands, flag names, file paths)
- Sync process steps

Companion to Rome-1/docs PR #2 which syncs docs with CLI v0.5.8.
…sights (rc-q8c)

Analyze Anthropic's claude-code-security-review GitHub Action to extract
security patterns, false positive filtering strategies, and insights
applicable to rafter-cli's agent system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Analyzes the 17 filtering precedents from claude-code-security-review
and proposes injecting 10 as CLAUDE.md guidance during `rafter agent init`.
Includes draft content, injection mechanism, and implementation plan.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Review of CLI help text, agent init output, skills, command structure,
and documentation. Proposes 8 improvements including project-level
CLAUDE.md generation, post-init summary, command hierarchy cleanup,
contextual scan prompts, policy surfacing, expanded skill triggers,
agent status enhancement, and rafter doctor health check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ized rafter-cli (rc-s1b)

Prioritized list of 15 strategies across 4 tiers with feasibility
assessments. Covers proactive guidance (CLAUDE.md guardrails), active
enforcement (dependency gates, SAST-lite), reactive detection (PostToolUse
secret scanning), and semantic analysis (LLM review gates). Builds on
rc-q8c research and rc-1qt guardrails proposal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…peline (rc-6mb)

5-stage security pipeline: static analysis (semgrep + language linters),
dependency scanning (npm/pip/cargo audit), OWASP Top 10 validation with
framework-aware filtering, optional AI security review via Claude, and
unified report/gate. Includes secret detection improvements, security test
generation, sandboxing recommendations, and 8-phase implementation roadmap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…(rc-crg)

Per-platform integration spec covering Claude Code, Cursor, Codex CLI,
Gemini CLI, Windsurf, Continue.dev, and Aider. Proposes project-level
CLAUDE.md generation, rafter agent init-project command, capability
manifest, agent session detection, and MCP server registration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rome-1 and others added 26 commits March 6, 2026 02:16
Cherry-picked from orphan polecat branch jasper/rc-4pxj1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cherry-picked from orphan polecat branch jasper/rc-5s1fw. Resolved
pre-commit-hooks.yaml conflict by combining system + node + python entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cherry-picked from orphan polecat branch opal/rc-9pt2y.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cherry-picked from orphan polecat branch quartz/rc-m02tg.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ons (rc-13c)

- Add MCP install functions to Python agent.py for all 5 engines
- Update Python init command with --with-gemini, --with-cursor,
  --with-windsurf, --with-continue, --with-aider options
- Update Python status command to show MCP-native engine status
- Add recipe docs for each new integration
- Add 11 new tests for MCP install functions (all pass)
- Node implementation was already complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… (rc-1qd)

Add post-match filtering in PatternEngine to reject matches where the
quoted value looks like a variable/env var name rather than an actual
secret. Filters values matching ALL_CAPS_UNDERSCORE (e.g. OPENAI_API_KEY_V2)
and lowercase_identifier (e.g. my_app_secret_key_1) patterns. Applied
consistently across scan, scanWithPosition, redactText, and hasMatches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ejd)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix Python _install_codex_skills() broken source paths: was referencing
  non-existent python/.claude/skills/ directory. Now uses importlib.resources
  with bundled SKILL.md files in resources/skills/.
- Fix OpenClaw skill install failing when ~/.openclaw exists but
  ~/.openclaw/skills/ doesn't: installRafterSkillVerbose() now checks
  the parent dir and creates skills/ subdir as needed (Node + Python).
- Add Codex CLI check to verify command in both Node and Python, matching
  the status command's coverage.
- Add tests for _check_codex and update verify command test mocks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…q-xn95g)

The catch block was deleting tmpReport before checking e.code===1, making
the leaks-found recovery path unreachable. Moved cleanup after the exit
code check so the report file is still available when leaks are detected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
git diff/staged outputs paths relative to the repo root, but
path.resolve(file) resolves relative to cwd. When running from a
subdirectory, files are missed. Use git rev-parse --show-toplevel to
get the repo root and resolve paths against it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… consistency (hq-nuctq)

--staged/--diff with no files to scan now respects --format json/sarif
instead of always outputting plain text. Both early return paths in
scanDiffFiles and scanStagedFiles now call outputScanResults([], opts)
which handles all output formats correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t content (rc-1qd)

Node binary-manager.ts: verifyGitleaks() and verifyGitleaksVerbose() now accept
any successful exit (code 0) instead of requiring non-empty stdout, since
execAsync already rejects on non-zero exit.

Python gitleaks.py: removed literal "gitleaks version" string check from stdout,
relying solely on returncode == 0.

Python binary_manager.py: removed requirement for non-empty stdout alongside
returncode == 0, accepting exit code alone as sufficient.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…duce FPs (hq-oxdz2)

- Add vendor, .venv, venv, __pycache__, .tox, .mypy_cache, .pytest_cache,
  results, .terraform, bower_components to default scan excludes
- Generic Secret: raise min length 8→12, require both letters and digits
- Bearer Token: raise min length to 20, require both letters and digits

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hq-7vvvi)

Validate both flags at the top of the action handler before any scan work
begins. Invalid --engine values (e.g. --engine nope) now error with exit
code 2 instead of silently falling through to auto mode. Invalid --format
values (e.g. --format yaml) now error immediately instead of after the scan
completes. Defense-in-depth validation also added to selectEngine() in both
scan.ts and baseline.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Rome-1 Rome-1 changed the title Release v0.5.8 Release v0.5.9 Mar 8, 2026
@Raftersecurity
Raftersecurity self-requested a review March 8, 2026 03:08
@Raftersecurity
Raftersecurity merged commit fcb9f67 into prod Mar 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants