NEW @W-23906075@ SF CLI - Automatic ESLint config import leads to RCE during code analyzer process - #501
Open
nikhil-mittal-165 wants to merge 3 commits into
Open
NEW @W-23906075@ SF CLI - Automatic ESLint config import leads to RCE during code analyzer process#501nikhil-mittal-165 wants to merge 3 commits into
nikhil-mittal-165 wants to merge 3 commits into
Conversation
…tive config to prevent RCE
Auto-discovering an executable ESLint config (eslint.config.{js,cjs,mjs} or
legacy .eslintrc.{js,cjs}) caused its top-level JavaScript to execute during
analysis, an arbitrary code execution vector reachable from an untrusted
workspace when auto_discover_eslint_config is enabled.
Auto-discovery now applies only declarative config (.json/.yaml/.yml). An
executable config found by auto-discovery is skipped with a Warn. An explicitly
configured eslint_config_file may still be executable (trusted operator opt-in)
but emits a Warn that its top-level code will run.
Additive only: no exported symbols were removed or renamed.
…ative config to prevent RCE
Mirrors the eslint (flat) engine fix for the legacy ESLint v8 engine. Auto-
discovering an executable legacy config (.eslintrc.{js,cjs}) executed its top-
level JavaScript during analysis via ESLint's own .eslintrc tree-walk
(useEslintrc) and via overrideConfigFile.
Auto-discovery now applies only declarative legacy config (.json/.yaml/.yml):
an auto-discovered executable config is skipped, useEslintrc is disabled so
ESLint will not walk to it either, and a Warn is emitted. An explicitly
configured executable eslint_config_file is still applied (trusted operator
opt-in) but emits a Warn that its top-level code will run.
Additive only: no exported symbols were removed or renamed.
…os to satisfy ConfigValue type
|
Git2Gus App is installed but the |
nikhil-mittal-165
marked this pull request as ready for review
August 18, 2026 16:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restricts ESLint's auto-discovery mechanism to declarative configuration only, preventing arbitrary executable config files from being automatically discovered and executed, thus eliminating RCE vector during code analyzer process.
GUS Ticket W-23906075 — [Bug Bounty / H1] SF CLI - Automatic ESLint config import leads to RCE during code analyzer process
Changes
Test Evidence
Dependencies
None