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

fix: fix typo in curl_source.py #3258

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cve_bin_tool/data_sources/curl_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, error_mode=ErrorMode.TruncTrace):
self.session = None
self.affected_data = None
self.source_name = self.SOURCE
self.vulnerbility_data = []
self.vulnerability_data = []

async def get_cve_data(self):
await self.fetch_cves()
Expand All @@ -59,16 +59,16 @@ async def fetch_cves(self):
async def download_curl_vulnerabilities(self, session: RateLimiter) -> None:
async with await session.get(self.DATA_SOURCE_LINK) as response:
response.raise_for_status()
self.vulnerbility_data = await response.json()
self.vulnerability_data = await response.json()
path = Path(str(Path(self.cachedir) / "vuln.json"))
filepath = path.resolve()
async with FileIO(filepath, "w") as f:
await f.write(json.dumps(self.vulnerbility_data, indent=4))
await f.write(json.dumps(self.vulnerability_data, indent=4))

def get_cve_list(self):
self.affected_data = []

for cve in self.vulnerbility_data:
for cve in self.vulnerability_data:
affected = {
"cve_id": cve["aliases"][0],
"vendor": "haxx",
Expand Down
Loading