Skip to content

feat: allow --experimental-inspector-network-resource node flag#49689

Merged
jkleinsc merged 3 commits into
electron:mainfrom
parthtaneja0001:feat/allow-experimental-inspector-network-resource
Apr 28, 2026
Merged

feat: allow --experimental-inspector-network-resource node flag#49689
jkleinsc merged 3 commits into
electron:mainfrom
parthtaneja0001:feat/allow-experimental-inspector-network-resource

Conversation

@parthtaneja0001
Copy link
Copy Markdown
Contributor

@parthtaneja0001 parthtaneja0001 commented Feb 5, 2026

Fixes #49500

Description of Change

This PR adds --experimental-inspector-network-resource to Electron’s
Node.js CLI allowlist so it can be passed through to Node.

This enables remote source map resolution in Chrome DevTools for
main and utility processes when using the Node.js inspector.

Checklist

  • PR description included
  • I have built and tested this PR
  • npm test passes
  • tests are changed or added
  • relevant API documentation, tutorials, and examples are updated
  • PR release notes describe the change

Release Notes

Notes: Allowed the --experimental-inspector-network-resource Node.js flag to be passed through Electron.

@welcome
Copy link
Copy Markdown

welcome Bot commented Feb 5, 2026

💖 Thanks for opening this pull request! 💖

Semantic PR titles

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Commit signing

This repo enforces commit signatures for all incoming PRs.
To sign your commits, see GitHub's documentation on Telling Git about your signing key.

PR tips

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Feb 5, 2026
@parthtaneja0001 parthtaneja0001 force-pushed the feat/allow-experimental-inspector-network-resource branch from de0736f to 6b79489 Compare February 5, 2026 19:40
@parthtaneja0001
Copy link
Copy Markdown
Contributor Author

@electron-cation please add semver/minor

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Feb 12, 2026
@parthtaneja0001 parthtaneja0001 force-pushed the feat/allow-experimental-inspector-network-resource branch from 6b79489 to 3657c89 Compare February 18, 2026 06:07
Copy link
Copy Markdown
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

@parthtaneja0001
Copy link
Copy Markdown
Contributor Author

This also needs to be documented - see https://github.com/electron/electron/blob/5ddd8a020035970094df86efe8c266b3cca011ab/docs/api/command-line-switches.md

Done. Please review once if the documentation looks fine.

@mlaurencin mlaurencin added semver/minor backwards-compatible functionality no-backport labels Mar 9, 2026
@jkleinsc jkleinsc requested review from a team March 12, 2026 16:34
Copy link
Copy Markdown
Member

@erickzhao erickzhao left a comment

Choose a reason for hiding this comment

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

API LGTM

Copy link
Copy Markdown
Member

@itsananderson itsananderson left a comment

Choose a reason for hiding this comment

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

API LGTM

Copy link
Copy Markdown
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

API LGTM

@jkleinsc
Copy link
Copy Markdown
Member

@parthtaneja0001 can you rebase this PR with the latest from main? That should get CI building.

@parthtaneja0001 parthtaneja0001 force-pushed the feat/allow-experimental-inspector-network-resource branch from 5918fa3 to 8b34c21 Compare March 28, 2026 06:34
@parthtaneja0001
Copy link
Copy Markdown
Contributor Author

@parthtaneja0001 can you rebase this PR with the latest from main? That should get CI building.

Rebased onto the latest main and resolved conflicts.Waiting for CI to run.

nikwen
nikwen previously requested changes Mar 31, 2026
Copy link
Copy Markdown
Member

@nikwen nikwen left a comment

Choose a reason for hiding this comment

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

I triggered CI.

Requesting changes to make sure this doesn't get merged before @electron/wg-security takes a look. (Please dismiss my review once that has happened.)

Copy link
Copy Markdown
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

LGTM from a security perspective. The flag operates within the already-privileged inspector context (where arbitrary code execution is already possible), so the risk is imo low.

One suggestion: docs should note that enabling this flag allows the inspector to make outbound network requests to resolve source maps.

Note: When enabled, the Node.js inspector will make network requests to URLs specified in source maps. Be mindful of this in environments where the process has access to internal networks.

@parthtaneja0001
Copy link
Copy Markdown
Contributor Author

updated the docs with the security note

@parthtaneja0001
Copy link
Copy Markdown
Contributor Author

@nikwen is there any other review left?

@nikwen nikwen dismissed their stale review April 26, 2026 15:45

wg-security took a look

@nikwen
Copy link
Copy Markdown
Member

nikwen commented Apr 26, 2026

I've dismissed my review. @codebytere is still in "request changes" mode.

@nikwen nikwen added target/41-x-y PR should also be added to the "41-x-y" branch. and removed no-backport labels Apr 26, 2026
@nikwen nikwen added the target/42-x-y PR should also be added to the "42-x-y" branch. label Apr 26, 2026
@parthtaneja0001 parthtaneja0001 force-pushed the feat/allow-experimental-inspector-network-resource branch from b9909ae to c0c74a9 Compare April 26, 2026 16:28
@parthtaneja0001
Copy link
Copy Markdown
Contributor Author

rebased to latest main to get the CI building

@ckerr
Copy link
Copy Markdown
Member

ckerr commented Apr 28, 2026

@codebytere do you still have changes requested?

@jkleinsc jkleinsc dismissed codebytere’s stale review April 28, 2026 16:31

Concerns have been addressed.

@jkleinsc jkleinsc merged commit cc7ebe5 into electron:main Apr 28, 2026
124 of 126 checks passed
@welcome
Copy link
Copy Markdown

welcome Bot commented Apr 28, 2026

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link
Copy Markdown

release-clerk Bot commented Apr 28, 2026

Release Notes Persisted

Allowed the --experimental-inspector-network-resource Node.js flag to be passed through Electron.

@trop
Copy link
Copy Markdown
Contributor

trop Bot commented Apr 28, 2026

I have automatically backported this PR to "41-x-y", please check out #51377

@trop
Copy link
Copy Markdown
Contributor

trop Bot commented Apr 28, 2026

I have automatically backported this PR to "42-x-y", please check out #51378

@trop trop Bot added in-flight/42-x-y and removed target/41-x-y PR should also be added to the "41-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch. labels Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for experimental-inspector-network-resource

8 participants