Skip to content

fix(server): secure video temp files and snapshot allowlists - #2282

Merged
inureyes merged 4 commits into
mainfrom
fix/issue-1787-native-video-temp
Oct 13, 2026
Merged

inureyes merged 4 commits into
mainfrom
fix/issue-1787-native-video-temp

Conversation

@inureyes

@inureyes inureyes commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Materialize native-video data and HTTP payloads as create-new 0600 files inside private 0700 directories whose guards exist before blocking writes begin.
  • Use the startup-resolved local-video allowlist across HTTP, router-model, and in-process request preparation, with restart behavior documented for native and frame-fallback paths.
  • Add deterministic coverage for cancellation after a partial write, forced write failure, Unix modes, startup snapshots, and the in-process constructor.

Test plan

  • Focused CUDA-feature library tests: 3 temp lifecycle, 1 request snapshot, 13 existing resolvers, and 1 in-process startup test passed.
  • A Qwen2.5-VL 3B 4-bit native data:video/mp4 request answered that the clip was red with 83 prompt and 9 completion tokens; the private temp root was empty before and after.
  • Contract gates passed with 123 Python and 49 WebUI checks.
  • cargo fmt --all -- --check and git diff --check passed.

CUDA end-to-end coverage was run locally. macOS Metal inference was not run locally.

Fixes #1787

Materialize client video bytes inside a private directory whose guard exists before the blocking write begins, so cancellation and partial-write failures cannot leave readable files behind. Resolve the local-video allowlist once at startup across HTTP, router-model, and in-process server paths, and document the restart requirement.

Refs #1787
Record the temporary-file ownership design, startup allowlist integration, focused test results, contract gates, and the CUDA native-video runtime evidence for PR #2282.

Refs #1787
@inureyes inureyes added status:review Under review type:security Security vulnerability or fix priority:medium Medium priority area:inference Generation, sampling, decoding (incl. speculative, DRY) labels Oct 12, 2026
State that the end-to-end model check ran on Linux CUDA and that macOS Metal inference was not run locally, without implying active CI coverage.

Refs #1787
Merge main at 61329ee after #2284 so the native-video hardening is validated against the latest central branch.

Refs #1787
@inureyes inureyes changed the title fix(server): harden native-video temp files and resolve allowlist once fix(server): secure video temp files and snapshot allowlists Oct 13, 2026
@inureyes inureyes added status:done Completed and removed status:review Under review labels Oct 13, 2026
@inureyes
inureyes merged commit 448935b into main Oct 13, 2026
27 checks passed
@inureyes
inureyes deleted the fix/issue-1787-native-video-temp branch October 13, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:inference Generation, sampling, decoding (incl. speculative, DRY) priority:medium Medium priority status:done Completed type:security Security vulnerability or fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(server): harden native-video temp files and resolve allowlist once

1 participant