mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3447] Replace whitelist and blacklist commands with better terms #2165
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2165
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ClemMakesApps on GitHub (Jun 2, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3447
Since
Whitelist/Blacklisthave connotations about value and map to racial terms, we should replace those commands in this project withAllowlistandDenylistor something similar.@netblue30 commented on GitHub (Jun 3, 2020):
Are you kidding?
@Fred-Barclay commented on GitHub (Jun 4, 2020):
@ClemMakesApps I appreciate the concern but let's don't go down this path. Our terminology is based upon the behavior/functionality of the code, nothing more, and reflects accepted terminology. There's no need to change code which is intrinsically neutral based upon non-existent connotations to the ratio of melanin in people's skin.
@NicoleSchwartz commented on GitHub (Jun 5, 2020):
@Fred-Barclay It doesn't matter what the original intent was. People do have a negative reaction to these terms. There is no justification for keeping it.
Over time, although you may intend them neutrally they do have negative impact. Many projects and groups have moved to the equally descriptive terms that avoid making people uncomfortable but are still equally descriptive. see https://github.com/rails/rails/issues/33677
"To compound the issue, it is also striking how often the term “whitelist” is used for a supposedly good, respectable, or safe list of publishers [20, 22, 27]. The racism in such “black is bad, white is good” metaphors is inappropriate and needs to cease. The black-white dualism explicit in these binary terms is often associated with Western thinking that is usually traced back to the work of Rene Descartes. Although the epistemological dualism of Descartes may be seen in earlier works by Plato and Aristotle, this way of thinking is often associated with the Enlightenment and the subsequent scientific revolution and industrial development [28–30]. Thus, a foundational ontological dualism accepted by many people in Western cultures includes the supposedly “natural” divides between subject-object, body-spirit, human-nature, and self-other. Such dualism extends into our conceptions of good-evil, sacred/divine-profane, and civilized-heathen/barbarian [31]." https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6148600/
@ghost commented on GitHub (Jun 5, 2020):
Some do and some don't, it's all in the 'Eye Of The Beholder'. There's no justification for not keeping it either, if this is nothing more than a plea to change a few words and call it quits. The conclusions drawn, and the subsequent (disputable) history lesson on ontological dualism feel out of place. Quoting research examining the emerging literature surrounding
predatory publishingmight buy one some 'social capital' (to quote another famous French male theorist), but what good does that bring besides a few likes?Regardless of the philosophy one subscribes to (if any), I wonder if anyone here actually believes that changing terminology would make supported applications run any more secure? This project is open to PR's, which are always reviewed on their merit in relation to the goal: reducing potential privacy/security risks when using Linux applications on a daily basis. Feel free to open. Another option is forking, like glimpse-editor did for example.
@rusty-snake commented on GitHub (Jun 7, 2020):
noblacklist/blacklist/whitelistare the biggest challenge when learning to customize firejail-profiles. Regardless of the original idea, this is also a reasons to change them.What is currently difficult?
~/foois still unaccessible. (Addingwhitelist ${HOME}/foobreaks everything in non-whitelisting profiles.)In order to allow baz in this profile, you need to add
noblacklistandwhitelist.My suggestion for simplifying:
blacklist->deny(orblock)noblacklist/whitelist->allowwhitelist->enable-whitelisting(orrequire-explicit-allow)Examples:
Old:
New:
Still uncertain
Maybe
enable-whitelisting-in ${HOME},enable-whitelisting-in /var, ... would be better.Reasons against it
It's a breaking change.
@topimiettinen commented on GitHub (Jun 7, 2020):
Usually in security terminology
whitelistlists stuff that is only allowed, the rest is denied. This means that there's an implicitdeny alldirective, or it could be explicit. Likewise, withblacklistthere's implicit or explicitallow alland then the list specifies denied items. In Firejail the directives doesn't match this (like @rusty-snake showed), so if there would be a change (I wouldn't be bothered to change anything just for the reasons OP gave), this could be an opportunity to improve.@kris7t commented on GitHub (Jun 7, 2020):
@rusty-snake I for one would support the
blacklist->block,noblacklist/whitelist->allow,whitelist->require-explicit-allow-interminology change, so that we can clean up the confusion aboutnoblacklist/whitelistin profiles (enable-whitelisting-inwouldn't make much sense, if there is nowhitelistkeyword, though).If I understand correctly, this wouldn't really be a breaking change, since we can just interpret the original commands and emit warnings to help users with the migration. Eventually, we could deprecate
blacklist/noblacklist/whitelistand achieve whitelisting profile bliss.There could also be arguments having "whitelisting" /
deny allprofiles as a default (and something likeimplicit-allow-into disable it), but I guess that would be a breaking change indeed.@rusty-snake commented on GitHub (Jun 7, 2020):
👍
We can the remove nodbus and these in 0.9.66.
I would favour
ignore require-explicit-allow ${HOME}, usingignoreseems to be the firejail-way in the most places.BTW: such a whitelist on/off switch will be very usefull
Related issues: (mostly affected through
require-explicit-allow /...)#504: whitelist in ~/.local/share and other (mostly dotfiles) subdirs of $HOME
#3189 & #2041: whitelist in /run and others
#3041: This issue would be simplyfied
#2882:
nowhitelist->blockorignore allow ...;; This issue can be closed then, because whitelist on/off has now its own switch.@Fred-Barclay commented on GitHub (Jun 7, 2020):
Sounds like some solid technical reasons for a change 😄
I would suggest we don't touch this until 0.9.64 is tagged, make the changes for 0.9.65/0.9.66, and remove in 0.9.68.
EDIT: assuming we made these changes
EDIT 2: should we reopen this issue?
@ClemMakesApps commented on GitHub (Jun 8, 2020):
It's a shame that the original premise wasn't deemed sufficient enough for a change but I'm glad this change is still happening even if it is for another reason.
@rusty-snake commented on GitHub (Jun 8, 2020):
I would say yes.
@Fred-Barclay commented on GitHub (Jun 8, 2020):
@ClemMakesApps Thanks for bringing it to our attention! Even if we disagree on the premises it seems a change was needed 😄
@netblue30 commented on GitHub (Jun 13, 2020):
Let's wait for a while to see in what direction the big guys are going, so we don't have to change it again in a few months. Whitelist/blacklist are heavily used in various places:
@topimiettinen commented on GitHub (Jun 14, 2020):
With
allow/denyI was thinking about Apache config (Order Allow, Deny; Deny from x; Allow from y) but it seems that modern 2.4 syntax usesRequire.Examples from similar, rather old (1990s) software using
allowanddeny:AllowGroup, AllowUser, DenyGroup, DenyUser./etc/hosts.allowand/etc/hosts.deny.MAC systems:
denykeyword.allowkeyword (everything not allowed is forbidden). There's alsoneverallowbut it's more likeassert()function in C.Firewalls:
ACCEPT,DROPandREJECT.accept,dropand reject.<accept>,<drop>and<reject>.allowanddeny.permitanddeny.IMHO white and black are used in white/blacklists without much of a preference, both are "good" and the "evil" is not using either. Whitelisting is preferred in many cases, but there are also situations where blacklisting is better.
@ghost commented on GitHub (Jun 14, 2020):
Now this. It's going to be a hell of a summer this time around...
@rusty-snake commented on GitHub (Jun 14, 2020):
https://tools.ietf.org/html/draft-knodel-terminology-01
https://bugs.python.org/issue34605
@laniakea64 commented on GitHub (Jul 19, 2020):
As someone who has written firejail profiles since firejail 0.9.38 and STILL sometimes gets tripped up by this, if I could expand on @rusty-snake suggestion above?
I'm glad something will be done about that. Though I have few technical concerns about the current suggestion as-is. For one, I'm not sure
require-explicit-allow-inaccurately describes that functionality:require-explicit-allow-inseems to say that the files and directories will be there-but-blocked by default. But in reality they are completely absent and their paths are not banned by default.And IIUC the suggestion above would take away the possibility provided by current
blacklist+whitelist: to deliberately expose a file or directory in the sandbox while denying access to it. I had this as part of my setup when I had multiple profiles for SeaMonkey, with a different firejail profile for each SeaMonkey profile.So here's a tweak of @rusty-snake suggestion that would
blacklist->denynoblacklist+whitelist->allownoblacklistalone ->ignore denywhitelistalone ->exposeAnd the new directive to enable the functionality currently called "whitelisting":
default-mask.(I would think
exposewould have no effect where nodefault-maskdirective is applied. Not sure what's best forallowin that case, should it be equivalent toignore deny?)Taking the example above:
Suggested: there would be two ways to do this -
or
@Boruch-Baum commented on GitHub (Jul 23, 2020):
Add VMware to the list of major players seeing fit to step up.
@rusty-snake commented on GitHub (Aug 30, 2020):
I recently thought about @laniakea64 ideas in https://github.com/netblue30/firejail/issues/3447#issuecomment-660569123. Based on this I extend my https://github.com/netblue30/firejail/issues/3447#issuecomment-640246145 draft with
deny-expose/deny-exposedwith makes a file present but inaccessible in whitelisting-profiles.enable-whitelisting/require-explicit-allow->mask ${HOME}it is much shorter, also talking about masked-profiles is clearer.blacklist-nolog->deny-nologAbout the implementation version. firejail 0.9.64 should not have it, it should be released in the next week (but not before the appimage bug is fixed).
Then we can implement it. I have no problem when we replace it without backward-compatibility. And provide a transition-script/flag. We can then move from a felt 0.9.VERSION[.PATCH] version-shema to firejail 1.0 🎆 .
@topimiettinen commented on GitHub (Aug 30, 2020):
+1 for
mask. How aboutunmask/deny-unmaskinstead ofexpose/deny-exposethen?@rusty-snake commented on GitHub (Aug 30, 2020):
So where are we?
allow ${HOME}/foo: access to $HOME/foo is always alloweddeny ${HOME}/bar: access to $HOME/bar is always deniedIf a file has a
allowand adenyrule, the first will win (i.e. later rules are ignored). This is necessary for .local-overrides to work.mask ${HOME}: mount a tmpfs over $HOME and bind-mount allowed files.TODO: Does
maskneed restrictions?deny-exposed ${HOME}/foobar: access to $HOME/foobar is denied, but $HOME is visible ifmaskis used.I don't care if we call it
deny-expose(d)ordeny-unmask.unmasksound more as it is related to mask and not deny.In addition:
Why do we need
mkdir+whitelistall the time?Proposal:
allowimpliesmkdirifmaskis used. Aallow-nocreatecan be used to opt-out.Examples:
Old:
New:
@laniakea64 commented on GitHub (Aug 31, 2020):
I see this could be helpful for the typical case. But wouldn't it be confusing if someone wanted to allow a file that does not yet exist?
With the current proposal, that would look like -
That confusion could be alleviated by, in addition to
allowandallow-nocreate, also having anallow-filedirective to implymkfileinstead ofmkdiron non-existant wheremaskis used.@rusty-snake commented on GitHub (Oct 22, 2020):
or we use
allow/allow-dirandallow-fileandallow-nocreate(we need this for e.g. socktes).Now 0.9.64 is out. Let's go.
@smitsohu commented on GitHub (Nov 19, 2020):
There is now an industry wide effort
https://inclusivenaming.org/
@netblue30 commented on GitHub (Dec 7, 2020):
I'll add this one from Linux kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=49decddd39e5f6132ccd7d9fdc3d7c470b0061bb
@rusty-snake commented on GitHub (Jan 8, 2021):
Before I forget it again to comment. The
noblacklist|whitelist->allowchange must work like this.old:
new:
@netblue30 commented on GitHub (Jul 1, 2021):
Moving the discussion here: https://github.com/netblue30/firejail/issues/4379
@samuelfmlourenco commented on GitHub (Feb 18, 2022):
This is unproductive and very subjective. My two cents: it will lead to confusion and to configurations that will no longer work after the update. If this is a real issue, then you should release a major version, because it will not be backwards compatible with legacy config scripts.