From 75b5c314e31b44b3b64a8ee647efa9d8b1067029 Mon Sep 17 00:00:00 2001 From: Manuel Jacob Date: Fri, 15 Sep 2023 06:12:54 +0200 Subject: [PATCH] Change CWE reference in documentation for S607 rule (#7398) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary The previous reference was “CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')”, which describes another issue. The new reference is “CWE-426: Untrusted Search Path”, which describes exactly the problem that this rule should warn about. ## Test Plan The change was not tested, as it only changes two numbers in the documentation. --- crates/ruff/src/rules/flake8_bandit/rules/shell_injection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ruff/src/rules/flake8_bandit/rules/shell_injection.rs b/crates/ruff/src/rules/flake8_bandit/rules/shell_injection.rs index 7e79b8f3e8d7b..fa9e01829c0a1 100644 --- a/crates/ruff/src/rules/flake8_bandit/rules/shell_injection.rs +++ b/crates/ruff/src/rules/flake8_bandit/rules/shell_injection.rs @@ -148,7 +148,7 @@ impl Violation for StartProcessWithNoShell { /// /// ## References /// - [Python documentation: `subprocess.Popen()`](https://docs.python.org/3/library/subprocess.html#subprocess.Popen) -/// - [Common Weakness Enumeration: CWE-78](https://cwe.mitre.org/data/definitions/78.html) +/// - [Common Weakness Enumeration: CWE-426](https://cwe.mitre.org/data/definitions/426.html) #[violation] pub struct StartProcessWithPartialPath;