fix(browser): rename AGENT_BROWSER_CHROME_FLAGS to AGENT_BROWSER_ARGS - #26028
Closed
Null-Phnix wants to merge 1 commit into
Closed
fix(browser): rename AGENT_BROWSER_CHROME_FLAGS to AGENT_BROWSER_ARGS#26028Null-Phnix wants to merge 1 commit into
Null-Phnix wants to merge 1 commit into
Conversation
The sandbox-bypass injection in _run_browser_command wrote AGENT_BROWSER_CHROME_FLAGS, but agent-browser (the Rust binary) reads AGENT_BROWSER_ARGS. This made the --no-sandbox workaround for root/AppArmor-restricted systems a silent no-op. Fixes #23496
Collaborator
Author
|
Closing as duplicate of existing fix. Thanks for the pointer, @alt-glitch. Will look for other issues to contribute to. |
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
The sandbox-bypass injection in
_run_browser_commandwroteAGENT_BROWSER_CHROME_FLAGS, butagent-browser(the Rust binary) readsAGENT_BROWSER_ARGS. This made the--no-sandboxworkaround for root/AppArmor-restricted systems a silent no-op (see #23496 for full repro).Fix
Rename the env var from
AGENT_BROWSER_CHROME_FLAGStoAGENT_BROWSER_ARGSin both the guard check and the assignment. No other code in the repo referencesAGENT_BROWSER_CHROME_FLAGS, so this is a complete fix.Verification
grep -r AGENT_BROWSER_CHROME_FLAGSreturns no results post-fix.grep -r AGENT_BROWSER_ARGSconfirms the var is used consistently.os.geteuid(), AppArmor via/proc/sys/kernel/apparmor_restrict_unprivileged_userns) is unchanged — only the env var name it writes is corrected.Fixes #23496