diff --git a/README b/README index 7f857cbec..345a5c49e 100644 --- a/README +++ b/README @@ -162,6 +162,7 @@ Amin Vakil (https://github.com/aminvakil) - w3m profile fix - disable seccomp in wireshark profile - new profile: gemini (#6936) + - new profile: opencode (#7135) Ammon Smith (https://github.com/ammongit) - Add DBus filter rules specific to firefox-developer-edition Andreas Hunkeler (https://github.com/Karneades) diff --git a/RELNOTES b/RELNOTES index 49fff7fbd..b6f88a67c 100644 --- a/RELNOTES +++ b/RELNOTES @@ -13,6 +13,7 @@ firejail (0.9.81) baseline; urgency=low * profiles: mumble: include whitelist-runuser-common (#7084) * profiles: disable-common: add xfce clipman path (#7120) * new profile: gemini (#6936) + * new profile: opencode (#7135) -- netblue30 Sat, 14 Mar 2026 08:00:00 -0500 firejail (0.9.80) baseline; urgency=low diff --git a/etc/inc/disable-programs.inc b/etc/inc/disable-programs.inc index 483b10571..dd0b8c31b 100644 --- a/etc/inc/disable-programs.inc +++ b/etc/inc/disable-programs.inc @@ -200,6 +200,7 @@ blacklist ${HOME}/.cache/nsxiv blacklist ${HOME}/.cache/nvim blacklist ${HOME}/.cache/ocenaudio blacklist ${HOME}/.cache/okular +blacklist ${HOME}/.cache/opencode blacklist ${HOME}/.cache/opera blacklist ${HOME}/.cache/opera-beta blacklist ${HOME}/.cache/opera-developer @@ -619,6 +620,7 @@ blacklist ${HOME}/.config/okularrc blacklist ${HOME}/.config/onboard blacklist ${HOME}/.config/onionshare blacklist ${HOME}/.config/onlyoffice +blacklist ${HOME}/.config/opencode blacklist ${HOME}/.config/openmw blacklist ${HOME}/.config/openra blacklist ${HOME}/.config/opera @@ -1075,6 +1077,7 @@ blacklist ${HOME}/.local/share/notes blacklist ${HOME}/.local/share/ocenaudio blacklist ${HOME}/.local/share/okular blacklist ${HOME}/.local/share/onlyoffice +blacklist ${HOME}/.local/share/opencode blacklist ${HOME}/.local/share/openmw blacklist ${HOME}/.local/share/orage blacklist ${HOME}/.local/share/org.kde.gwenview @@ -1127,6 +1130,7 @@ blacklist ${HOME}/.local/share/zathura blacklist ${HOME}/.local/state/ani-cli blacklist ${HOME}/.local/state/audacity blacklist ${HOME}/.local/state/mpv +blacklist ${HOME}/.local/state/opencode blacklist ${HOME}/.local/state/pipewire blacklist ${HOME}/.local/state/pyradio blacklist ${HOME}/.lv2 diff --git a/etc/profile-m-z/opencode.profile b/etc/profile-m-z/opencode.profile new file mode 100644 index 000000000..2e0d1948c --- /dev/null +++ b/etc/profile-m-z/opencode.profile @@ -0,0 +1,81 @@ +# Firejail profile for opencode +# Description: The open source coding agent +# This file is overwritten after every install/update +quiet +# Persistent local customizations +include opencode.local +# Persistent global definitions +include globals.local + +noblacklist ${HOME}/.cache/opencode +noblacklist ${HOME}/.config/opencode +noblacklist ${HOME}/.local/share/opencode +noblacklist ${HOME}/.local/state/opencode + +# Allow /bin/sh (blacklisted by disable-shell.inc) +include allow-bin-sh.inc + +# Allows files commonly used by IDEs +include allow-common-devel.inc + +# Allow ssh (blacklisted by disable-common.inc) +include allow-ssh.inc + +blacklist ${RUNUSER} + +include disable-common.inc +include disable-proc.inc +include disable-programs.inc +include disable-x11.inc +include disable-xdg.inc + +# Add the following lines to opencode.local to enable whitelisting in `${HOME}`. +#mkdir ${HOME}/.cache/opencode +#mkdir ${HOME}/.config/opencode +#mkdir ${HOME}/.local/share/opencode +#mkdir ${HOME}/.local/state/opencode +#whitelist ${HOME}/.cache/opencode +#whitelist ${HOME}/.config/git +#whitelist ${HOME}/.config/opencode +#whitelist ${HOME}/.gitconfig +#whitelist ${HOME}/.local/share/opencode +#whitelist ${HOME}/.local/state/opencode +#include whitelist-common.inc + +whitelist ${RUNUSER}/openssh_agent +include whitelist-run-common.inc +#include whitelist-usr-share-common.inc +include whitelist-var-common.inc + +apparmor +caps.drop all +ipc-namespace +machine-id +netfilter +no3d +nodvd +nogroups +noinput +nonewprivs +noprinters +noroot +nosound +notv +nou2f +novideo +protocol unix,inet,inet6,netlink +seccomp +seccomp.block-secondary +tracelog + +disable-mnt +private-cache +private-dev +private-etc @network,@tls-ca +private-tmp + +dbus-user none +dbus-system none + +env NO_BROWSER=true +restrict-namespaces