Skip to content

Commit

Permalink
Merge pull request #1445 from poju3185/fix-vulntotal-import
Browse files Browse the repository at this point in the history
Update GitHub GraphQL import in vulntotal datasources
  • Loading branch information
keshav-space committed May 13, 2024
2 parents 4a6734b + 22132ef commit 045fedd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"https://api.github.com/graphql", # Requires auth
"https://anongit.gentoo.org/git/data/glsa.git", # Git only link
"https://www.softwaretestinghelp.com/how-to-write-good-bug-report/", # Cloudflare protection
"https://www.openssl.org/news/vulnerabilities.xml", # OpenSSL legacy advisory URL, not longer available
]

# Add any Sphinx extension module names here, as strings. They can be
Expand Down
4 changes: 2 additions & 2 deletions vulntotal/datasources/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from typing import Iterable

from dotenv import load_dotenv
from fetchcode.package_versions import github_response
from packageurl import PackageURL

from vulnerabilities import utils
from vulntotal.validator import DataSource
from vulntotal.validator import InvalidCVEError
from vulntotal.validator import VendorData
Expand All @@ -35,7 +35,7 @@ def fetch_github(self, graphql_query):
GH_TOKEN="your-github-token"
"""
load_dotenv()
return utils.fetch_github_graphql_query(graphql_query)
return github_response(graphql_query)

def datasource_advisory(self, purl) -> Iterable[VendorData]:
end_cursor = ""
Expand Down

0 comments on commit 045fedd

Please sign in to comment.