Skip to content

Conversation

kingthorin
Copy link
Member

@kingthorin kingthorin commented Jul 1, 2025

Overview

The Remote OS Command Injection scan rule has been broken into two rules; one feedback based, and one time based (Issue 7341). This includes assigning the timing rule ID 90037, and updating the add-on's help content.

Related Issues

@psiinon
Copy link
Member

psiinon commented Jul 1, 2025

Logo
Checkmarx One – Scan Summary & Details16d7e17d-f0f9-41d6-aff5-40cb29975c74

Great job, no security vulnerabilities found in this Pull Request

@kingthorin kingthorin force-pushed the cmdi-split branch 2 times, most recently from 015bdee to faa12c1 Compare July 3, 2025 10:41
@kingthorin
Copy link
Member Author

I believe this is ready for review.

@kingthorin kingthorin force-pushed the cmdi-split branch 2 times, most recently from 208b798 to cfb4ce9 Compare July 16, 2025 11:27
@kingthorin
Copy link
Member Author

Got all those (I hope).

@kingthorin
Copy link
Member Author

Done

@thc202
Copy link
Member

thc202 commented Jul 18, 2025

Thank you!

@kingthorin kingthorin requested review from psiinon and Copilot July 21, 2025 00:41
@kingthorin kingthorin enabled auto-merge July 21, 2025 00:41
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR separates the Command Injection scan rule into two distinct scan rules: one feedback-based (retaining ID 90020) and one time-based (assigned new ID 90037). The separation removes timing attack functionality from the original rule and creates a dedicated timing-based rule for better organization and testing coverage.

  • Time-based command injection functionality moved to new CommandInjectionTimingScanRule with ID 90037
  • Original CommandInjectionScanRule retained as feedback-based only, keeping ID 90020
  • Common test functionality extracted to shared base class CommandInjectionRuleTest

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CommandInjectionTimingScanRule.java New time-based command injection scan rule implementation
CommandInjectionTimingScanRuleUnitTest.java Unit tests for the new timing-based scan rule
CommandInjectionScanRule.java Refactored to remove timing functionality, keeping only feedback-based detection
CommandInjectionScanRuleUnitTest.java Updated tests with timing-related functionality removed
CommandInjectionRuleTest.java New abstract base class for shared command injection test functionality
Messages.properties Updated message keys to separate feedback and time-based descriptions
ascanrules.html Updated help documentation to describe the two separate rules
CHANGELOG.md Documented the rule separation
Comments suppressed due to low confidence (1)

addOns/ascanrules/src/main/javahelp/org/zaproxy/zap/extension/ascanrules/resources/help/contents/ascanrules.html:81

  • The filename 'CommandInjectionScaRule.java' appears to be a typo. It should be 'CommandInjectionScanRule.java' based on the actual class name.
Latest code: <a href="https://github.com/zaproxy/zap-extensions/blob/main/addOns/ascanrules/src/main/java/org/zaproxy/zap/extension/ascanrules/CommandInjectionTimingScanRule.java">CommandInjectionTimingScanRule.java</a>

@kingthorin kingthorin merged commit 0acc921 into zaproxy:main Jul 21, 2025
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 21, 2025
@kingthorin kingthorin deleted the cmdi-split branch July 21, 2025 08:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants