Skip to content

security: follow-up hardening for the upload and capture fixes - #474

Merged
BaaRai merged 1 commit into
mainfrom
security/hardening-followup-462-464-465
Nov 22, 2026
Merged

BaaRai merged 1 commit into
mainfrom
security/hardening-followup-462-464-465

Conversation

@BaaRai

@BaaRai BaaRai commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Follow-up to #462, #464 and #465, with thanks to @Coff0xc for the original fixes.

  • Existing spill blob directories and files are tightened on startup; the original fix only covered new blobs.
  • Hook range iterations charge 32 bytes per pair instead of 16, matching the 64-bit kvPair.
  • Uploads open with O_NOFOLLOW on Unix, closing the TOCTOU between Lstat and open. Windows keeps the Lstat check.

Tests cover the startup tightening, the 32-byte charge and the no-follow open.

Tighten existing spill blob permissions on startup, charge 32 bytes per hook range pair, and open uploads with O_NOFOLLOW on Unix. Tests cover the startup walk, the 32-byte charge and the no-follow open.
@BaaRai
BaaRai merged commit 8bacfc0 into main Nov 22, 2026
6 checks passed
skittles-or-oilrz added a commit to skittles-or-oilrz/ARTEX that referenced this pull request Nov 22, 2026
Brings the fork up to date with 329 upstream commits, including v0.7.0 and
the BaaRai#474 hardening follow-up.

Conflicts with the fork's own November fixes, resolved in favour of
upstream where it fixed the same thing:
- server/auth.go: upstream's same-origin check for cookie-authenticated
  state changes (ee35fb4) replaces our header-only rule; our test dropped.
- server/workspace.go: upstream's resolveWithinRoot confinement replaces
  our symlink check; our test dropped.
- mcphttp/client.go: upstream's origin check and redirect refusal replace
  ours; our bounded SSE handshake/timeout is kept on top of it.
- agent/finding_recorder.go, server/task_llm.go: upstream's version.
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