-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On the fly, request/permission based profile building #5079
Comments
Please open separate issues for these problems you're facing. It helps us improve the profiles for all users, even if your use cases are very personal. The freetube profile for example is designed for using the internal player. So you would need to add mpv to private-bin to support that. This is just one example, but it's worth the effort IMO.
You can use the |
First of all, thanks for responding! It means a lot!
I might understand that you guys are trying to build a library for the application. But there are so many of them. My intend wasn't to post an issue but to illustrate how you can enhance upon the profiling aspect of firejail.
They don't work as intended. As a refresher I just tried building new profiles with it. Ultimately I had to copy the template and make the profile from scratch. But then I was expecting to refine the profile through build, which didn't go so well. I'm sure I'm doing something wrong. For instance: Which works. P.S.: For some unknown reason only absolute path for appimages is working. Interestingly below mentioned command didn't even read my globals.local
|
Fair enough, no problem.
Noticing your examples are using AppImages, it might be worthwhile to check your Firejail version. The build options got appimage support only recently via #4878. Not sure OTOH if that made it into the latest release. To make sure you could give building from git a try. Regarding your Joplin examples. You can create your own custom profiles in ~/.config/firejail, no problem doing so. But the --build=foo option is not intended to use an already existing profile AFAIK. At least that doesn't make much sense, as its purpose is to create one from scratch. So I'd go for something like; |
I'm using firejail version 0.9.68 I tried out your step:
Then ran the appimage with the created profile:
|
I also tried using the firetools configuration wizard. No luck |
Hmm, KeePassXC-2.7.0-x86_64.AppImage worked! But the profile created is barely restricted. EDIT:
|
TBH It is out of dated and hasn't seen much development for a long time. IMHO we should just remove it from firejail (the binary) and develop an external tool for profile building (in a language which has friendlier support for string parsing & co like python. |
What I mean is something like
|
Nice 👍 |
Python is really much much better than C for tasks like this. https://github.com/rusty-snake/firejail-profile-builder |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
It's still in development.
It will never get the quality of a handwritten profile.
is an electron app, this will need special handling. We will need to detect this. |
If you did not disable unprivileged userns, it may work now with electron programs. |
Here's something I found relevant: The interesting and the interactive part I found was globbing. You can glob the directory and tell apparmor how much access the application has, and apply it to the profile using By far I have tried it on Firefox and few other frequently used applications and the process when implemented correctly can provide finer result I followed these pages: During the profile generating process |
I have been using firejail for couple of months. At first it was quite impressive and was exactly what I was looking for building restriction around applications. But what I lack is the way of finding the exact resource which the application requires and doing my own due diligence to solve various tweaks.
For instance, keepassxc, if jailed causes issues for chromium; jailing free tube restricts usage of external player like mpv; restricting mpv won't allow me to use btfs and stream and watch on the fly.
What I would like to see is building permissions for a jailed app. If I'm trying to do something which is in conflict with the rules, ask, and update the profile or local file depending on my choice. In this way, building profile would be easy, like using uBO on hard mode, and I don't mind that cumbersome effort as much as how much intuitive it is!
The text was updated successfully, but these errors were encountered: