diff --git a/its/autoscan/src/test/resources/autoscan/autoscan-diff-by-rules.json b/its/autoscan/src/test/resources/autoscan/autoscan-diff-by-rules.json index c3d7153fd8..bdd7c5cfca 100644 --- a/its/autoscan/src/test/resources/autoscan/autoscan-diff-by-rules.json +++ b/its/autoscan/src/test/resources/autoscan/autoscan-diff-by-rules.json @@ -1991,12 +1991,6 @@ "falseNegatives": 0, "falsePositives": 0 }, - { - "ruleKey": "S5042", - "hasTruePositives": true, - "falseNegatives": 8, - "falsePositives": 0 - }, { "ruleKey": "S5122", "hasTruePositives": true, diff --git a/its/autoscan/src/test/resources/autoscan/diffs/diff_S5042.json b/its/autoscan/src/test/resources/autoscan/diffs/diff_S5042.json deleted file mode 100644 index 8946310adf..0000000000 --- a/its/autoscan/src/test/resources/autoscan/diffs/diff_S5042.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ruleKey": "S5042", - "hasTruePositives": true, - "falseNegatives": 8, - "falsePositives": 0 -} diff --git a/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5042.html b/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5042.html index bdefae31c1..42cc42aaed 100644 --- a/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5042.html +++ b/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5042.html @@ -1,3 +1,4 @@ +

This rule is deprecated, and will eventually be removed.

Successful Zip Bomb attacks occur when an application expands untrusted archive files without controlling the size of the expanded data, which can lead to denial of service. A Zip bomb is usually a malicious archive file of a few kilobytes of compressed data but turned into gigabytes of uncompressed data. To achieve this extreme compression ratio, attackers will diff --git a/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5042.json b/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5042.json index 971b1ad13f..32484b21a1 100644 --- a/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5042.json +++ b/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S5042.json @@ -7,7 +7,7 @@ }, "attribute": "COMPLETE" }, - "status": "ready", + "status": "deprecated", "remediation": { "func": "Constant\/Issue", "constantCost": "10min" diff --git a/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_agentic_AI_profile.json b/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_agentic_AI_profile.json index 50a1ca0a6b..ee61a18f46 100644 --- a/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_agentic_AI_profile.json +++ b/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_agentic_AI_profile.json @@ -314,7 +314,6 @@ "S4830", "S4970", "S4973", - "S5042", "S5122", "S5164", "S5247", diff --git a/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_way_profile.json b/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_way_profile.json index a2cc9e26a9..ab7c96504a 100644 --- a/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_way_profile.json +++ b/sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/Sonar_way_profile.json @@ -337,7 +337,6 @@ "S4970", "S4973", "S4977", - "S5042", "S5122", "S5164", "S5247", diff --git a/sonar-java-plugin/src/test/java/org/sonar/plugins/java/JavaAgenticWayProfileTest.java b/sonar-java-plugin/src/test/java/org/sonar/plugins/java/JavaAgenticWayProfileTest.java index 07b8e02b4e..8f2933b4a3 100644 --- a/sonar-java-plugin/src/test/java/org/sonar/plugins/java/JavaAgenticWayProfileTest.java +++ b/sonar-java-plugin/src/test/java/org/sonar/plugins/java/JavaAgenticWayProfileTest.java @@ -53,7 +53,7 @@ void profile_is_registered_as_expected() { BuiltInQualityProfilesDefinition.BuiltInQualityProfile actualProfile = profilesPerLanguages.get("java").get("Sonar agentic AI"); assertThat(actualProfile.isDefault()).isFalse(); assertThat(actualProfile.rules()) - .hasSize(468) + .hasSize(467) .extracting(BuiltInQualityProfilesDefinition.BuiltInActiveRule::ruleKey) .doesNotContainAnyElementsOf(List.of( "S101",