Debian Codegraph @

includes/shell/firejail.profile

raw
1 # Firejail profile used by MediaWiki when shelling out
2 # Most rules are applied via command-line flags controlled by the
3 # Shell::RESTRICTION_* constants.
4 # Rules added to this file must be compatible with every command that could
5 # be invoked. If something might need to be disabled, then it should be added
6 # as a Shell:RESTRICTION_* constant instead so that commands can opt-in/out.
7
8 # See <https://firejail.wordpress.com/features-3/man-firejail-profile/> for
9 # syntax documentation.
10
11 # Optionally allow sysadmins to set extra restrictions that apply to their
12 # MediaWiki setup, e.g. disallowing access to extra private directories.
13 include /etc/firejail/mediawiki.local
14
15 # Include any global firejail customizations.
16 include /etc/firejail/globals.local
17
18 # Drop all capabilities
19 caps.drop all
20
21 # Disallow system directories
22 blacklist /sbin
23 blacklist /usr/sbin
24 blacklist /usr/local/sbin
25
26 # Blacklist /run which typically contains many exploitable UNIX sockets. But
27 # don't blacklist /run/firejail which firejail needs. Using a glob means that
28 # the files and directories under /run are mounted separately, which allows
29 # the noblacklist directive to work. (T262364)
30 noblacklist /run/firejail
31 blacklist /run/*
32
33 # Disallow system files
34 blacklist /etc/shadow
35 blacklist /etc/ssh
36 blacklist /root
37
38 # Disallow system management
39 blacklist ${PATH}/umount
40 blacklist ${PATH}/mount
41 blacklist ${PATH}/fusermount
42 blacklist ${PATH}/su
43 blacklist ${PATH}/sudo
44 blacklist ${PATH}/xinput
45 blacklist ${PATH}/evtest
46 blacklist ${PATH}/xev
47 blacklist ${PATH}/strace
48 blacklist ${PATH}/nc
49 blacklist ${PATH}/ncat