From 34dc8e0531186400a66fbae9e623d4d320a774e8 Mon Sep 17 00:00:00 2001 From: Brent Westbrook <36778786+ntBre@users.noreply.github.com> Date: Thu, 12 Jun 2025 10:06:22 -0400 Subject: [PATCH] [`flake8-bandit`] Remove `suspicious-xmle-tree-usage` (`S320`) (#18617) Summary -- Closes #13707. The rule was deprecated in 0.10 (#16680) and slated for removal in either this or the next release. Test Plan -- N/a --- crates/ruff_linter/src/codes.rs | 2 +- .../src/rules/flake8_bandit/rules/suspicious_function_call.rs | 4 ++-- ruff.schema.json | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/ruff_linter/src/codes.rs b/crates/ruff_linter/src/codes.rs index 92a843aa41..d2de55efba 100644 --- a/crates/ruff_linter/src/codes.rs +++ b/crates/ruff_linter/src/codes.rs @@ -660,7 +660,7 @@ pub fn code_to_rule(linter: Linter, code: &str) -> Option<(RuleGroup, Rule)> { (Flake8Bandit, "317") => (RuleGroup::Stable, rules::flake8_bandit::rules::SuspiciousXMLSaxUsage), (Flake8Bandit, "318") => (RuleGroup::Stable, rules::flake8_bandit::rules::SuspiciousXMLMiniDOMUsage), (Flake8Bandit, "319") => (RuleGroup::Stable, rules::flake8_bandit::rules::SuspiciousXMLPullDOMUsage), - (Flake8Bandit, "320") => (RuleGroup::Deprecated, rules::flake8_bandit::rules::SuspiciousXMLETreeUsage), + (Flake8Bandit, "320") => (RuleGroup::Removed, rules::flake8_bandit::rules::SuspiciousXMLETreeUsage), (Flake8Bandit, "321") => (RuleGroup::Stable, rules::flake8_bandit::rules::SuspiciousFTPLibUsage), (Flake8Bandit, "323") => (RuleGroup::Stable, rules::flake8_bandit::rules::SuspiciousUnverifiedContextUsage), (Flake8Bandit, "324") => (RuleGroup::Stable, rules::flake8_bandit::rules::HashlibInsecureHashFunction), diff --git a/crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs b/crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs index f558707fec..5fcc3e6ed5 100644 --- a/crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs +++ b/crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs @@ -789,9 +789,9 @@ impl Violation for SuspiciousXMLPullDOMUsage { } } -/// ## Deprecation +/// ## Removed /// -/// This rule was deprecated as the `lxml` library has been modified to address +/// This rule was removed as the `lxml` library has been modified to address /// known vulnerabilities and unsafe defaults. As such, the `defusedxml` /// library is no longer necessary, `defusedxml` has [deprecated] its `lxml` /// module. diff --git a/ruff.schema.json b/ruff.schema.json index 4a186a0568..e8c6c30e85 100644 --- a/ruff.schema.json +++ b/ruff.schema.json @@ -4089,7 +4089,6 @@ "S318", "S319", "S32", - "S320", "S321", "S323", "S324",