Fix audit security, integrity, and reliability findings #140

Merged
lost-rob0t merged 20 commits from agent/audit-security-integrity-fixes into main 2026-07-29 03:47:28 +00:00
lost-rob0t commented 2026-07-29 00:11:18 +00:00 (Migrated from github.com)

Scope

Implements the main-branch remediation from the full Quasar audit.

Security

  • provider, Brave Search, MCP, and gateway credentials are session-scoped and bound to reviewed endpoint identity;
  • legacy localStorage credential copies are purged;
  • built-in provider identifiers cannot be redirected to alternate endpoints;
  • imported/generated browser actors fail closed until an opaque-origin runtime exists;
  • built-in actor network access is bounded to HTTPS GET/HEAD, no redirects, restricted headers, and a 1 MiB streamed response limit;
  • arbitrary agent URL fetch/crawl requires a configured trusted gateway;
  • the service worker caches only shell and immutable assets.

Integrity and reliability

  • agent records are listed from primary prefix-addressed records instead of a racy secondary index;
  • unknown model pricing and explicit zero budgets stop execution before a provider request;
  • rollback survivors throw PARTIAL_BATCH_COMMIT with repair details;
  • JSONL imports stream where supported and enforce file, byte, record, document, and retained-error limits;
  • repository-wide Prettier coverage is enforced through .prettierignore.

Issues

Addresses #127, #128, #132, #133, #134, #135, #136, #137, #138, and #139.

The PR deliberately contains immediate fail-closed containment for #127, #133/#134, #136, and #138. Their full target architecture—opaque-origin execution, DNS-pinning fetch gateway, journaled logical transactions, and worker-based resumable chunk staging—remains documented in docs/audit-remediation.md.

Validation

Normal CI is green on the final branch head:

  • repository-wide formatting check;
  • ESLint and TypeScript;
  • package-boundary and service-worker static checks;
  • 61 unit test files / 307 tests;
  • integration tests;
  • production Vite build and artifact validation;
  • full Playwright E2E suite.

This remains a draft for owner review because it is a broad security and formatting change set.

## Scope Implements the main-branch remediation from the full Quasar audit. ### Security - provider, Brave Search, MCP, and gateway credentials are session-scoped and bound to reviewed endpoint identity; - legacy `localStorage` credential copies are purged; - built-in provider identifiers cannot be redirected to alternate endpoints; - imported/generated browser actors fail closed until an opaque-origin runtime exists; - built-in actor network access is bounded to HTTPS `GET`/`HEAD`, no redirects, restricted headers, and a 1 MiB streamed response limit; - arbitrary agent URL fetch/crawl requires a configured trusted gateway; - the service worker caches only shell and immutable assets. ### Integrity and reliability - agent records are listed from primary prefix-addressed records instead of a racy secondary index; - unknown model pricing and explicit zero budgets stop execution before a provider request; - rollback survivors throw `PARTIAL_BATCH_COMMIT` with repair details; - JSONL imports stream where supported and enforce file, byte, record, document, and retained-error limits; - repository-wide Prettier coverage is enforced through `.prettierignore`. ## Issues Addresses #127, #128, #132, #133, #134, #135, #136, #137, #138, and #139. The PR deliberately contains immediate fail-closed containment for #127, #133/#134, #136, and #138. Their full target architecture—opaque-origin execution, DNS-pinning fetch gateway, journaled logical transactions, and worker-based resumable chunk staging—remains documented in `docs/audit-remediation.md`. ## Validation Normal CI is green on the final branch head: - repository-wide formatting check; - ESLint and TypeScript; - package-boundary and service-worker static checks; - 61 unit test files / 307 tests; - integration tests; - production Vite build and artifact validation; - full Playwright E2E suite. This remains a draft for owner review because it is a broad security and formatting change set.
Sign in to join this conversation.
No description provided.