Skip to content

security: daily hardening 2026-11-19 (loopback-only OSpipe server, bounded benchmark inputs) - #1515

Draft
ruvnet wants to merge 1 commit into
mainfrom
claude/security-daily-2026-11-19
Draft

ruvnet wants to merge 1 commit into
mainfrom
claude/security-daily-2026-11-19

Conversation

@ruvnet

@ruvnet ruvnet commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Daily security hardening run (rotating area: deployed examples).

Fixes

1. examples/OSpipe/src/server/mod.rs — network exposure of local screen-memory API

  • Class: missing access restriction / overly permissive CORS on a local HTTP service
  • Severity: HIGH
  • Change: server binds 127.0.0.1 instead of all interfaces; CORS grants only loopback (and tauri://localhost) origins instead of any origin; requests whose Host header is not a loopback name are refused (403); search k capped at 1000. Existing tests updated to send a Host header.
  • Validated by: server::tests::test_remote_origin_gets_no_cors_grant, test_non_loopback_host_header_rejected, test_local_origin_gets_cors_grant, test_loopback_host_parsing (the first three fail on main). cargo test in examples/OSpipe: all suites pass.

2. examples/google-cloud/src/server.rs — unbounded request-controlled benchmark sizes

  • Class: DoS (panic / unbounded allocation from request parameters)
  • Severity: MEDIUM
  • Change: dims, num_vectors, num_queries, k validated (non-zero, upper bounds, num_vectors * dims cap) before any allocation, returning 400; the running flag is checked and set under one lock; stored results are bounded. Documented example sizes (768 dims × 100k vectors) remain accepted.
  • Validated by: server::tests::zero_batch_is_rejected_and_service_stays_usable (fails on main), server::tests::oversized_requests_are_rejected. cargo test -p ruvector-cloudrun-gpu: 8 passed.

🤖 Generated with claude-flow

https://claude.ai/code/session_01MfPHVGXpp496tgmsE195Qn


Generated by Claude Code

… inputs

- ospipe-server: bind 127.0.0.1, allow CORS only for local origins, reject
  non-loopback Host headers, cap search k.
- ruvector-cloudrun-gpu server: validate benchmark sizes before allocating,
  set the running flag atomically, bound stored results.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVGXpp496tgmsE195Qn
@ruvnet ruvnet added the security-scan label Nov 19, 2026 — with Claude

ruvnet commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

The cargo deny (license + source + ban policy) failure is not from this PR: it fails on the advisories check against the root Cargo.lock, which this PR does not change. The same supply-chain workflow is already red on main at the same base commit (979c31a, scheduled run 44055678199). Bans, licenses and sources pass. The advisory cleanup belongs in a dependency-update PR (the open RUSTSEC PRs, e.g. #1506), not this one.


Generated by Claude Code

ruvnet commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

Tests (core-and-rest) failed before any build or test ran. The setup step that downloads onnxruntime-linux-x64-1.28.0.tgz from the microsoft/onnxruntime GitHub releases got an HTTP 404. That is an external release asset pinned in the workflow, so it isn't related to this diff (two example server files). This PR doesn't touch the workflow, so the fix belongs in the CI config, not here.


Generated by Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants