aboutsummaryrefslogtreecommitdiffstats
path: root/etc/profile-m-z/nodejs-common.profile
diff options
context:
space:
mode:
authorLibravatar glitsj16 <glitsj16@users.noreply.github.com>2021-05-08 15:27:30 +0000
committerLibravatar GitHub <noreply@github.com>2021-05-08 15:27:30 +0000
commit699a803f174662a8ec62442438bb0807e41d3971 (patch)
treef9b8e2a121e2fc8c4e91005ac97241922bc309ad /etc/profile-m-z/nodejs-common.profile
parentrevert comment changes from #4257 (#4258) (diff)
downloadfirejail-699a803f174662a8ec62442438bb0807e41d3971.tar.gz
firejail-699a803f174662a8ec62442438bb0807e41d3971.tar.zst
firejail-699a803f174662a8ec62442438bb0807e41d3971.zip
Node.js stack refactoring (#4255)
* Create node.profile * Create node-gyp.profile * refactor npm as redirect * Create npx.profile * Create nvm.profile * Create semver.profile * refactor yarn as redirect * collect node.js stack configuration in common profile * add ~/.nvm to node section * account for node-gyp python dependency * read-only ~/.nvm for node.js stack * blacklist ~/.nvm for node.js stack * move env var comment cfr. profile.template * Delete node-gyp.profile node-gyp is a shell script with a node shebang. We've got that covered via node.profile. * Delete npx.profile npx is a shell script with a node shebang. We've got that covered via node.profile. * Delete semver.profile semver is a shell script that calls node. We've got that covered via node.profile. * add node and nvm to new profiles section
Diffstat (limited to 'etc/profile-m-z/nodejs-common.profile')
-rw-r--r--etc/profile-m-z/nodejs-common.profile49
1 files changed, 45 insertions, 4 deletions
diff --git a/etc/profile-m-z/nodejs-common.profile b/etc/profile-m-z/nodejs-common.profile
index 4095337dd..fa69f9214 100644
--- a/etc/profile-m-z/nodejs-common.profile
+++ b/etc/profile-m-z/nodejs-common.profile
@@ -10,6 +10,20 @@ include nodejs-common.local
10blacklist /tmp/.X11-unix 10blacklist /tmp/.X11-unix
11blacklist ${RUNUSER} 11blacklist ${RUNUSER}
12 12
13ignore read-only ${HOME}/.npm-packages
14ignore read-only ${HOME}/.npmrc
15ignore read-only ${HOME}/.nvm
16ignore read-only ${HOME}/.yarnrc
17
18noblacklist ${HOME}/.node-gyp
19noblacklist ${HOME}/.npm
20noblacklist ${HOME}/.npmrc
21noblacklist ${HOME}/.nvm
22noblacklist ${HOME}/.yarn
23noblacklist ${HOME}/.yarn-config
24noblacklist ${HOME}/.yarncache
25noblacklist ${HOME}/.yarnrc
26
13ignore noexec ${HOME} 27ignore noexec ${HOME}
14 28
15include allow-bin-sh.inc 29include allow-bin-sh.inc
@@ -21,6 +35,32 @@ include disable-programs.inc
21include disable-shell.inc 35include disable-shell.inc
22include disable-xdg.inc 36include disable-xdg.inc
23 37
38# If you want whitelisting, change ${HOME}/Projects below to your node projects directory
39# and add the next lines to your nodejs-common.local.
40#mkdir ${HOME}/.node-gyp
41#mkdir ${HOME}/.npm
42#mkdir ${HOME}/.npm-packages
43#mkfile ${HOME}/.npmrc
44#mkdir ${HOME}/.nvm
45#mkdir ${HOME}/.yarn
46#mkdir ${HOME}/.yarn-config
47#mkdir ${HOME}/.yarncache
48#mkfile ${HOME}/.yarnrc
49#whitelist ${HOME}/.node-gyp
50#whitelist ${HOME}/.npm
51#whitelist ${HOME}/.npm-packages
52#whitelist ${HOME}/.npmrc
53#whitelist ${HOME}/.nvm
54#whitelist ${HOME}/.yarn
55#whitelist ${HOME}/.yarn-config
56#whitelist ${HOME}/.yarncache
57#whitelist ${HOME}/.yarnrc
58#whitelist ${HOME}/Projects
59#include whitelist-common.inc
60
61whitelist /usr/share/doc/node
62whitelist /usr/share/nvm
63whitelist /usr/share/systemtap/tapset/node.stp
24include whitelist-runuser-common.inc 64include whitelist-runuser-common.inc
25include whitelist-usr-share-common.inc 65include whitelist-usr-share-common.inc
26include whitelist-var-common.inc 66include whitelist-var-common.inc
@@ -46,10 +86,11 @@ shell none
46 86
47disable-mnt 87disable-mnt
48private-dev 88private-dev
49# May need to add `passwd` to `private-etc` below to enable debugging with some IDEs 89private-etc alternatives,ca-certificates,crypto-policies,group,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,passwd,pki,protocols,resolv.conf,rpc,services,ssl,xdg
50private-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 90#private-tmp
51# May need to be commented out in order to enable debugging with some IDEs
52private-tmp
53 91
54dbus-user none 92dbus-user none
55dbus-system none 93dbus-system none
94
95# Add the next line to your nodejs-common.local if you prefer to disable gatsby telemetry.
96#env GATSBY_TELEMETRY_DISABLED=1