Skip to content

Fix Chrome advisory parser for 2026+ blog post format#39

Merged
jasinner merged 1 commit into
RedHatProductSecurity:masterfrom
dmonzonis:chrome-new-format
Jul 6, 2026
Merged

Fix Chrome advisory parser for 2026+ blog post format#39
jasinner merged 1 commit into
RedHatProductSecurity:masterfrom
dmonzonis:chrome-new-format

Conversation

@dmonzonis

Copy link
Copy Markdown
Contributor

Chrome Release blog posts from 2026 onward concatenate multiple CVE entries on a single line using [TBD][bugid] or [N/A][bugid] instead of the older [$reward][bugid] format. The existing regex splits on every opening bracket, which breaks parsing when the intro paragraph contains colons (e.g., "Note: ..."), as the first colon is mistakenly treated as the metadata/text separator.

This commit replaces the single broad regex with two targeted ones:

  • r"(.)\[\$" handles the existing [$reward] pattern
  • r"(?<=\S)(\[(?:TBD|N/A|\$\d+)\]\[)" splits concatenated CVE entries using a lookbehind to only match when preceded by content

Chrome Release blog posts from 2026 onward concatenate multiple CVE
entries on a single line using [TBD][bugid] or [N/A][bugid] instead of
the older [$reward][bugid] format. The existing regex splits on every
opening bracket, which breaks parsing when the intro paragraph contains
colons (e.g., "Note: ..."), as the first colon is mistakenly treated as
the metadata/text separator.

This commit replaces the single broad regex with two targeted ones:
- `r"(.)\[\$"` handles the existing [$reward] pattern
- `r"(?<=\S)(\[(?:TBD|N/A|\$\d+)\]\[)"` splits concatenated CVE entries
  using a lookbehind to only match when preceded by content
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 865a117f-d71c-4249-8afa-139c48f0798c

📥 Commits

Reviewing files that changed from the base of the PR and between 0e58216 and d072927.

📒 Files selected for processing (1)
  • advisory_parser/parsers/chrome.py

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved parsing of Chrome advisory entries so CVE information is handled more accurately.
    • Better support for newer advisory posts where multiple bracketed items appear on the same line, reducing missed or malformed entries.

Walkthrough

The preprocessing regex in parse_chrome_advisory was updated to narrow newline insertion to [$... patterns and add a new rule that splits concatenated bracketed CVE entries (TBD, N/A, or dollar-reward values) onto separate lines, addressing 2026+ blog post formatting.

Changes

Chrome Advisory Parser Update

Layer / File(s) Summary
Text normalization regex update
advisory_parser/parsers/chrome.py
Narrowed newline insertion before [$... patterns and added a rule to split concatenated bracketed CVE entries onto separate lines.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the parser fix for the Chrome advisory 2026+ blog post format.
Description check ✅ Passed The description directly explains the parser issue and the targeted regex changes, matching the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@jasinner
jasinner merged commit e45e57e into RedHatProductSecurity:master Jul 6, 2026
3 checks passed
@dmonzonis
dmonzonis deleted the chrome-new-format branch July 7, 2026 07:03
@jasinner jasinner mentioned this pull request Jul 16, 2026
3 tasks
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.

2 participants