Opened 4 years ago
Last modified 4 years ago
#5528 assigned enhancement
Remove pywin32 and wmi dependencies used by bug reporter on Windows
Reported by: | Tom Goddard | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | Platform | Version: | |
Keywords: | Cc: | chimerax-programmers | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
We've been getting github security warnings about pywin32 in ChimeraX. It is only used by wmi. The wmi module is only used by bug reporter to provide the following information in Windows bug reports.
Manufacturer: Micro-Star International Co., Ltd.
Model: GS65 Stealth Thin 8RF
OS: Microsoft Windows 10 Pro (Build 19041)
Memory: 34,195,668,992
MaxProcessMemory: 137,438,953,344
CPU: 12 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
OSLanguage: en-US
Most of this information can be obtained from the built-in platform module and the psutil module that ChimeraX uses on Mac and Linux. The OS and physical memory and language are the most useful and all available. Some processor info is available (platform.processor() -> 'Intel64 Family 6 Model 158 Stepping 10, GenuineIntel'). The manufacturer and model name are not available from standard python modules or psutil.
I suggest we remove pywin32 and wmi. pywin32 is 9 Mbytes compressed and 20 Mbytes uncompressed which is excessive for getting the computer model name in a bug report.
Change History (2)
follow-up: 2 comment:2 by , 4 years ago
Yes GitHub says pywin32 needs version 301 or newer "RBVI / ChimeraX Known security vulnerabilities detected Dependency pywin32 Version < 301 Upgrade to ~> 301 Defined in app_requirements.txt Vulnerabilities CVE-2021-32559 Moderate severity" Of course we could update that. But the issue is really that we are adding 20 Mbytes to our application in order to get the computer model name. In ChimeraX I thought I responded to all the graphics errors, so I am a bit confused about how you have relied on the knowing the computer model in replying to graphics problems. The model name can be obtained by running a subprocess using the Windows command systeminfo, but I do not think this is worth the effort.