sonic-buildimage/device/celestica/x86_64-cel_seastone-r0
Mai Bui 51a1eb112b
[device/celestica] Mitigation for command injection vulnerability (#11740)
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
1. `eval()` - not secure against maliciously constructed input, can be dangerous if used to evaluate dynamic content. This may be a code injection vulnerability.
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.
4. `is` operator - string comparison should not be used with reference equality.
5. `globals()` - extremely dangerous because it may allow an attacker to execute arbitrary code on the system
#### How I did it
1. `eval()` - use `literal_eval()`
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`
4. `is` - replace by `==` operator for value equality
5. `globals()` - avoid the use of globals()
2022-12-09 10:30:20 -05:00
..
Celestica-DX010-C32 Enable Dx010 LPM (#12642) 2022-11-09 08:15:41 -08:00
Celestica-DX010-D48C8 Enable Dx010 LPM (#12642) 2022-11-09 08:15:41 -08:00
led-code [Celestica]: Update port led code for seastone-xp (#2476) 2019-01-23 18:44:19 -08:00
plugins [pcie.yaml] Move pcie configuration file path to platform directory (#6475) 2021-02-21 08:27:37 -08:00
Seastone-DX010 [DPB Seastone] On boarding DPB feature to Seastone HWSKUs (#4235) 2020-09-18 15:29:29 -07:00
Seastone-DX010-10-50 [DPB Seastone] On boarding DPB feature to Seastone HWSKUs (#4235) 2020-09-18 15:29:29 -07:00
Seastone-DX010-25-50 [DPB Seastone] On boarding DPB feature to Seastone HWSKUs (#4235) 2020-09-18 15:29:29 -07:00
Seastone-DX010-50 [DPB Seastone] On boarding DPB feature to Seastone HWSKUs (#4235) 2020-09-18 15:29:29 -07:00
Seastone-DX010-50-40 [DPB Seastone] On boarding DPB feature to Seastone HWSKUs (#4235) 2020-09-18 15:29:29 -07:00
Seastone-DX010-50-50-40 [Seastone] Add new HWSKU for 48x50G+8x40G (#4156) 2020-04-04 22:52:34 -07:00
sonic_platform [device/celestica] Mitigation for command injection vulnerability (#11740) 2022-12-09 10:30:20 -05:00
default_sku [updategraph] add support to use preset config instead of default minigraph (#2050) 2018-09-21 22:01:10 -07:00
fancontrol-B2F [device/celestica]: Add thermalctld support on DX010 platform APIs (#6089) 2021-01-15 10:20:47 -08:00
fancontrol-F2B [device/celestica]: Add thermalctld support on DX010 platform APIs (#6089) 2021-01-15 10:20:47 -08:00
installer.conf [device/celestica] seastone add gpio_ich driver module blacklist (#2691) 2019-03-25 15:49:35 -07:00
led_proc_init.soc Replace CRLF line endings with LF (#932) 2017-09-01 15:28:46 -07:00
pcie.yaml [pcie.yaml] Move pcie configuration file path to platform directory (#6475) 2021-02-21 08:27:37 -08:00
platform_asic Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
platform_components.json [device/celestica]: Fix remaining failed test cases of Seastone-DX010 platform API (#7743) 2021-05-28 12:56:09 -07:00
platform.json [device/celestica]: Fix failed test cases of DX010 platform APIs (#6564) 2021-04-02 10:08:31 -07:00
pmon_daemon_control.json [device/celestica]: Fix xcvrd error (#3979) 2020-01-10 12:50:51 -08:00
sensors.conf [device/celestica]: Implement thermal base API based on the new platform API (#3220) 2019-08-05 09:01:50 -07:00
system_health_monitoring_config.json [device/celestica]: Add thermalctld support on DX010 platform APIs (#6089) 2021-01-15 10:20:47 -08:00
th-seastone-dx010-config-flex-all.bcm Disable ALPM distributed hitbit thread that is used for debug purpose only but interfered with Other functional operations (#9199) 2021-11-09 07:21:57 -08:00
thermal_overload_control.sh [device/celestica]: Add thermalctld support on DX010 platform APIs (#6089) 2021-01-15 10:20:47 -08:00
thermal_policy.json [device/celestica]: Add thermalctld support on DX010 platform APIs (#6089) 2021-01-15 10:20:47 -08:00