Filter out OSVDB and normalize URL references in Metasploit pipeline … - #1993
Open
sarafarajnasardi wants to merge 1 commit into
Open
Filter out OSVDB and normalize URL references in Metasploit pipeline …#1993sarafarajnasardi wants to merge 1 commit into
sarafarajnasardi wants to merge 1 commit into
Conversation
…boutcode-org#1697 * Skip OSVDB-prefixed references when processing Metasploit data * Strip "URL-" prefix from references and add commit links if present * Ensure commit links are stored in notes in a sorted order * Improves data consistency and avoids invalid aliases Signed-off-by: Sarafaraj Nasardi <sarafarajnasardi786@gmail.com>
pombredanne
reviewed
Oct 8, 2025
| ref for ref in references if not ref.startswith("OSVDB") and not ref.startswith("URL-") | ||
| ] | ||
| # Regex to allow short commit hashes (6–40 chars) | ||
| commit_pattern = re.compile(r"https://github\.com/.+/commit/[a-f0-9]{6,40}") |
Member
There was a problem hiding this comment.
Make this function instead and this should not be github-specific.
pombredanne
requested changes
Oct 8, 2025
pombredanne
left a comment
Member
There was a problem hiding this comment.
Hey, we need tests. Also please avoid AI-generated PR comments, they are annoying and bland.
| }, | ||
| ) | ||
|
|
||
| return 1 |
Member
There was a problem hiding this comment.
Why do we return 1 here? This is highly unsual
| source_url = f"https://github.com/rapid7/metasploit-framework/tree/master{path}" | ||
| source_date_published = None | ||
|
|
||
| # Add unique commit links to notes |
Member
There was a problem hiding this comment.
Why this comment? The code below looks obvious
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.
What does this PR do?
Why is this needed?
Some references in Metasploit data include OSVDB identifiers and URL-prefixed strings,
which are inconsistent and can cause invalid aliases. This change normalizes references
and ensures proper commit link handling.
How was this tested?
commit_linksRelated issue