Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API fixed_packages issues #809

Closed
pombredanne opened this issue Jul 26, 2022 · 2 comments
Closed

API fixed_packages issues #809

pombredanne opened this issue Jul 26, 2022 · 2 comments
Milestone

Comments

@pombredanne
Copy link
Member

from @tdruez

The current implementation of the fixed_packages on the package endpoint is not convient for the data consumer:

{
    'purl': 'pkg:npm/%40theia/[email protected]',
    'affected_by_vulnerabilities': [{
        'summary': 'Insufficient Verification of Data Authenticity',
        'vulnerability_id': 'VULCOID-AWK',
     }],
    'fixed_packages': [{
        'fixing_vulnerabilities': [{
            'url': 'http://public.vulnerablecode.io/api/vulnerabilities/14132?format=json',
            'vulnerability_id': 'VULCOID-AWK',
        }],
        'purl': 'pkg:npm/%40theia/[email protected]',
        'url': 'http://public.vulnerablecode.io/api/packages/136169?format=json',
    }],
}

To make use of this data, one has to reconcile both affected_by_vulnerabilities and fixed_packages data structure through the vulnerability_id.
This make the data hard to use for display.

A better way would be to include the fixed_packages in the affected_by_vulnerabilities data structure (which seems to be the current implementation on the vulnerabilities endpoint), such as:

{
    'purl': 'pkg:npm/%40theia/[email protected]',
    'affected_by_vulnerabilities': [{
        'summary': 'Insufficient Verification of Data Authenticity',
        'vulnerability_id': 'VULCOID-AWK',
        'fixed_packages': [{
            'purl': 'pkg:npm/%40theia/[email protected]',
            'url': 'http://public.vulnerablecode.io/api/packages/136169?format=json',
        }],
    }],
}

@TG1999 any thoughts on this?

@pombredanne pombredanne added this to the v30.0 milestone Aug 2, 2022
@pombredanne
Copy link
Member Author

This would be for a V2 of the API that will come in V31 milestone .... See also #810

@pombredanne pombredanne modified the milestones: v30.0, v31.0 Aug 2, 2022
TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 7, 2022
TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 7, 2022
@TG1999
Copy link
Contributor

TG1999 commented Aug 7, 2022

As per discussion with @tdruez we can have this change in this version of the API.

TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 8, 2022
TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 8, 2022
TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 8, 2022
TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 9, 2022
TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 9, 2022
TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 9, 2022
TG1999 added a commit to TG1999/vulnerablecode that referenced this issue Aug 9, 2022
@TG1999 TG1999 closed this as completed Oct 4, 2022
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

No branches or pull requests

2 participants