sonic-buildimage/platform/marvell-armhf/sonic-platform-nokia/7215
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
..
scripts [Nokia ixs7215] Platform API fixes (#9025) 2021-10-27 09:57:56 +08:00
service [devices]: Add support for the Nokia-7215 platform (#5827) 2020-11-18 17:00:40 -08:00
sonic_platform [nokia] Replace os.system and remove subprocess with shell=True (#12100) 2022-12-01 12:12:50 -05:00
setup.py [devices]: Add support for the Nokia-7215 platform (#5827) 2020-11-18 17:00:40 -08:00