Replies: 2 comments 1 reply
-
On a given language environment, there are usually 3 different categories of
I think that the runtime itself would ideally be more restricted than the That is, npm/yarn should have permission to install and remove packages, but Though this is off the top of my head; I haven't dealt with the specifics of |
Beta Was this translation helpful? Give feedback.
-
Follow-up. Several node.js security-related events have made 'headlines' somewhere before. By itself this is nothing new or surprising. The very recent protestware situation is probably one that got even wider attention for obvious reasons. IMO firejail can be another tool to help protect users and/or try to minimise potential damage. Currently (including potential future merge of pending PR #5058) this relies quite heavily on user actions, as none of the related profiles are enabled in firecfg. It's tempting to suggest flipping them on. But I'm at best a very occasional node.js user and testing one's own use cases is hardly sufficient. So if anyone is inclined to put our implementation to the test, that would be awesome. |
Beta Was this translation helpful? Give feedback.
-
The current node.js related profiles are implemented via several redirects, including the main nodejs-common.profile. As already indicated in #4172, this has a few shortcomings. Sadly that PR isn't moving for quite a while.
Some parts of the node.js stack like
gulp
,node-gyp
,npx
andsemver
don't have profiles. Another issue isnvm
. Although that has a profile, it is pretty much useless. Due to its implementation as a sourced shell function - not a executable binary - it isn't directly firejailable. It is however pretty easy to add support to the programs being called internally: curl, sha256sum, tar and wget.I've been testing a refactored setup that tries to simplify sandboxing a full node.js stack with Firejail for several weeks. Building on the fact that
gulp
,node-gyp
,npm
,npx
andsemver
are all scripts with the#!/usr/bin/env node
shebang, I opted to drop the redirect profiles. We can discuss this implementation here.This is the PR: #5051.
Beta Was this translation helpful? Give feedback.
All reactions