Skip to content

Add importer for vmware/photon/wiki/Security-Advisories vulnerabilities advisories - #1683

Closed
Samk1710 wants to merge 9 commits into
aboutcode-org:mainfrom
Samk1710:photon_importer/36
Closed

Add importer for vmware/photon/wiki/Security-Advisories vulnerabilities advisories#1683
Samk1710 wants to merge 9 commits into
aboutcode-org:mainfrom
Samk1710:photon_importer/36

Conversation

@Samk1710

@Samk1710 Samk1710 commented Nov 26, 2024

Copy link
Copy Markdown
Contributor

Added an importer at vulnerabilities/pipelines/vmwarephoton_importer.py and registered in vulnerabilities/importers/init.py
Addressing issue: #36

Signed-off-by: Sampurna Pyne sampurnapyne1710@gmail.com

@keshav-space keshav-space left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Samk1710, see some suggestions.

Comment thread .qdrant-initialized

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why commit the Qdrant init config?

Comment thread vulnerabilities/pipelines/vmwarephoton_importer.py
Comment thread vulnerabilities/pipelines/vmwarephoton_importer.py
response = requests.get(url)
response.raise_for_status()
advisories_data = response.json() # Fetch the data from the API
advisories.extend(self.to_advisory(advisories_data)) # Collect advisories for each URL

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not the right approach, advisory should always be yielded. No need to compute all advisory at once. See the other importer pipelines like https://github.com/aboutcode-org/vulnerablecode/blob/main/vulnerabilities/pipelines/nginx_importer.py

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thankyou @keshav-space for the suggestions. I will look into them and make the changes. Thankyou.

@captn3m0

captn3m0 commented Dec 4, 2024

Copy link
Copy Markdown

Should we instead use the Photon advisory republished in OSV

Since this code already uses the CVE feed, the additional source I use in generating in the OSV feed are the Photon Security Advisories which are in markdown.

Just for context, the additional information you get from the PHSA feed is the following:

  1. A PHSA identifier, issued by VMWare
  2. A textual severity (Low, Critical, Important, Moderate)
  3. Issue date for the advisory
  4. List of packages that were updated, with the associated checksums and build timestamps.

As an example, PHSA-2024-5.0-0301 includes updates for libarchive - ['CVE-2024-26256'] and openssl - ['CVE-2024-4741'].

The CVE JSON feed includes the following information:

{"cve_id": "CVE-2024-26256", "pkg": "libarchive", "cve_score": 7.8, "aff_ver": "all versions before 3.7.1-2.ph5 are vulnerable", "res_ver": "3.7.1-2.ph5"}

while the PHSA page calls it a "Important" update with an issue date of 2024-06-21 and the following 2 packages:

libarchive-3.7.1-2.ph5.x86_64.rpm | size : 384K , sha256 : 632f9fb09bb56c3b5c38ed668eb29184a9b294be56c510a7a022fe85c5eb9c9c , build time : Fri, 21 Jun 2024 12:40:33 UTC

libarchive-devel-3.7.1-2.ph5.x86_64.rpm | size : 172K , sha256 : 2423a6ddcb83676ba7ab675ad3c2cc19575a42b123cdfe1fd55a51474e1e3664 , build time : Fri, 21 Jun 2024 12:40:33 UTC

The only additional information I consume for the OSV feed is the PHSA ID (I'm planning to add the checksums), so the gains are quite minor - except for interoperability perhaps by relying on OSV imports directly.

@keshav-space

Copy link
Copy Markdown
Member

@captn3m0 Thanks for all the work on the PhotonOS OSV Advisory. We will be using it in this pipeline.

@Samk1710 Samk1710 closed this by deleting the head repository Nov 16, 2025
@Samk1710

Samk1710 commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

Continued this importer in a fresh PR.

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.

3 participants