Fix date parsing issues and remove duplicate utility functions#2
Open
fire8cker wants to merge 2 commits intohijack1r:mainfrom
Open
Fix date parsing issues and remove duplicate utility functions#2fire8cker wants to merge 2 commits intohijack1r:mainfrom
fire8cker wants to merge 2 commits intohijack1r:mainfrom
Conversation
Make is_recent robust against NVD dates with/without microseconds and with timezone suffixes, preventing silent skipping of recent high-severity vulnerabilities.
Summary: Remove the duplicate load_template from CVE_GhListener.py and rely on the existing implementation in pkg/utils.py, reducing duplication and avoiding local name shadowing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses several issues identified in the project, including:
Incorrect date parsing: Fixes the is_recent function to properly handle all NVD 2.0 date formats, ensuring recent high-severity vulnerabilities are not silently skipped due to incorrect date parsing (e.g., handling dates with/without microseconds and with timezone suffixes).
Duplicate function definition: Removes the duplicate load_template function in CVE_GhListener.py, relying on the existing implementation in pkg/utils.py, which reduces code duplication and avoids local name shadowing.