sonic-buildimage/platform/broadcom/sonic-platform-modules-ruijie/b6510-48vs8cq
Mai Bui 5238bd78af [ruijie] Replace os.system and remove subprocess with shell=True (#12107)
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
1. `getstatusoutput` is used without a static string and it uses `shell=True`
2. `subprocess()` - when using with `shell=True` is dangerous. Using subprocess function without a static string can lead to command injection.
3. `os` - not secure against maliciously constructed input and dangerous if used to evaluate dynamic content.
#### How I did it
1. use `getstatusoutput` without shell=True
2. `subprocess()` - use `shell=False` instead. use an array string. Ref: [https://semgrep.dev/docs/cheat-sheets/python-command-injection/#mitigation](https://semgrep.dev/docs/cheat-sheets/python-command-injection/#mitigation)
3. `os` - use with `subprocess`
2022-12-10 10:33:21 +08:00
..
config [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
modules/driver [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
scripts [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
sonic_pcie [ruijie] Replace os.system and remove subprocess with shell=True (#12107) 2022-12-10 10:33:21 +08:00
sonic_platform [ruijie] Replace os.system and remove subprocess with shell=True (#12107) 2022-12-10 10:33:21 +08:00
systemd [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
LICENSE [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
MAINTAINERS [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
Makefile [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
README.md [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00
setup.py [Ruijie] Add ruijie platform & device (#4954) 2021-02-24 16:45:27 -08:00

sonic-platform-modules-ruijie

Device drivers for support of ruijie platform for the SONiC project