Skip to content

fix(javascript): share source-map admission and path resolution - #12161

Merged
morluto merged 3 commits into
mainfrom
audit/parser-source-maps
Nov 19, 2026
Merged

morluto merged 3 commits into
mainfrom
audit/parser-source-maps

Conversation

@morluto

@morluto morluto commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

Local analysis and source-map inspection share bounded structural admission. Source maps and createRequire now share the relative URL projection and keep invalid matching paths separate from raw Evidence.

Fixes #12135

Refs #7171, #7729.

Contract and boundary impact

Previously retained Evidence remains readable. Reanalysis refreshes path facts.

Evidence and regression coverage

Public CLI and stdio MCP exercise malformed maps, decoded NULs, and synthetic-root re-entry. Node independently confirms the createRequire result. A release-artifact regression preserves embedded-source exposure with unresolved coordinates when a valid indexed leaf exceeds the positioned row allowance.

Validation performed

  • Focused tests covering the changed boundaries on Node 24.22.1. 370 passed, 16 skipped across five files.
  • npm run verify:browser:source-maps verified real Chrome with isolated esbuild 0.25.10 on this head.
  • npm run check:fast and git diff --check origin/main...HEAD passed.

Author readiness

Human owner: @morluto

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@morluto
morluto marked this pull request as ready for review November 19, 2026 02:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T03:06:57.597942Z 47f7698 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a080ae3b54

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/domain/sourceMapFormat.ts Resolved
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed follow-up appears safe to merge.

Summary

Source-map readers now share bounded checks and path resolution while keeping raw declarations separate from usable paths.

  • Local source-map analysis keeps readable sources when map decoding is incomplete.
  • Source-map paths keep traversal and retain declarations that cannot be matched.
  • Relative createRequire filenames keep their real parent traversal.

Tests were inspected, not run. Available local history showed no superseding change; live PR status was not checked.

Reviews (2) · Last reviewed commit: "fix(javascript): retain source content b..." · Reviewed by Greptile

Comment thread src/domain/sourceMapFormat.ts Resolved
@morluto
morluto enabled auto-merge (squash) November 19, 2026 03:29
@morluto
morluto merged commit 27e04ea into main Nov 19, 2026
44 of 46 checks passed
@morluto
morluto deleted the audit/parser-source-maps branch November 19, 2026 03:32
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Local JavaScript analysis reports complete coverage for malformed source maps

1 participant