sonic-buildimage/platform/marvell-armhf/sonic-platform-nokia/7215/sonic_platform
Mai Bui 2b3e884209
[nokia] Replace os.system and remove subprocess with shell=True (#12100)
Signed-off-by: maipbui <maibui@microsoft.com>
Dependency: [https://github.com/sonic-net/sonic-buildimage/pull/12065](https://github.com/sonic-net/sonic-buildimage/pull/12065)
#### Why I did it
`subprocess.Popen()` and `subprocess.run()` is used with `shell=True`, which is very dangerous for shell injection.
`os` - not secure against maliciously constructed input and dangerous if used to evaluate dynamic content
`getstatusoutput` is dangerous because it contains `shell=True` in the implementation
#### How I did it
Replace `os` by `subprocess`, use with `shell=False`
Remove unused functions
2022-12-01 12:12:50 -05:00
..
test [Nokia ixs7215] Platform API temperature threshold value fixes (#10372) 2022-04-07 22:44:31 +08:00
__init__.py
chassis.py [nokia] Replace os.system and remove subprocess with shell=True (#12100) 2022-12-01 12:12:50 -05:00
component.py [nokia] Replace os.system and remove subprocess with shell=True (#12100) 2022-12-01 12:12:50 -05:00
eeprom.py [Nokia ixs7215] Platform API fixes (#9025) 2021-10-27 09:57:56 +08:00
fan_drawer.py
fan.py [Nokia ixs7215] Fixes to support Debian bullseye (#10309) 2022-03-22 17:58:46 -07:00
platform.py
psu.py [nokia] Replace os.system and remove subprocess with shell=True (#12100) 2022-12-01 12:12:50 -05:00
sfp_event.py [nokia] Replace os.system and remove subprocess with shell=True (#12100) 2022-12-01 12:12:50 -05:00
sfp.py [nokia] Replace os.system and remove subprocess with shell=True (#12100) 2022-12-01 12:12:50 -05:00
thermal_actions.py
thermal_conditions.py
thermal_infos.py
thermal_manager.py
thermal.py [Nokia ixs7215] Platform API temperature threshold value fixes (#10372) 2022-04-07 22:44:31 +08:00
watchdog.py