-
Notifications
You must be signed in to change notification settings - Fork 1.6k
sla: parse finding.date implicitly #12301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sla: parse finding.date implicitly #12301
Conversation
This pull request involves potential date parsing and validation risks, with observations about flexible date parsing using dateutil and incomplete input validation that could lead to unexpected parsing behavior or security vulnerabilities. 💭 Unconfirmed Findings (3)
All finding details can be found in the DryRun Security Dashboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Fixes #12299 introduced in #11924
The old code had parsing in place for parsers that didn't set the
finding.date
correctly. These parsers provided astr
instead ofdate
. This PR ensures this implicit parsing is performed with the simplified SLA logic.This implicit parsing was tucked away in the
_age()
method:django-DefectDojo/dojo/models.py
Lines 3004 to 3007 in 8e7cc01
The unit tests of parsers don't trigger this SLA logic, we'll look to add more checks to the parser unit tests in a future PR.
All affected parsers are now working again: