Skip to content

Conversation

@valentijnscholten
Copy link
Member

@valentijnscholten valentijnscholten commented Dec 22, 2025

Description

Fix incorrect endpoint parsing when endpoints lack a protocol (scheme) during cross-scanner deduplication.

Problem

When endpoints are converted to strings without a protocol, hyperlink.parse() misinterprets the hostname as the scheme, causing deduplication to fail for identical endpoints.

Example: An endpoint string 10.20.197.218:6379 (without protocol) gets parsed incorrectly, where 10.20.197.218 is treated as the scheme instead of the host.

Solution

Normalize endpoint strings by prepending // if :// is missing before parsing with hyperlink.parse(). This replicates the behavior already used in dojo/endpoint/utils.py line 265.

Fixes #10215

Fix incorrect endpoint parsing when endpoints lack a protocol (scheme).
When endpoints are converted to strings without a protocol, hyperlink.parse()
misinterprets the hostname as the scheme, causing deduplication to fail.

This fix normalizes endpoint strings by prepending '//' if '://' is missing,
replicating the behavior from dojo/endpoint/utils.py line 265.

Fixes DefectDojo#10215
Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cross-scanner deduplication incorrect endpoint parsing

3 participants