sonic-buildimage/platform/broadcom/sonic-platform-modules-ragile/ra-b6920-4s/sonic_platform
Mai Bui 6759ad27b5 [device/ragile] Mitigation for security vulnerability (#11744)
Signed-off-by: maipbui <maibui@microsoft.com>
#### Why I did it
The [xml.etree.ElementTree](https://docs.python.org/3/library/xml.etree.elementtree.html#module-xml.etree.ElementTree) module is not secure against maliciously constructed data.
`os` - not secure against maliciously constructed input and dangerous if used to evaluate dynamic content
`subprocess.getstatusoutput` is dangerous because include shell=True in the implementation
#### How I did it
Remove xml. Use [lxml](https://pypi.org/project/lxml/) XML parsers package that prevent potentially malicious operation.
Replace `os` by `subprocess`
Use command as an array instead of string
Use `getstatusoutput_noshell` in `sonic_py_common` lib
2022-12-10 10:33:21 +08:00
..
__init__.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
chassis.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
common.py [device/ragile] Mitigation for security vulnerability (#11744) 2022-12-10 10:33:21 +08:00
component.py [device/ragile] Mitigation for security vulnerability (#11744) 2022-12-10 10:33:21 +08:00
config.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
eeprom.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
fan_drawer.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
fan.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
logger.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
pcie.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
platform.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
psu.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
regutil.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
rotor.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
sfp.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
thermal.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00
watchdog.py [ragile] support 32c and 4s platform (#8824) 2021-11-17 23:49:06 -08:00