Skip to content

ascanrules: Add rXSS Unit Tests#7347

Open
kingthorin wants to merge 1 commit into
zaproxy:mainfrom
kingthorin:rxss-tests
Open

ascanrules: Add rXSS Unit Tests#7347
kingthorin wants to merge 1 commit into
zaproxy:mainfrom
kingthorin:rxss-tests

Conversation

@kingthorin
Copy link
Copy Markdown
Member

Overview

Additional unit tests to support further/future work.

@psiinon
Copy link
Copy Markdown
Member

psiinon commented May 8, 2026

Logo
Checkmarx One – Scan Summary & Detailsb981c4ab-c95b-4de9-a270-69ddb3908aa4

Great job! No new security vulnerabilities introduced in this pull request


Use @Checkmarx to interact with Checkmarx PR Assistant.
Examples:
@Checkmarx how are you able to help me?
@Checkmarx rescan this PR

Copy link
Copy Markdown
Contributor

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 adds additional unit tests for CrossSiteScriptingScanRule, expanding coverage for reflected XSS (rXSS) scenarios and threshold-dependent behavior within the ascanrules add-on.

Changes:

  • Added new unit tests covering cases like null target context at LOW threshold, JSON filtered-script behavior across thresholds, direct-attack fallback, and header-splitting paths.
  • Refactored repeated Nano server response logic into small helper handler factories to support the new test cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants