[GH-ISSUE #1823] disable-devel.inc does not blacklist python and node #1241

Closed
opened 2026-05-05 07:42:58 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @punksta on GitHub (Mar 22, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1823

firejail --profile="/etc/firejail/disable-devel.inc" node
firejail --profile="/etc/firejail/disable-devel.inc" npm
firejail --profile="/etc/firejail/disable-devel.inc" yarn
firejail --profile="/etc/firejail/disable-devel.inc" python
firejail --profile="/etc/firejail/disable-devel.inc" python3
firejail --profile="/etc/firejail/disable-devel.inc" javac
firejail --profile="/etc/firejail/disable-devel.inc" java

I think there is a lot languages which are missing there. Does it give any security when we have only few of them?

also: there is an option to disable bash?

Originally created by @punksta on GitHub (Mar 22, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1823 ``` firejail --profile="/etc/firejail/disable-devel.inc" node firejail --profile="/etc/firejail/disable-devel.inc" npm firejail --profile="/etc/firejail/disable-devel.inc" yarn firejail --profile="/etc/firejail/disable-devel.inc" python firejail --profile="/etc/firejail/disable-devel.inc" python3 firejail --profile="/etc/firejail/disable-devel.inc" javac firejail --profile="/etc/firejail/disable-devel.inc" java ``` I think there is a lot languages which are missing there. Does it give any security when we have only few of them? also: there is an option to disable `bash`?
gitea-mirror 2026-05-05 07:42:58 -06:00
Author
Owner

@Fred-Barclay commented on GitHub (Mar 22, 2018):

For python, we tried enabling it in d287140250, but disabled it in f374c79aa7. The issue with including it in disable-devel.inc is that lots of applications - hexchat, for instance - often need a python shell but don't need access to compilers like gcc, which are also blacklisted in disable-devel.inc.

Possibly we could consider a new disable-interpreters.inc or something like that with python, ruby, perl, node, and so on. Any thoughts @netblue30 @SkewedZeppelin @smitsohu ?

Anything with a private-bin filter that doesn't include bash will disable it. You could also do something like:
--blacklist=/bin/bash --blacklist=/usr/bin/bash but you'd need to make sure you blacklist all the paths to bash.

<!-- gh-comment-id:375351929 --> @Fred-Barclay commented on GitHub (Mar 22, 2018): For python, we tried enabling it in d287140250544a15b07fe2e13e8cd45f398e0d1e, but disabled it in f374c79aa7d8248cc8a44d773f140966030f30a8. The issue with including it in disable-devel.inc is that lots of applications - hexchat, for instance - often need a python shell but **don't** need access to compilers like gcc, which are also blacklisted in disable-devel.inc. Possibly we could consider a new `disable-interpreters.inc` or something like that with python, ruby, perl, node, and so on. Any thoughts @netblue30 @SkewedZeppelin @smitsohu ? Anything with a private-bin filter that doesn't include bash will disable it. You could also do something like: `--blacklist=/bin/bash --blacklist=/usr/bin/bash` but you'd need to make sure you blacklist all the paths to bash.
Author
Owner

@SkewedZeppelin commented on GitHub (Mar 22, 2018):

We should add javac, npm, and yarn to disable-devel.inc.

And a disable-interpreters.inc would be nice with java, python, and node. We should be able to add it to most profiles.

<!-- gh-comment-id:375404899 --> @SkewedZeppelin commented on GitHub (Mar 22, 2018): We should add javac, npm, and yarn to disable-devel.inc. And a disable-interpreters.inc would be nice with ~~java~~, python, and node. We should be able to add it to most profiles.
Author
Owner

@Fred-Barclay commented on GitHub (Mar 23, 2018):

@SkewedZeppelin ruby, perl, php in disable-interpreters? Php I'm least sure about.

<!-- gh-comment-id:375506446 --> @Fred-Barclay commented on GitHub (Mar 23, 2018): @SkewedZeppelin ruby, perl, php in disable-interpreters? Php I'm least sure about.
Author
Owner

@punksta commented on GitHub (Mar 23, 2018):

java isn't interpretable, maybe it'd better to name it disable-computer-languages?

<!-- gh-comment-id:375564117 --> @punksta commented on GitHub (Mar 23, 2018): java isn't interpretable, maybe it'd better to name it `disable-computer-languages`?
Author
Owner

@Fred-Barclay commented on GitHub (Mar 23, 2018):

Or maybe disable-compilers (to replace disable-devel) and disable-interpreters. But then java is a bit of a hybrid... I'm going to give myself a headache from overthinking. 😄

I'm thinking perl, python, ruby, php, node??? in disable-interpreters.
Gcc and all other c or c++ stuff, java, go, rust, openSSL, npm, node??? in disable-devel.

@SkewedZeppelin I'll try and submit a PR for review soon.

<!-- gh-comment-id:375759979 --> @Fred-Barclay commented on GitHub (Mar 23, 2018): Or maybe `disable-compilers` (to replace `disable-devel`) and `disable-interpreters`. But then java is a bit of a hybrid... I'm going to give myself a headache from overthinking. :smile: I'm thinking perl, python, ruby, php, node??? in disable-interpreters. Gcc and all other c or c++ stuff, java, go, rust, openSSL, npm, node??? in disable-devel. @SkewedZeppelin I'll try and submit a PR for review soon.
Author
Owner

@Fred-Barclay commented on GitHub (Mar 23, 2018):

Also is there a reason that we generally blacklist full paths to compilers and interpreters instead of using ${PATH}? We're already using ${PATH} in disable-common, and I suspect we should be using it in disable-devel/interpreters as well.

<!-- gh-comment-id:375760537 --> @Fred-Barclay commented on GitHub (Mar 23, 2018): Also is there a reason that we generally blacklist full paths to compilers and interpreters instead of using ${PATH}? We're already using ${PATH} in disable-common, and I suspect we should be using it in disable-devel/interpreters as well.
Author
Owner

@Fred-Barclay commented on GitHub (Apr 4, 2018):

@punksta We've added disable-interpreters in #1837
Cheers!

<!-- gh-comment-id:378470744 --> @Fred-Barclay commented on GitHub (Apr 4, 2018): @punksta We've added disable-interpreters in #1837 Cheers!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1241
No description provided.