Skip to content

Conversation

michaelehab
Copy link
Collaborator

Solves #1918

  • Update Curl importer to filter and process advisories relevant to the PURL passed in the constructor
  • Update Curl importer tests to include testing the package-first mode

Comment on lines 89 to 91
except Exception as e:
logger.error(f"Error checking version {self.purl.version}: {e}")
continue
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better catch specific exceptions InvalidVersion

Comment on lines 43 to 49
super().__init__(*args, **kwargs)
self.purl = purl
if self.purl:
if self.purl.type != "generic" or self.purl.name != "curl":
print(
f"Warning: This importer handles curl package vulnerabilities. Current PURL: {self.purl!s}"
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
super().__init__(*args, **kwargs)
self.purl = purl
if self.purl:
if self.purl.type != "generic" or self.purl.name != "curl":
print(
f"Warning: This importer handles curl package vulnerabilities. Current PURL: {self.purl!s}"
)
super().__init__(*args, **kwargs)
self.purl = purl
if self.purl and (self.purl.type != "generic" or self.purl.name != "curl"):
print(
f"Warning: This importer handles curl package vulnerabilities. Current PURL: {self.purl!s}"
)

* Add Curl Live V2 Importer

* Add tests for the Curl Live V2 Importer

* Tested functionally using the Live Evaluation API in #1969

Signed-off-by: Michael Ehab Mikhail <[email protected]>
@michaelehab michaelehab force-pushed the 1918-curl-importer-package-first branch from f228798 to 5c8f008 Compare August 18, 2025 13:12
Signed-off-by: Michael Ehab Mikhail <[email protected]>
@michaelehab michaelehab changed the title Modify Curl importer to support package-first mode Add Curl Live Importer V2 Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants