TEST-INFRA: [dependency-security] Medium severity vulnerability in behave #2758

Open
opened 2026-04-04 19:13:12 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: fix/v3.7.0-dependency-security-behave-upgrade
  • Commit Message: fix(deps): upgrade behave from 1.3.3 to latest to patch XSS vulnerability in report generation
  • Milestone: v3.7.0
  • Parent Epic: #2749

Background and Context

A medium-severity security vulnerability (XSS in report generation) has been identified in versions of behave prior to 1.4.0. The project currently depends on behave==1.3.3, which is within the affected range. Upgrading to the latest available version of behave is required to mitigate this vulnerability and maintain a secure test infrastructure.

Current Behavior

The project uses behave==1.3.3, which contains a known XSS vulnerability in its HTML report generation functionality. Any generated test reports could be susceptible to cross-site scripting if report content includes attacker-controlled strings.

Expected Behavior

The project should use behave>=1.4.0 (latest stable), eliminating the XSS vulnerability in report generation. All existing BDD test scenarios should continue to pass without modification after the upgrade.

Acceptance Criteria

  • behave is upgraded to the latest stable version (>=1.4.0) in all relevant dependency files (pyproject.toml, requirements*.txt, noxfile.py, etc.).
  • All existing Behave BDD scenarios pass without modification after the upgrade.
  • nox (all default sessions) passes cleanly with the upgraded dependency.
  • Coverage remains >= 97% after the upgrade.
  • No new Ruff or type-checking violations are introduced.

Supporting Information

  • Affected package: behave
  • Vulnerable versions: < 1.4.0
  • Currently pinned version: 1.3.3
  • Vulnerability type: XSS in HTML report generation
  • Recommended action: Upgrade to latest stable release of behave

Subtasks

  • Identify all locations where behave==1.3.3 is pinned (pyproject.toml, noxfile.py, requirements files, lock files).
  • Upgrade behave to the latest stable version (>=1.4.0) in all identified locations.
  • Run the full BDD test suite (nox -s bdd or equivalent) to confirm no regressions.
  • Run nox (all default sessions) and fix any errors introduced by the upgrade.
  • Verify coverage >= 97% via nox -s coverage_report.
  • Update any pinned version comments or changelogs as appropriate.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/v3.7.0-dependency-security-behave-upgrade` - **Commit Message**: `fix(deps): upgrade behave from 1.3.3 to latest to patch XSS vulnerability in report generation` - **Milestone**: v3.7.0 - **Parent Epic**: #2749 --- ### Background and Context A medium-severity security vulnerability (XSS in report generation) has been identified in versions of `behave` prior to 1.4.0. The project currently depends on `behave==1.3.3`, which is within the affected range. Upgrading to the latest available version of `behave` is required to mitigate this vulnerability and maintain a secure test infrastructure. ### Current Behavior The project uses `behave==1.3.3`, which contains a known XSS vulnerability in its HTML report generation functionality. Any generated test reports could be susceptible to cross-site scripting if report content includes attacker-controlled strings. ### Expected Behavior The project should use `behave>=1.4.0` (latest stable), eliminating the XSS vulnerability in report generation. All existing BDD test scenarios should continue to pass without modification after the upgrade. ### Acceptance Criteria - [ ] `behave` is upgraded to the latest stable version (>=1.4.0) in all relevant dependency files (`pyproject.toml`, `requirements*.txt`, `noxfile.py`, etc.). - [ ] All existing Behave BDD scenarios pass without modification after the upgrade. - [ ] `nox` (all default sessions) passes cleanly with the upgraded dependency. - [ ] Coverage remains >= 97% after the upgrade. - [ ] No new Ruff or type-checking violations are introduced. ### Supporting Information - Affected package: `behave` - Vulnerable versions: < 1.4.0 - Currently pinned version: 1.3.3 - Vulnerability type: XSS in HTML report generation - Recommended action: Upgrade to latest stable release of `behave` --- ## Subtasks - [ ] Identify all locations where `behave==1.3.3` is pinned (pyproject.toml, noxfile.py, requirements files, lock files). - [ ] Upgrade `behave` to the latest stable version (>=1.4.0) in all identified locations. - [ ] Run the full BDD test suite (`nox -s bdd` or equivalent) to confirm no regressions. - [ ] Run `nox` (all default sessions) and fix any errors introduced by the upgrade. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. - [ ] Update any pinned version comments or changelogs as appropriate. --- ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-04 19:13:20 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium
  • MoSCoW: Should Have — Medium-severity security vulnerability in a test dependency. Should be patched when addressing #2763 (robotframework vulnerability) to batch security fixes together.
  • Parent Epic: #362 (Security & Safety Hardening)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium - **MoSCoW**: Should Have — Medium-severity security vulnerability in a test dependency. Should be patched when addressing #2763 (robotframework vulnerability) to batch security fixes together. - **Parent Epic**: #362 (Security & Safety Hardening) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
cleveragents/cleveragents-core#2758
No description provided.