File tree Expand file tree Collapse file tree
vulnerabilities/importers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
2324from typing import Any
2425from typing import Iterable
2526from typing import List
2627from typing import Mapping
2728
2829import requests
29- import saneyaml
3030from bs4 import BeautifulSoup
3131
3232from 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
6868def 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 :
You can’t perform that action at this time.
0 commit comments