This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/files/image_config/monit
Mai Bui 61a085e55e
Replace os.system and remove subprocess with shell=True (#12177)
Signed-off-by: maipbui <maibui@microsoft.com>
#### Why I did it
`subprocess` 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
#### How I did it
remove `shell=True`, use `shell=False`
Replace `os` by `subprocess`
2022-11-04 10:48:51 -04:00
..
conf.d [auto-ts] add memory check (#10433) 2022-06-20 09:39:05 -07:00
container_checker Add Structured Events w/ YANG Models (#12270) 2022-10-09 20:23:31 -07:00
memory_checker Replace os.system and remove subprocess with shell=True (#12177) 2022-11-04 10:48:51 -04:00
monitrc [Monit] Delay start of monitoring for 5 minutes (#4281) 2020-03-19 14:14:47 -07:00
restart_service Replace os.system and remove subprocess with shell=True (#12177) 2022-11-04 10:48:51 -04:00