Skip to content

test: document xss_exploiter failure-mode parser behaviour#1071

Open
mythri2405 wants to merge 2 commits into
utksh1:mainfrom
mythri2405:task-858-xss-exploiter-failure-modes
Open

test: document xss_exploiter failure-mode parser behaviour#1071
mythri2405 wants to merge 2 commits into
utksh1:mainfrom
mythri2405:task-858-xss-exploiter-failure-modes

Conversation

@mythri2405

Copy link
Copy Markdown
Contributor

Description

This PR adds parser contract coverage for the xss_exploiter plugin to document and lock in its failure-mode behavior. It does not change plugin runtime behavior, only improves test-level documentation of expected outputs.

Specifically, it clarifies how the parser handles:

  • Empty output (no findings)
  • Blocked payload messages
  • Benign failure messages

All cases are now explicitly covered through unit tests to ensure deterministic behavior and prevent regression.

Related Issues

Closes #858

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

How Has This Been Tested?

The following test suite was executed:
python -m pytest testing/backend/unit/test_xss_exploiter_plugin.py -v

Results:

  • 7 tests passed
  • No failures
  • No runtime changes to plugin behavior

Covered scenarios:

  • Empty output returns deterministic empty findings
  • Blocked payload messages are preserved as informational findings
  • Benign failure messages are preserved as informational findings
  • Existing parser + executor behavior remains unchanged

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Requesting changes. The test addition is small, but the current run has frontend-checks failing. Please rerun/fix CI so the PR is fully green before it can be merged.

@utksh1 utksh1 added level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label area:plugins Scanner plugin metadata, schemas, or plugin runtime work labels Jun 19, 2026

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Still blocked after the latest update. The parser tests are small, but the PR now includes unrelated frontend/package-lock dependency churn. Please split the package-lock/audit update out and keep this PR focused on xss_exploiter parser behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:plugins Scanner plugin metadata, schemas, or plugin runtime work level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK] Document failure-mode behavior for xss_exploiter plugin

2 participants