Skip to content
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

profiles: torbrowser-launcher: blacklist ~/.local/share/torbrowser #6640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cobratbq
Copy link
Contributor

@cobratbq cobratbq commented Feb 4, 2025

Added the path to tor-browser as used by torbrowser-launcher: ~/.local/share/torbrowser.

Actualy, this original entry for ${HOME}/opt/torbrowser seems to be oddly placed. There is an occurrence in disable-programs.profile for ${HOME}/.local/share/torbrowser already. Should the old entry be removed (or moved) instead? Did you guys start using disable-programs.profile at a later time?

@kmk3 kmk3 changed the title profile: add path to tor-browser used by torbrowser-launcher to disab… profiles: tor: blacklist ~/.local/share/torbrowser Feb 5, 2025
@kmk3 kmk3 changed the title profiles: tor: blacklist ~/.local/share/torbrowser profiles: torbrowser-launcher: blacklist ~/.local/share/torbrowser Feb 6, 2025
Copy link
Collaborator

@kmk3 kmk3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an occurrence in disable-programs.profile for
${HOME}/.local/share/torbrowser already. Should the old entry be removed
(or moved) instead? Did you guys start using disable-programs.profile at a
later time?

Good catch.

There seem to be many paths in ${HOME} related to the tor browser:

tor browser paths

$ git grep -IE '\$\{HOME\}.*/tor-?browser' -- \
  etc/inc/*.inc etc/profile*/*.profile
etc/inc/disable-common.inc:blacklist ${HOME}/.local/opt/tor-browser
etc/inc/disable-programs.inc:blacklist ${HOME}/.cache/torbrowser
etc/inc/disable-programs.inc:blacklist ${HOME}/.config/torbrowser
etc/inc/disable-programs.inc:blacklist ${HOME}/.local/share/torbrowser
etc/profile-a-l/keepassxc.profile:noblacklist ${HOME}/.local/share/torbrowser
etc/profile-a-l/keepassxc.profile:#mkdir ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts
etc/profile-a-l/keepassxc.profile:#mkfile ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc>
etc/profile-a-l/keepassxc.profile:#whitelist ${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepas>
etc/profile-m-z/tor-browser.profile:noblacklist ${HOME}/.local/opt/tor-browser
etc/profile-m-z/tor-browser.profile:mkdir ${HOME}/.local/opt/tor-browser
etc/profile-m-z/tor-browser.profile:whitelist ${HOME}/.local/opt/tor-browser
etc/profile-m-z/torbrowser-launcher.profile:noblacklist ${HOME}/.config/torbrowser
etc/profile-m-z/torbrowser-launcher.profile:noblacklist ${HOME}/.local/share/torbrowser
etc/profile-m-z/torbrowser-launcher.profile:mkdir ${HOME}/.config/torbrowser
etc/profile-m-z/torbrowser-launcher.profile:mkdir ${HOME}/.local/share/torbrowser
etc/profile-m-z/torbrowser-launcher.profile:whitelist ${HOME}/.config/torbrowser
etc/profile-m-z/torbrowser-launcher.profile:whitelist ${HOME}/.local/share/torbrowser
etc/profile-m-z/torbrowser.profile:mkdir ${HOME}/.cache/mozilla/torbrowser
etc/profile-m-z/torbrowser.profile:whitelist ${HOME}/.cache/mozilla/torbrowser
$ git grep -IE '\$\{HOME\}.*/tor-?browser' -- \
  etc/inc/*.inc etc/profile*/*.profile |
  sed -E 's/[^ ]+ //' | LC_ALL=C sort -u
${HOME}/.cache/mozilla/torbrowser
${HOME}/.cache/torbrowser
${HOME}/.config/torbrowser
${HOME}/.local/opt/tor-browser
${HOME}/.local/share/torbrowser
${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts
${HOME}/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json

Since these are program-specific paths and most are already in
disable-programs, maybe it's best to just move the relevant path in
disable-common to disable-programs.

@rusty-snake

Any thoughts on this?

@rusty-snake
Copy link
Collaborator

Looks like the entry in disable-common goes back to me writing disable-common rather disable-programs in #4781. I'm not sure if it had a reason or just typed the wrong thing.

One could argued that it is more sensitive as it is Tor and not only program data but a full program installation that (I.e. writing to files that will be executed). However this is also true for various other native/bash/python/lua/…-plugins of other programs. More aggressive read-onlying dotfiles would be the better approach.

@kmk3
Copy link
Collaborator

kmk3 commented Feb 7, 2025

Looks like the entry in disable-common goes back to me writing disable-common
rather disable-programs in #4781. I'm not sure if it had a reason or just
typed the wrong thing.

One could argued that it is more sensitive as it is Tor and not only program
data but a full program installation that (I.e. writing to files that will be
executed). However this is also true for various other
native/bash/python/lua/…-plugins of other programs.

Yup, I had the same thoughts.

More aggressive read-onlying dotfiles would be the better approach.

Agreed, it would be good to increase that in general, especially since it's not
trivial to check which dotfiles may (now or in the future) allow running
arbitrary commands.

@cobratbq

For this PR, can you make it just move the path in disable-common to
disable-programs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants