sonic-buildimage/platform/mellanox/mlnx-platform-api/tests
Mai Bui 648ca075c7
[device/mellanox] Mitigation for security vulnerability (#11877)
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)
2022-10-06 17:51:31 -04:00
..
input_platform [Mellanox] Add NVIDIA copyright header for NVIDIA added files (#12130) 2022-10-02 11:34:24 +03:00
__init__.py [Mellanox] Add NVIDIA Copyright header to "mellanox" files (#8799) 2021-10-17 19:03:02 +03:00
conftest.py [Mellanox] Update NVIDIA License header for files changed since 1.1.2022 (#10289) 2022-03-23 13:19:25 +02:00
duplicate_action.json [Mellanox] Fix thermal control bugs (#4298) 2020-03-25 10:54:07 -07:00
duplicate_condition.json [Mellanox] Fix thermal control bugs (#4298) 2020-03-25 10:54:07 -07:00
empty_action.json [Mellanox] Fix thermal control bugs (#4298) 2020-03-25 10:54:07 -07:00
empty_condition.json [Mellanox] Fix thermal control bugs (#4298) 2020-03-25 10:54:07 -07:00
mock_eeprom_data [Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422) 2021-10-25 07:59:06 +03:00
mock_platform.py [Mellanox] Add NVIDIA Copyright header to "mellanox" files (#8799) 2021-10-17 19:03:02 +03:00
mock_psu_vpd [Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422) 2021-10-25 07:59:06 +03:00
policy_with_same_conditions.json [Mellanox] Optimize thermal control policies (#9452) 2022-01-19 11:44:37 +02:00
test_chassis.py [device/mellanox] Mitigation for security vulnerability (#11877) 2022-10-06 17:51:31 -04:00
test_cpu_thermal_control.py [Mellanox] Add CPU thermal control for Nvidia platforms (#10202) 2022-03-21 09:54:52 -07:00
test_eeprom.py [Mellanox] Enhance Platform API to support SN2201 - RJ45 ports and new components mgmt. (#10377) 2022-06-20 19:12:20 -07:00
test_fan_api.py [device/mellanox] Mitigation for security vulnerability (#11877) 2022-10-06 17:51:31 -04:00
test_firmware.py [Mellanox] Update NVIDIA License header for files changed since 1.1.2022 (#10289) 2022-03-23 13:19:25 +02:00
test_led.py [Mellanox] Enhance Platform API to support SN2201 - RJ45 ports and new components mgmt. (#10377) 2022-06-20 19:12:20 -07:00
test_module.py [Mellanox] Enhance Platform API to support SN2201 - RJ45 ports and new components mgmt. (#10377) 2022-06-20 19:12:20 -07:00
test_psu.py [device/mellanox] Mitigation for security vulnerability (#11877) 2022-10-06 17:51:31 -04:00
test_sfp_event.py [Mellanox] Refactor Mellanox platform API to support dynamic port configuration (#8422) 2021-10-25 07:59:06 +03:00
test_sfp.py [Mellanox] Provide dummy implementation for get_rx_los and get_tx_fault (#12231) 2022-09-30 09:38:05 +03:00
test_thermal_policy.py [Mellanox] Update NVIDIA License header for files changed since 1.1.2022 (#10289) 2022-03-23 13:19:25 +02:00
test_thermal.py [Mellanox] Enhance Platform API to support SN2201 - RJ45 ports and new components mgmt. (#10377) 2022-06-20 19:12:20 -07:00
test_utils.py [device/mellanox] Mitigation for security vulnerability (#11877) 2022-10-06 17:51:31 -04:00
thermal_policy.json [Mellanox] Optimize thermal control policies (#9452) 2022-01-19 11:44:37 +02:00