vulnerablecode icon indicating copy to clipboard operation
vulnerablecode copied to clipboard

Add license_url for GitHub Importer

Open TG1999 opened this issue 3 years ago • 7 comments

https://github.com/github/advisory-database/blob/main/LICENSE.md use this as license url

TG1999 avatar Mar 28 '22 12:03 TG1999

hi , i want to work on this issue. could you please tell how to proceed?

iks1 avatar Jul 18 '22 13:07 iks1

hi , i want to work on this issue. could you please tell how to proceed?

@iks1 Have a look at docs and just edit/add license_url, spdx_license_expression in importers/github.py https://vulnerablecode.readthedocs.io/en/latest/tutorial_add_new_importer.html#specify-the-importer-license

ziadhany avatar Jul 18 '22 15:07 ziadhany

Hi @ziadhany I have gone through the documentation but it is not clear to me that where the 'license_url' actually resides and where to put it. If you can guide me a bit more that would be really helpful. Thank you.

Akash-Kumar-Sen avatar Aug 14 '22 14:08 Akash-Kumar-Sen

@Akash-Kumar-Sen let's take a gitlab importer for example https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/importers/gitlab.py. We go to the repository ( data source ) https://gitlab.com/gitlab-org/advisories-community/-/tree/main and search for a LICENSE and add license_url , then we find the spdx_license_expression using https://spdx.org/licenses/

    spdx_license_expression = "MIT"
    license_url = "https://gitlab.com/gitlab-org/advisories-community/-/blob/main/LICENSE"

ziadhany avatar Aug 15 '22 14:08 ziadhany

@ziadhany so I have to do what you've just mentioned for the file https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/importers/github.py instead of https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/importers/gitlab.py?

Akash-Kumar-Sen avatar Aug 15 '22 14:08 Akash-Kumar-Sen

@Akash-Kumar-Sen So you need to go to github importer https://github.com/nexB/vulnerablecode/blob/main/vulnerabilities/importers/github.py . add this in line 165. license_url = "https://github.com/github/advisory-database/blob/main/LICENSE.md"

ziadhany avatar Aug 15 '22 15:08 ziadhany

@ziadhany thank you for your help, I am new to the world of open source, your help can be a milestone in my career.

Akash-Kumar-Sen avatar Aug 15 '22 15:08 Akash-Kumar-Sen

This is still open despite pull request https://github.com/nexB/vulnerablecode/pull/845. If @Akash-Kumar-Sen is not working on this right now, I can open a new pull request.

abhi-kr-2100 avatar Nov 21 '22 16:11 abhi-kr-2100

Is the issue is still open and what is remaining to be done?

PankajJaisu avatar Feb 11 '23 12:02 PankajJaisu