Skip to content

Add Yubico advisories#1763

Closed
kunalsz wants to merge 3 commits intoaboutcode-org:mainfrom
kunalsz:yubico-advisories
Closed

Add Yubico advisories#1763
kunalsz wants to merge 3 commits intoaboutcode-org:mainfrom
kunalsz:yubico-advisories

Conversation

@kunalsz
Copy link
Copy Markdown

@kunalsz kunalsz commented Jan 25, 2025

Yubico advisories were added in reference to #1751
There are still some issues with the older advisories, your insights and advices will be helpful.

Signed-off-by: kunalsz <kunalavengers@gmail.com>
Signed-off-by: kunalsz <kunalavengers@gmail.com>
Signed-off-by: kunalsz <kunalavengers@gmail.com>
@kunalsz kunalsz changed the title Added Yubico advisories Add Yubico advisories Mar 26, 2025
Copy link
Copy Markdown
Member

@keshav-space keshav-space left a comment

Choose a reason for hiding this comment

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

Thanks @kunalsz, for the benefit of the community we have added detailed tutorial on adding importer/improvers, but it appears that you didn't go through the documentation. We use pipelines for creating importers/improvers. Please go through this https://vulnerablecode.readthedocs.io/en/latest/tutorial_add_importer_pipeline.html tutorial and adjust your code accordingly.

class YubicoImporter(Importer):

root_url = "https://www.yubico.com/support/security-advisories/"
spdx_license_expression = "NOASSERTION"
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.

Where did you get this NOASSERTION from?

affected_packages = []
try:
for affected_package in get_item(output_generated,"affected_packages"):
print(affected_package)
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.

Make sure to remove the debug statements before committing code.

Suggested change
print(affected_package)

fixed_version = SemverVersion(get_item(affected_package,"version"))
affected_packages.append(AffectedPackage(
package=PackageURL(
type="generic",
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.

I'm not sure this can be generic for all YSA advisories since not all advisories are related to firmware some are for the SDK and other utility packages.

date_published =''

return AdvisoryData(
aliases=get_item(output_generated,'cve'),
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.

Aliases should also include the YSA ids.

Comment on lines +92 to +97
'''
link structure : https://www.yubico.com/support/security-advisories/ysa-2024-03/
href : /support/issue-rating-system/security-advisories/ysa-2017-01/
https://www.yubico.com/support/security-advisories/ysa-2025-01/
'''
root_url = "https://www.yubico.com/support/security-advisories/"
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.

Do not introduce new conventions/styles, make sure your code conforms to the existing code style and formatting.

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.

Remove this unrelated change.

@keshav-space
Copy link
Copy Markdown
Member

@kunalsz thanks for your interest. Closing this since there has been no response to the change requested, and it has been inactive for a long time. Feel free to reopen once the PR is ready.

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