Skip to content

log a line when custom hash method is used#13679

Merged
mtesauro merged 1 commit intoDefectDojo:devfrom
valentijnscholten:log-custom-hash-method
Nov 14, 2025
Merged

log a line when custom hash method is used#13679
mtesauro merged 1 commit intoDefectDojo:devfrom
valentijnscholten:log-custom-hash-method

Conversation

@valentijnscholten
Copy link
Copy Markdown
Member

@valentijnscholten valentijnscholten commented Nov 11, 2025

add some logging to make it explicit and clear when debugging hash code issues.

@dryrunsecurity
Copy link
Copy Markdown

DryRun Security

🔴 Risk threshold exceeded.

This pull request modifies a sensitive file (dojo/models.py), and the scanner detected sensitive edits; you can configure sensitive file paths and allowed authors in .dryrunsecurity.yaml. The finding is marked with a failing risk threshold but is not set to block the PR.

🔴 Configured Codepaths Edit in dojo/models.py
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.

We've notified @mtesauro.


All finding details can be found in the DryRun Security Dashboard.

Copy link
Copy Markdown
Contributor

@dogboat dogboat left a comment

Choose a reason for hiding this comment

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

Approved, one thought that can be safely ignored.

Comment thread dojo/models.py
def set_hash_code(self, dedupe_option):
from dojo.utils import get_custom_method # noqa: PLC0415 circular import
if hash_method := get_custom_method("FINDING_HASH_METHOD"):
deduplicationLogger.debug("Using custom hash method")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this is for debug, is there any value in including the method name (either from the given setting or by stringifying the resolved method)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@valentijnscholten Before I approve and merged this I wanted to give you a chance to comment here.

@mtesauro mtesauro merged commit 19dc283 into DefectDojo:dev Nov 14, 2025
149 checks passed
Maffooch pushed a commit to valentijnscholten/django-DefectDojo that referenced this pull request Feb 16, 2026
Co-authored-by: Valentijn Scholten <valentijn.scholten@iodigital.com>
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.

6 participants