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 [Nokia ixs7215] Platform API 2.0 improvements (#6787) 2021-02-23 09:25:14 -08:00
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 [Nokia ixs7215] Add support for SFP eeprom type_abbrv_name attribute (#8772) 2021-09-16 17:07:06 +08:00
fan.py [Nokia ixs7215] Fixes to support Debian bullseye (#10309) 2022-03-22 17:58:46 -07:00
platform.py [devices]: Add support for the Nokia-7215 platform (#5827) 2020-11-18 17:00:40 -08:00
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 [devices]: Add support for the Nokia-7215 platform (#5827) 2020-11-18 17:00:40 -08:00
thermal_conditions.py [devices]: Add support for the Nokia-7215 platform (#5827) 2020-11-18 17:00:40 -08:00
thermal_infos.py [devices]: Add support for the Nokia-7215 platform (#5827) 2020-11-18 17:00:40 -08:00
thermal_manager.py [devices]: Add support for the Nokia-7215 platform (#5827) 2020-11-18 17:00:40 -08:00
thermal.py [Nokia ixs7215] Platform API temperature threshold value fixes (#10372) 2022-04-07 22:44:31 +08:00
watchdog.py [Nokia ixs7215] Watchdog timer support (#8377) 2021-08-11 14:23:05 +08:00