aboutsummaryrefslogtreecommitdiffstats
path: root/etc/profile-m-z/npm.profile
diff options
context:
space:
mode:
authorLibravatar Aidan Gauland <aidalgol@users.noreply.github.com>2021-01-09 09:51:41 +1300
committerLibravatar GitHub <noreply@github.com>2021-01-08 20:51:41 +0000
commit3203dd23a83fc45924b0b46e1bf204bafa878b33 (patch)
tree68a46d9fdff2212a45cfea0e76b291e36608dc6d /etc/profile-m-z/npm.profile
parentfbuilder: check Yama permissions (diff)
downloadfirejail-3203dd23a83fc45924b0b46e1bf204bafa878b33.tar.gz
firejail-3203dd23a83fc45924b0b46e1bf204bafa878b33.tar.zst
firejail-3203dd23a83fc45924b0b46e1bf204bafa878b33.zip
Add profile for npm (#3866)
* Add profile for npm * Apply suggestions from code review * Remove redundant blacklisting of Wayland. * Remove unnecessary noblacklist lines for nodejs. * Replace absolute paths to .inc files with filenames. * Remove unneeded dbus whitelisting. Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com> * Remove empty line To keep consistent with other profiles, remove the blank line after the header comment. Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com> * Add npm files to add-common-devel So that our addition of npm paths to disable-programs.inc dose not break IDEs, we need to unblacklist these same paths in allow-common-devel.inc. * Remove extra blank line * Add common whitelist includes to npm profile * Tighten npm profile Include disable-exec.inc, but allowing ${HOME}. * Remove whitelist-common.inc from npm profile whitelist-common breaks npm, and since we don't know where the user's npm projects will be, leave the whitelist-common include in a comment with a note about how to enable it for their setup. * Fix inverted commands Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com> * Fixes for whitelisting * Add login.defs to npm profile's private-etc Co-authored-by: Aidan Gauland <aidalgol+git@fastmail.net> Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
Diffstat (limited to 'etc/profile-m-z/npm.profile')
-rw-r--r--etc/profile-m-z/npm.profile64
1 files changed, 64 insertions, 0 deletions
diff --git a/etc/profile-m-z/npm.profile b/etc/profile-m-z/npm.profile
new file mode 100644
index 000000000..2136fb443
--- /dev/null
+++ b/etc/profile-m-z/npm.profile
@@ -0,0 +1,64 @@
1# Firejail profile for npm
2# Description: The Node.js Package Manager
3# This file is overwritten after every install/update
4# Persistent local customizations
5include npm.local
6# Persistent global definitions
7include globals.local
8
9blacklist /tmp/.X11-unix
10blacklist ${RUNUSER}
11
12noblacklist ${HOME}/.npm
13noblacklist ${HOME}/.npmrc
14
15noblacklist ${PATH}/bash
16noblacklist ${PATH}/dash
17noblacklist ${PATH}/sh
18
19ignore noexec ${HOME}
20
21include disable-common.inc
22include disable-exec.inc
23include disable-passwdmgr.inc
24include disable-programs.inc
25include disable-shell.inc
26include disable-xdg.inc
27
28# If you want whitelisting, change the line below to your npm projects directory
29# and uncomment the lines below.
30#mkdir ${HOME}/.npm
31#mkfile ${HOME}/.npmrc
32#whitelist ${HOME}/.npm
33#whitelist ${HOME}/.npmrc
34#whitelist ${HOME}/Projects
35#include whitelist-common.inc
36include whitelist-runuser-common.inc
37include whitelist-usr-share-common.inc
38include whitelist-var-common.inc
39
40caps.drop all
41ipc-namespace
42machine-id
43netfilter
44no3d
45nodvd
46nogroups
47nonewprivs
48noroot
49nosound
50notv
51nou2f
52novideo
53protocol unix,inet,inet6,netlink
54seccomp
55seccomp.block-secondary
56shell none
57
58disable-mnt
59private-dev
60private-etc alternatives,ca-certificates,crypto-policies,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,login.defs,mime.types,nsswitch.conf,pki,protocols,resolv.conf,rpc,services,ssl,xdg
61private-tmp
62
63dbus-user none
64dbus-system none