Signed-off-by: maipbui <maibui@microsoft.com> Dependency: [PR (#12065)](https://github.com/sonic-net/sonic-buildimage/pull/12065) needs to merge first. #### Why I did it `subprocess.Popen()` and `subprocess.check_output()` is used with `shell=True`, which is very dangerous for shell injection. #### How I did it Disable `shell=True`, enable `shell=False` #### How to verify it Tested on DUT, compare and verify the output between the original behavior and the new changes' behavior. [testresults.zip](https://github.com/sonic-net/sonic-buildimage/files/9550867/testresults.zip) |
||
---|---|---|
.. | ||
input_platform | ||
__init__.py | ||
conftest.py | ||
duplicate_action.json | ||
duplicate_condition.json | ||
empty_action.json | ||
empty_condition.json | ||
mock_eeprom_data | ||
mock_platform.py | ||
mock_psu_vpd | ||
policy_with_same_conditions.json | ||
test_chassis.py | ||
test_cpu_thermal_control.py | ||
test_eeprom.py | ||
test_fan_api.py | ||
test_firmware.py | ||
test_led.py | ||
test_module.py | ||
test_psu.py | ||
test_sfp_event.py | ||
test_sfp.py | ||
test_thermal_policy.py | ||
test_thermal.py | ||
test_utils.py | ||
thermal_policy.json |