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

Unsafe installation practices #123

Open
hasufell opened this issue Aug 27, 2024 · 2 comments
Open

Unsafe installation practices #123

hasufell opened this issue Aug 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@hasufell
Copy link

This package is unsafe to install.

WoeUSB-ng/setup.py

Lines 15 to 30 in 18e8918

def post_install():
path = '/usr/local/bin/woeusbgui' # I give up, I have no clue how to get bin path that is used by pip
shutil.copy2(this_directory + '/WoeUSB/woeusbgui', path) # I'll just hard code it until someone finds better way
shutil.copy2(this_directory + '/miscellaneous/com.github.woeusb.woeusb-ng.policy', "/usr/share/polkit-1/actions")
try:
os.makedirs('/usr/share/icons/WoeUSB-ng')
except FileExistsError:
pass
shutil.copy2(this_directory + '/WoeUSB/data/icon.ico', '/usr/share/icons/WoeUSB-ng/icon.ico')
shutil.copy2(this_directory + '/miscellaneous/WoeUSB-ng.desktop', "/usr/share/applications/WoeUSB-ng.desktop")
os.chmod('/usr/share/applications/WoeUSB-ng.desktop',
stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH | stat.S_IEXEC) # 755

Paths are hardcoded and the README suggests to use sudo for installation. Pip user installation is broken.

IMO, such packages should be rejected from Pip.

@brlin-tw brlin-tw added the bug Something isn't working label Aug 27, 2024
@brlin-tw
Copy link
Member

Hello, thanks for your bug report. Feel free to submit patches that can improve this situation if you're able to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@hasufell @brlin-tw and others