Skip to content

fix(browser): per-snapshot byte cap (L-5) - #77

Merged
jkyberneees merged 1 commit into
mainfrom
fix/l5-browser-snapshot-cap
Jul 18, 2026
Merged

fix(browser): per-snapshot byte cap (L-5)#77
jkyberneees merged 1 commit into
mainfrom
fix/l5-browser-snapshot-cap

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Closes L-5 in sec_findings.md.

  • Add maxBrowserSnapshotBytes (1 MiB) and truncate extracted content that exceeds it, appending a truncation marker.
  • Add TestBrowser_SnapshotByteCap regression test.
  • Document the cap in docs/SECURITY.md and AGENTS.md.

Full test suite passes: go test ./... -count=1.

The browser capped history at 50 snapshots and elements at 500 per page,
but a single snapshot could retain ~10 MB of extracted text. A hostile
page could still push ~500 MB into memory.

- Add maxBrowserSnapshotBytes (1 MiB) and truncate extracted content that
  exceeds it, appending a truncation marker.
- Add TestBrowser_SnapshotByteCap regression test.
- Document the cap in SECURITY.md and AGENTS.md.

Closes L-5 in sec_findings.md.
@jkyberneees
jkyberneees merged commit fe4fbcf into main Jul 18, 2026
5 of 7 checks passed
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