Skip to content

Add Eclipse Foundation security advisories importer#2219

Open
NucleiAv wants to merge 3 commits intoaboutcode-org:mainfrom
NucleiAv:feat/eclipse-importer-1495
Open

Add Eclipse Foundation security advisories importer#2219
NucleiAv wants to merge 3 commits intoaboutcode-org:mainfrom
NucleiAv:feat/eclipse-importer-1495

Conversation

@NucleiAv
Copy link
Copy Markdown

@NucleiAv NucleiAv commented Mar 16, 2026

Closes #1495

HTML parsing the Eclipse website at https://www.eclipse.org/security/known.php would return nothing useful because the CVE-ID links in the table redirect to NVD and the project links return a 404. Instead I found that the website renders its advisory table entirely via JavaScript from a JSON API endpoint. By inspecting the JS bundle, I found https://api.eclipse.org/cve which returns all 197 advisories as a clean JSON array with no auth and no pagination required. So I choose API approach, since its clean and consistent.

Each entry provides details like CVE ID, publish date, Eclipse project name, summary, CVSS score, and reference URLs (CVE Mitre link, Eclipse bugtracker ticket, GitHub CVE pull request where applicable).

API does not provide CVSS vector string or version (only a bare float score, stored using GENERIC scoring system), CWE weaknesses, and affected or fixed package versions. These fields are left empty.

Signed-off-by: Anmol Vats <anmolvats2003@gmail.com>
@NucleiAv NucleiAv closed this Mar 16, 2026
@NucleiAv NucleiAv deleted the feat/eclipse-importer-1495 branch March 16, 2026 13:35
@NucleiAv NucleiAv restored the feat/eclipse-importer-1495 branch March 16, 2026 13:37
@NucleiAv NucleiAv reopened this Mar 16, 2026
Signed-off-by: Anmol Vats <anmolvats2003@gmail.com>
@ziadhany ziadhany self-requested a review April 2, 2026 18:53
Copy link
Copy Markdown
Collaborator

@ziadhany ziadhany left a comment

Choose a reason for hiding this comment

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

@NucleiAv Good start, see some comments there.

Comment on lines +74 to +75
summary_obj = entry.get("summary")
summary = summary_obj.get("content") or "" if isinstance(summary_obj, dict) else ""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think something like this is simpler.

Suggested change
summary_obj = entry.get("summary")
summary = summary_obj.get("content") or "" if isinstance(summary_obj, dict) else ""
summary_obj = entry.get("summary", {})
summary = summary_obj.get("content") or ""

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Used entry.get("summary") or {} instead of the suggested entry.get("summary", {}) because the API actually returns "summary": null for some entries (CVE-2024-2212 in the sample data). When the key exists but its value is null, .get("summary", {}) still returns None, which makes None.get("content") blow up. The or {} handles both the missing key and the null case cleanly.


severities = []
cvss = entry.get("cvss")
if cvss is not None:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if cvss is not None:
if cvss:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done!

Comment on lines +61 to +62
if not advisory_id:
return None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we have any examples of this? If yes, please log this, if no, please remove it.

Suggested change
if not advisory_id:
return None

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I removed it since I did not find any instances in API data

Comment on lines +29 to +31


class TestParseAdvisory(TestCase):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please change this to test against the file instead of running parse_advisory for every attribute.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Replaced the whole class with a single test_parse_advisories() that runs all three sample entries and checks against an expected JSON file using util_tests.check_results_against_json. Also dropped test_collect_advisories_skips_on_http_error as it had assert not hasattr(...) or True which is always true and wasn't actually testing anything.

Signed-off-by: Anmol Vats <anmolvats2003@gmail.com>
@NucleiAv NucleiAv requested a review from ziadhany April 2, 2026 20:41
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.

Collect data from https://www.eclipse.org/security/known.php and https://www.eclipse.org/security/

2 participants