Skip to content

Commit 87c71f7

Browse files
committed
load data from json instead of loading data from yaml
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 70e92d3 commit 87c71f7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

vulnerabilities/importers/alpine_linux.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
# for any legal advice.
2121
# VulnerableCode is a free software code scanning tool from nexB Inc. and others.
2222
# Visit https://github.com/nexB/vulnerablecode/ for support and download.
23+
import json
2324
from typing import Any
2425
from typing import Iterable
2526
from typing import List
2627
from typing import Mapping
2728

2829
import requests
29-
import saneyaml
3030
from bs4 import BeautifulSoup
3131

3232
from vulnerabilities.helpers import is_cve
@@ -58,16 +58,16 @@ def fetch_advisory_links():
5858
[
5959
f"{advisory_directory_link}{anchore_tag.text}"
6060
for anchore_tag in advisory_directory_page.find_all("a")
61-
if anchore_tag.text.endswith("yaml")
61+
if anchore_tag.text.endswith("json")
6262
]
6363
)
6464

6565
return advisory_links
6666

6767

6868
def process_link(link) -> Iterable[Iterable[AdvisoryData]]:
69-
yaml_response = requests.get(link).content
70-
record = saneyaml.load(yaml_response)
69+
json_response = requests.get(link).content
70+
record = json.loads(json_response)
7171
advisories: List[AdvisoryData] = []
7272

7373
if record["packages"] is None:

0 commit comments

Comments
 (0)