Skip to content

Replace unsafe URL substring assertions in provider tests #67

Closed

Description

@stefan-jansen

Affected version

ml4t-data 0.1.8 and current main.

Finding

CodeQL reports three high-severity py/incomplete-url-substring-sanitization findings in provider tests. The tests accept a hostname merely because its text appears somewhere in a URL, which does not establish the URL scheme, authority, or exact host.

These are test-contract weaknesses rather than evidence that production requests accept attacker-controlled hosts, but stable qualification requires resolving open high findings.

Acceptance criteria

  • Parse each provider URL structurally.
  • Assert HTTPS and the exact expected hostname.
  • Assert relevant path structure where the provider contract requires it.
  • Pass focused provider tests, CodeQL, and the full protected CI matrix.
  • Verify the three default-branch alerts close after merge.

Activity

  1. added
    type: maintenanceInternal maintenance without user-visible behavior
    priority: highMaterial user impact requiring prompt remediation
    ecosystemTracked by a shared ML4T ecosystem requirement
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibility: noneNo known compatibility impactecosystemTracked by a shared ML4T ecosystem requirementpriority: highMaterial user impact requiring prompt remediationstatus: acceptedAccepted for implementationtype: maintenanceInternal maintenance without user-visible behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions