Skip to content

fix(browser): reject malformed indexed source-map offsets - #689

Closed
rudycelekli wants to merge 1 commit into
morluto:mainfrom
rudycelekli:fix/rea-indexed-map-offsets-20261006
Closed

rudycelekli wants to merge 1 commit into
morluto:mainfrom
rudycelekli:fix/rea-indexed-map-offsets-20261006

Conversation

@rudycelekli

Copy link
Copy Markdown

What changed

Indexed source-map section offsets are validated as nonnegative safe integers before decoding. Malformed line/column values now produce an invalid map item instead of escaping into the complete collection's schema validation and aborting browser analysis.

Consumer evidence

With an owned loopback page captured by actual Chrome 154, a source map whose section has column: -1 previously caused the complete public CdpBrowserProvider.analyzeBundle workflow to return ProviderAdapterError. Afterward the result succeeds with partial completeness, an invalid map item, and the independent /api/control endpoint retained. A positive section-offset control remains included with its generated line/column coordinates intact.

Verification

  • Five malformed-offset boundary cases fail before the patch; eight malformed cases pass after, including negative/string/fractional/missing/unsafe coordinates.
  • Focused source-map fetch and response-cleanup suites: 33 passed.
  • npm run check, npm run check:fast, git diff --check: passed.
  • Full npm run verify:browser: passed with actual Chrome and public CLI/stdio browser workflows.
  • Complete public provider malformed-map and positive-offset captures plus consumer assertions: passed.

No new tool, schema or execution authority. This is malformed-input reliability, not an authentication or security bypass claim. Hopper/Ghidra verification was not run because no binary provider behavior changes. AI assistance was used for investigation, implementation and verification. Hosted checks are pending on publication.

@morluto morluto left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve: indexed source-map section offsets now validated as non-negative safe integers at the envelope boundary, so malformed maps become invalid items instead of aborting analysis. Covers nested maps too. 8-case invalid matrix + existing positives, checks green.

@morluto

morluto commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Superseded by #705, which cherry-picks this change (plus 13 sibling fixes) onto current main with conflict resolution and regenerated catalogs. Closing to keep one reviewable merge unit.

@morluto morluto closed this Oct 6, 2026
@morluto

morluto commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Thanks, @rudycelekli, for your work on “fix(browser): reject malformed indexed source-map offsets.” I appreciate your contribution to REA.

@morluto morluto added the bug Something isn't working label Oct 14, 2026
@morluto morluto added the area: runtime Process capture and runtime observation label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants