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

Update GitHub GraphQL import in vulntotal datasources #1445

Merged
merged 3 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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