| 1 |
# Firejail profile for keepassxc |
| 2 |
# Description: Cross Platform Password Manager |
| 3 |
# This file is overwritten after every install/update |
| 4 |
# Persistent local customizations |
| 5 |
include keepassxc.local |
| 6 |
# Persistent global definitions |
| 7 |
include globals.local |
| 8 |
|
| 9 |
noblacklist ${HOME}/*.kdb |
| 10 |
noblacklist ${HOME}/*.kdbx |
| 11 |
noblacklist ${HOME}/.cache/keepassxc |
| 12 |
noblacklist ${HOME}/.config/keepassxc |
| 13 |
noblacklist ${HOME}/.config/KeePassXCrc |
| 14 |
noblacklist ${HOME}/.keepassxc |
| 15 |
noblacklist ${DOCUMENTS} |
| 16 |
noblacklist ${RUNUSER}/app |
| 17 |
noblacklist ${RUNUSER}/openssh_agent |
| 18 |
noblacklist /tmp/ssh-* |
| 19 |
|
| 20 |
# Allow browser profiles, required for browser integration. |
| 21 |
noblacklist ${HOME}/.config/BraveSoftware |
| 22 |
noblacklist ${HOME}/.config/chromium |
| 23 |
noblacklist ${HOME}/.config/google-chrome |
| 24 |
noblacklist ${HOME}/.config/mozilla |
| 25 |
noblacklist ${HOME}/.config/vivaldi |
| 26 |
noblacklist ${HOME}/.local/share/torbrowser |
| 27 |
noblacklist ${HOME}/.mozilla |
| 28 |
|
| 29 |
blacklist /usr/libexec |
| 30 |
|
| 31 |
include disable-common.inc |
| 32 |
include disable-devel.inc |
| 33 |
include disable-exec.inc |
| 34 |
include disable-interpreters.inc |
| 35 |
include disable-programs.inc |
| 36 |
include disable-shell.inc |
| 37 |
include disable-xdg.inc |
| 38 |
|
| 39 |
# You can enable whitelisting for keepassxc by adding the below to your keepassxc.local. |
| 40 |
# If you do, you MUST store your database under ${HOME}/Documents/KeePassXC/foo.kdbx. |
| 41 |
#mkdir ${HOME}/Documents/KeePassXC |
| 42 |
#whitelist ${HOME}/Documents/KeePassXC |
| 43 |
# Needed for KeePassXC-Browser. |
| 44 |
#mkdir ${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts |
| 45 |
#mkfile ${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json |
| 46 |
#whitelist ${HOME}/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json |
| 47 |
#mkdir ${HOME}/.config/chromium/NativeMessagingHosts |
| 48 |
#mkfile ${HOME}/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json |
| 49 |
#whitelist ${HOME}/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json |
| 50 |
#mkdir ${HOME}/.config/google-chrome/NativeMessagingHosts |
| 51 |
#mkfile ${HOME}/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json |
| 52 |
#whitelist ${HOME}/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json |
| 53 |
#mkdir ${HOME}/.config/vivaldi/NativeMessagingHosts |
| 54 |
#mkfile ${HOME}/.config/vivaldi/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json |
| 55 |
#whitelist ${HOME}/.config/vivaldi/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json |
| 56 |
#mkdir ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts |
| 57 |
#mkfile ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json |
| 58 |
#whitelist ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json |
| 59 |
#mkdir ${HOME}/.config/mozilla/native-messaging-hosts |
| 60 |
#mkdir ${HOME}/.mozilla/native-messaging-hosts |
| 61 |
#mkfile ${HOME}/.config/mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json |
| 62 |
#mkfile ${HOME}/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json |
| 63 |
#whitelist ${HOME}/.config/mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json |
| 64 |
#whitelist ${HOME}/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json |
| 65 |
#mkdir ${HOME}/.cache/keepassxc |
| 66 |
#mkdir ${HOME}/.config/keepassxc |
| 67 |
#whitelist ${HOME}/.cache/keepassxc |
| 68 |
#whitelist ${HOME}/.config/keepassxc |
| 69 |
#whitelist ${HOME}/.config/KeePassXCrc |
| 70 |
#include whitelist-common.inc |
| 71 |
|
| 72 |
mkdir ${RUNUSER}/app/org.keepassxc.KeePassXC |
| 73 |
whitelist ${RUNUSER}/app/org.keepassxc.KeePassXC |
| 74 |
whitelist ${RUNUSER}/openssh_agent |
| 75 |
whitelist /tmp/ssh-* |
| 76 |
whitelist /usr/share/keepassxc |
| 77 |
include whitelist-run-common.inc |
| 78 |
include whitelist-runuser-common.inc |
| 79 |
include whitelist-usr-share-common.inc |
| 80 |
include whitelist-var-common.inc |
| 81 |
|
| 82 |
caps.drop all |
| 83 |
machine-id |
| 84 |
net none |
| 85 |
no3d |
| 86 |
nodvd |
| 87 |
nogroups |
| 88 |
noinput |
| 89 |
nonewprivs |
| 90 |
noroot |
| 91 |
nosound |
| 92 |
notv |
| 93 |
novideo |
| 94 |
protocol unix |
| 95 |
seccomp !name_to_handle_at |
| 96 |
seccomp.block-secondary |
| 97 |
tracelog |
| 98 |
|
| 99 |
private-bin keepassxc,keepassxc-cli,keepassxc-proxy |
| 100 |
# Note: private-dev prevents the program from seeing new devices (such as |
| 101 |
# hardware keys) on /dev after it has already started; add "ignore private-dev" |
| 102 |
# to keepassxc.local if this is an issue (see #4883). |
| 103 |
private-dev |
| 104 |
private-etc @x11 |
| 105 |
private-tmp |
| 106 |
|
| 107 |
dbus-user filter |
| 108 |
dbus-user.own org.freedesktop.secrets |
| 109 |
dbus-user.own org.keepassxc.KeePassXC.* |
| 110 |
dbus-user.talk com.canonical.Unity |
| 111 |
dbus-user.talk org.freedesktop.ScreenSaver |
| 112 |
dbus-user.talk org.gnome.ScreenSaver |
| 113 |
dbus-user.talk org.gnome.SessionManager |
| 114 |
dbus-user.talk org.xfce.ScreenSaver |
| 115 |
?ALLOW_TRAY: dbus-user.talk org.kde.StatusNotifierWatcher |
| 116 |
?ALLOW_TRAY: dbus-user.own org.kde.* |
| 117 |
# Add the next line to your keepassxc.local to allow notifications. |
| 118 |
#dbus-user.talk org.freedesktop.Notifications |
| 119 |
dbus-system filter |
| 120 |
dbus-system.talk org.freedesktop.login1 |
| 121 |
|
| 122 |
restrict-namespaces |
| 123 |
|
| 124 |
# Mutex is stored in /tmp by default, which is broken by private-tmp. |
| 125 |
join-or-start keepassxc |