Skip to content

security: remediate Rafter scan (deps + FP triage + tarball hardening) [sable-qsig] - #184

Merged
Rome-1 merged 1 commit into
mainfrom
sable-qsig-scan-remediation
Jun 27, 2026
Merged

security: remediate Rafter scan (deps + FP triage + tarball hardening) [sable-qsig]#184
Rome-1 merged 1 commit into
mainfrom
sable-qsig-scan-remediation

Conversation

@Rome-1

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

Copy link
Copy Markdown
Collaborator

Triage + remediation of the Rafter scan report on main (780 findings, score 50.7). Bead sable-qsig.

Triage summary (decide-first: real vs false positive)

Each class was traced input→sink before action.

Bucket Findings Disposition
Dependency CVEs (axios, hono, tar, js-yaml, fast-uri, path-to-regexp, form-data, follow-redirects, ip-address, qs, brace-expansion, +py) Issues 1–15, 39, 48–57, 68 REAL → fixed (node bumped+re-locked; py floors bumped, transitive via mcp tracked in sable-i7ll)
fs/path SAST (R-61603 ~390, R-374DB 93) ~480 FALSE POSITIVE — local CLI reads/writes config/skills/hooks at paths from the user's own $HOME/cwd/CLI args; no external taint. The one real external path (remote-tarball extract) is zip-slip-guarded. Suppressed w/ rationale in .rafter.yml.
XXE (R-6675E) 56 FALSE POSITIVE — Python codebase imports no XML parser; flagged lines are mkdir/read_text/for-loops.
git parsing as URL/format checks (R-3F913, R-88B14) 18 FALSE POSITIVEstartswith('b/')/endswith('.git') is git-diff/URL parsing.
timing attack (R-51C60) 3 FALSE POSITIVE — compares scan status strings, not secrets.
Intentional secrets (demo/, fixtures/, agent.py event labels) Issues 7,11–14,62–66 FALSE POSITIVE — canonical AWS-docs example keys / [SECRET]/🔑 display labels.
misc style/note rules (random session-id, O_WRONLY append log, re.sub, .read(), eslint, ReDoS on maintained patterns) ~60 FALSE POSITIVE / accepted w/ rationale.
tarfile members (R-F6F89) 1 already zip-slip-guarded → hardened (skip symlink/device members).

Changes

  • .rafter.yml (new) — documented ignore: triage for the FP classes above; honored by local engines and remote rafter run. Nothing leaves the audit trail (recoverable via _suppressed).
  • Node depspnpm-workspace.yaml overrides + node/package.json, re-locked: axios 1.13.6→1.18.1, hono 4.12.8→4.12.27, tar→7.5.17, js-yaml→4.3.0, fast-uri/path-to-regexp/form-data/follow-redirects/ip-address/qs/brace-expansion past fixed (~50 CVEs).
  • Python depspyproject.toml floors: requests ^2.33.0, urllib3 >=2.7.0, python-dotenv ^1.2.2.
  • skill_remote.extract_npm_tarball — defense-in-depth: only extract regular files/dirs.

⚠️ Flagged for follow-up (not in this PR)

Testing

  • tsc build clean; platform-integration (most dep-sensitive) 77/77 in isolation; python skill_remote/extract 87 passed.
  • Full suites have pre-existing parallel-run flakiness (sable-6udz), unrelated.
  • Local secrets rescan: 0 active / 488 suppressed (all triaged fixtures). Remote rafter run not executed — RAFTER_API_KEY unset in this env; please run on CI to confirm the new score.

🤖 Generated with Claude Code

…ening)

Triage + remediation of the Rafter scan on main (bead sable-qsig). The large
majority of the 780 findings are context-blind SAST false positives for a local
CLI (fs/path ops on the user's own filesystem, an XXE rule firing on code that
parses no XML, status-string compares flagged as timing attacks, git-diff
parsing flagged as URL validation) and intentional demo/fixture secrets. Those
are documented and suppressed in a new repo-root .rafter.yml — each entry traced
input->sink first, honored by both the local engines and remote `rafter run`.

Real fixes applied:
- Node dependency CVE bumps via pnpm workspace overrides + direct deps, re-locked:
  axios 1.13.6->1.18.1, hono 4.12.8->4.12.27, tar ->7.5.17, js-yaml ->4.3.0,
  fast-uri, path-to-regexp, form-data, follow-redirects, ip-address, qs,
  brace-expansion all bumped past their fixed versions (~50 CVEs). tsc build
  clean; affected suites pass.
- Python direct-dep floors bumped in pyproject (requests ^2.33.0, urllib3
  >=2.7.0, python-dotenv ^1.2.2). Transitive CVEs (via mcp) need `poetry lock`
  on a box with poetry -> tracked in sable-i7ll.
- skill_remote.extract_npm_tarball: skip non-file/dir members (symlink/hardlink/
  device) as defense-in-depth on top of the existing zip-slip guard.

Local secrets rescan after: 0 active, 488 suppressed (all triaged fixtures).

Refs sable-qsig. Follow-ups: sable-i7ll (python poetry lock), sable-ufd9
(backend FP rules behind GH #178/#182).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Rome-1
Rome-1 merged commit ccd9be1 into main Jun 27, 2026
@Rome-1
Rome-1 deleted the sable-qsig-scan-remediation branch June 27, 2026 06:07
@Rome-1 Rome-1 mentioned this pull request Jun 28, 2026
Rome-1 added a commit that referenced this pull request Jun 28, 2026
Patch release bundling the unreleased changes on main since 0.8.9:
- Claude Code PostToolUse matcher narrowed .* -> Bash|Write|Edit|MultiEdit (#183)
- Hooks tolerate harness-appended flags, e.g. --hook-json (#180)
- Dependency CVE re-lock (axios, hono, tar, js-yaml, +transitives) and
  remote-skill tarball extraction hardening (#184)

Bumps node/package.json + python/pyproject.toml to 0.8.10 (parity), the
rafter-security skill resource version (node + python), and finalizes the
CHANGELOG 0.8.10 section.

Refs sable-ehb1

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Rome-1 added a commit to Minh-Nguyen-2k7/rafter-cli that referenced this pull request Jun 30, 2026
The PR's regenerated pnpm-lock.yaml/poetry.lock dropped the
pnpm-workspace.yaml CVE-remediation 'overrides' floor (sable-qsig/Raftersecurity#184)
and downgraded ip-address below the >=10.1.1 floor, @hono/node-server,
and fast-uri — desyncing the lockfile from pnpm-workspace.yaml so every
--frozen-lockfile CI job would fail. Reverted both lockfiles to main.

Feature itself (dop_v1_ DigitalOcean PAT pattern + tests, Node+Python)
is unchanged. Restored PEP8 spacing/trailing comma in secret_patterns.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant