Skip to content

Fixed false negative CVE for pgAdmin 4. - #38813

Merged
getvictor merged 5 commits into
mainfrom
victor/37957-pgadmin-vuln
Jan 28, 2026
Merged

Fixed false negative CVE for pgAdmin 4.#38813
getvictor merged 5 commits into
mainfrom
victor/37957-pgadmin-vuln

Conversation

@getvictor

@getvictor getvictor commented Jan 26, 2026

Copy link
Copy Markdown
Member

Related issue: Resolves #37957

Checklist for submitter

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.

Testing

  • Added/updated automated tests
  • QA'd all new/changed functionality manually

Summary by CodeRabbit

Bug Fixes

  • Enhanced pgAdmin 4 vulnerability detection – Improved the system's ability to identify pgAdmin 4-related vulnerabilities across multiple platforms and installation configurations, addressing previously undetected security issues.

✏️ Tip: You can customize this high-level summary in your review settings.

Comment thread server/vulnerabilities/nvd/cpe_translations.json
Comment on lines +606 to +617
for _, cpeItem := range cpeItems {
if cpeItem.Vendor == "pgadmin" &&
(cpeItem.Product == "pgadmin_4" || cpeItem.Product == "pgadmin" || cpeItem.Product == "pgadmin4") {
// Add aliases with product name variations and target_sw=postgresql
for _, productName := range []string{"pgadmin", "pgadmin_4", "pgadmin4"} {
newItem := *cpeItem
newItem.Product = productName
newItem.TargetSW = "postgresql"
cpeItems = append(cpeItems, &newItem)
}
}
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is to make sure we match the CVE to our CPEs.

@getvictor
getvictor marked this pull request as ready for review January 26, 2026 22:08
@getvictor
getvictor requested a review from a team as a code owner January 26, 2026 22:08
@getvictor

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jan 26, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Full review triggered.

@coderabbitai

coderabbitai Bot commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request adds vulnerability detection support for pgAdmin 4 by introducing a CPE translation entry and expanding CPE alias generation logic to correctly match NVD CVE records with pgAdmin installations, resolving a false negative for CVE-2025-13780.

Changes

Cohort / File(s) Summary
Fix Documentation
changes/37957-pgadmin-vulnerability
Adds changelog entry documenting resolution of false negative CVE detection for pgAdmin 4
CVE Configuration
server/vulnerabilities/nvd/cpe_translations.json
Introduces new CPE translation mapping for pgAdmin 4 with case-insensitive regex matching and vendor/product filtering
Core Logic
server/vulnerabilities/nvd/cve.go
Extends expandCPEAliases function to generate three additional CPE aliases for pgAdmin products (pgadmin, pgadmin_4, pgadmin4) with TargetSW set to "postgresql" to match NVD criteria
Test Coverage
server/vulnerabilities/nvd/cve_test.go
Adds comprehensive test fixtures and alias expansion cases for pgAdmin across macOS and Windows platforms with multiple product variants

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • mostlikelee
  • ksykulev
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fixed false negative CVE for pgAdmin 4' clearly summarizes the main change: resolving a CVE detection issue for pgAdmin 4, which aligns with the PR objectives and linked issue #37957.
Description check ✅ Passed The PR description includes the related issue link (#37957), marks relevant checklist items as complete (changes file, automated tests, manual QA), though it omits many non-applicable template sections which is acceptable per guidelines.
Linked Issues check ✅ Passed The code changes address CVE-2025-13780 detection for pgAdmin 4 by adding CPE alias generation and translation entries to expand matching coverage, directly fulfilling the linked issue #37957 requirement.
Out of Scope Changes check ✅ Passed All code changes (CPE translations, alias generation logic, and tests) are directly scoped to resolving the pgAdmin CVE detection issue; no out-of-scope modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch victor/37957-pgadmin-vuln

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codecov

codecov Bot commented Jan 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.11%. Comparing base (4bbd4ee) to head (050bcf9).
⚠️ Report is 63 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #38813      +/-   ##
==========================================
+ Coverage   66.07%   66.11%   +0.03%     
==========================================
  Files        2415     2420       +5     
  Lines      192800   193766     +966     
  Branches     8536     8536              
==========================================
+ Hits       127399   128109     +710     
- Misses      53832    54020     +188     
- Partials    11569    11637      +68     
Flag Coverage Δ
backend 67.95% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@getvictor
getvictor merged commit 70f95f5 into main Jan 28, 2026
45 checks passed
@getvictor
getvictor deleted the victor/37957-pgadmin-vuln branch January 28, 2026 19:30
georgekarrv pushed a commit that referenced this pull request Feb 6, 2026
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #37957

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Bug Fixes
* **Enhanced pgAdmin 4 vulnerability detection** – Improved the system's
ability to identify pgAdmin 4-related vulnerabilities across multiple
platforms and installation configurations, addressing previously
undetected security issues.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@coderabbitai coderabbitai Bot mentioned this pull request Mar 24, 2026
4 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.

False negative for CVE-2025-13780

2 participants