The production node is small (8 GB) and several code paths are unbounded: scans start from onboarding, webhooks and the scheduler with no concurrency limit, uploads are buffered in memory, archives are unpacked without caps, and list endpoints accept arbitrary limit, sort_by and regex input. This makes the node both easy to exhaust and, via sort_by, injectable.
What to change
A global scan semaphore (SCAN_CONCURRENCY) plus a per-target lock covering every tokio::spawn scan entry point: onboarding, webhooks and the scheduler.
Stream uploads to disk (handlers/onboarding.rs:436,462); the dashboard stops proxying uploads as a Vec<u8> server function.
Zip-bomb caps on unpacking (ingest/blob.rs:76-101).
Concurrent scan starts above SCAN_CONCURRENCY queue rather than run; a second scan of the same target does not run twice in parallel.
A large artifact upload completes without the agent or the dashboard holding it in memory.
A zip bomb is rejected by the uncompressed-size and entry-count caps, with a test fixture.
sort_by accepts only allowlisted fields; regex input is escaped; limit/page are clamped (#64 closed).
#62, #63, #66 and #67 are closed by paginated or streamed implementations with tests.
## Goal
The production node is small (8 GB) and several code paths are unbounded: scans start from onboarding, webhooks and the scheduler with no concurrency limit, uploads are buffered in memory, archives are unpacked without caps, and list endpoints accept arbitrary `limit`, `sort_by` and regex input. This makes the node both easy to exhaust and, via `sort_by`, injectable.
## What to change
- A global scan semaphore (`SCAN_CONCURRENCY`) plus a per-target lock covering every `tokio::spawn` scan entry point: onboarding, webhooks and the scheduler.
- Stream uploads to disk (`handlers/onboarding.rs:436,462`); the dashboard stops proxying uploads as a `Vec<u8>` server function.
- Zip-bomb caps on unpacking (`ingest/blob.rs:76-101`).
- Clamp `limit`/`page`, allowlist `sort_by` and escape regex input — **#64** (`findings.rs:34,48-53`, `sbom.rs:82`, `dto.rs`).
- Pagination and streaming for **#62**, **#63**, **#66**, **#67**.
## Acceptance
- [ ] Concurrent scan starts above `SCAN_CONCURRENCY` queue rather than run; a second scan of the same target does not run twice in parallel.
- [ ] A large artifact upload completes without the agent or the dashboard holding it in memory.
- [ ] A zip bomb is rejected by the uncompressed-size and entry-count caps, with a test fixture.
- [ ] `sort_by` accepts only allowlisted fields; regex input is escaped; `limit`/`page` are clamped (#64 closed).
- [ ] #62, #63, #66 and #67 are closed by paginated or streamed implementations with tests.
sharang
added this to the Production MVP milestone 2026-09-20 20:16:04 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
The production node is small (8 GB) and several code paths are unbounded: scans start from onboarding, webhooks and the scheduler with no concurrency limit, uploads are buffered in memory, archives are unpacked without caps, and list endpoints accept arbitrary
limit,sort_byand regex input. This makes the node both easy to exhaust and, viasort_by, injectable.What to change
SCAN_CONCURRENCY) plus a per-target lock covering everytokio::spawnscan entry point: onboarding, webhooks and the scheduler.handlers/onboarding.rs:436,462); the dashboard stops proxying uploads as aVec<u8>server function.ingest/blob.rs:76-101).limit/page, allowlistsort_byand escape regex input — #64 (findings.rs:34,48-53,sbom.rs:82,dto.rs).Acceptance
SCAN_CONCURRENCYqueue rather than run; a second scan of the same target does not run twice in parallel.sort_byaccepts only allowlisted fields; regex input is escaped;limit/pageare clamped (#64 closed).