-
Notifications
You must be signed in to change notification settings - Fork 0
fix(clawdbot): enable noSandbox for browser on Linux #560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -72,6 +72,7 @@ lib.mkIf (!env.isCI) { | |||||||||
| } | ||||||||||
| // lib.optionalAttrs pkgs.stdenv.isLinux { | ||||||||||
| executablePath = "${pkgs.chromium}/bin/chromium"; | ||||||||||
| noSandbox = true; # SUID sandbox requires root-owned binary with mode 4755 | ||||||||||
|
||||||||||
| noSandbox = true; # SUID sandbox requires root-owned binary with mode 4755 | |
| # Rely on Chromium's default sandboxing for security; ensure the | |
| # SUID sandbox helper is installed/configured correctly on the host | |
| # instead of disabling it with `noSandbox = true`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current structure merges executablePath and noSandbox into configOverrides at the top level, alongside browser. It's more conventional and likely correct for these browser-specific settings to be nested within the browser attribute set. This refactoring moves the Linux-specific browser attributes into the browser block, improving the configuration's clarity and correctness.
} // lib.optionalAttrs pkgs.stdenv.isLinux {
executablePath = "${pkgs.chromium}/bin/chromium";
noSandbox = true; # SUID sandbox requires root-owned binary with mode 4755
};
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unconditionally disabling the Chromium sandbox on all Linux systems weakens browser isolation even on hosts where the SUID sandbox could be properly configured. Consider making this configurable via a module option like
clawdbot.browser.noSandbox(defaulting tofalse) so that:Alternatively, implement runtime detection to check if
${pkgs.chromium}/libexec/chrome-sandboxhas proper permissions before disabling the sandbox, so only broken environments bypass it.Agent: 🏛 Architecture •
• 
Prompt for Agent