Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion home-manager/modules/obsidian/obsidian-headless.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
exec @xvfbRun@/bin/xvfb-run -a @obsidian@/bin/obsidian "$@"
exec @xvfbRun@/bin/xvfb-run -a @obsidian@/bin/obsidian --no-sandbox "$@"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The --no-sandbox flag disables all security sandboxing in Electron. Since the pull request description identifies the SUID sandbox as the specific cause of the crash (due to Nix store limitations), using --disable-setuid-sandbox is a more targeted approach. This allows the kernel-based namespace sandbox to remain active if the host system supports it, maintaining a better security posture while still resolving the SUID-related crash.

Suggested change
exec @xvfbRun@/bin/xvfb-run -a @obsidian@/bin/obsidian --no-sandbox "$@"
exec @xvfbRun@/bin/xvfb-run -a @obsidian@/bin/obsidian --disable-setuid-sandbox "$@"

Copilot AI Apr 11, 2026

Copy link

Choose a reason for hiding this comment

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

Using --no-sandbox fully disables Chromium/Electron sandboxing, which is a significant security reduction even in headless mode (e.g., malicious plugins/vault content could gain more privileges). If the intent is only to avoid the failing SUID sandbox on NixOS, consider switching to --disable-setuid-sandbox (or gating --no-sandbox behind an env var/host check) so other sandbox mechanisms can still apply where available.

Suggested change
exec @xvfbRun@/bin/xvfb-run -a @obsidian@/bin/obsidian --no-sandbox "$@"
exec @xvfbRun@/bin/xvfb-run -a @obsidian@/bin/obsidian --disable-setuid-sandbox "$@"

Copilot uses AI. Check for mistakes.
Loading