Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

address a security vulnerability in pyinstaller < 3.6 #5052

Merged
merged 7 commits into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ altgraph==0.16.1
future==0.16.0
macholib==1.11
pefile==2017.11.5
PyInstaller==3.3.1
PyInstaller==3.6
23 changes: 0 additions & 23 deletions scripts/pyinstaller/hooks/hook-Crypto.py

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/pyinstaller/hooks/hook-cytoolz.py

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/pyinstaller/hooks/hook-eth_hash.py

This file was deleted.

24 changes: 20 additions & 4 deletions scripts/pyinstaller/hooks/hook-golem.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
from PyInstaller.utils.hooks import collect_submodules
import os
import glob
from PyInstaller.compat import is_win
from PyInstaller.utils.hooks import (
get_module_file_attribute,
collect_submodules,
)


hiddenimports = collect_submodules('golem') + \
collect_submodules('apps') + \
collect_submodules('dns') + \
collect_submodules('os_win') + \
['Cryptodome', 'xml', 'scrypt', 'mock']
collect_submodules('dns')

datas = [
('loggingconfig.py', '.'),
Expand Down Expand Up @@ -40,3 +45,14 @@
'scripts/virtualization'),
('scripts/virtualization/get-hyperv-state.ps1', 'scripts/virtualization')
]

# copy of the native `hooks/hook-numpy.py`, so it will also search DLLs/
binaries = []

if is_win:
extra_dll_locations = ['DLLs']
for location in extra_dll_locations:
dll_glob = os.path.join(os.path.dirname(
get_module_file_attribute('numpy')), location, "*.dll")
if glob.glob(dll_glob):
binaries.append((dll_glob, "."))
1 change: 1 addition & 0 deletions scripts/pyinstaller/hooks/hook-mock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hiddenimports = ['mock']
35 changes: 0 additions & 35 deletions scripts/pyinstaller/hooks/hook-numpy.core.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from PyInstaller.utils.hooks import collect_submodules

hiddenimports = collect_submodules('PIL')
hiddenimports = collect_submodules('os_win')
1 change: 1 addition & 0 deletions scripts/pyinstaller/hooks/hook-scrypt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hiddenimports = ['scrypt']
10 changes: 0 additions & 10 deletions scripts/pyinstaller/hooks/hook-web3.py

This file was deleted.