Skip to content

Commit de3d685

Browse files
committed
Begin work on hard-coded dictionary #970
Reference: #970 Signed-off-by: John M. Horan <[email protected]>
1 parent 4389f45 commit de3d685

9 files changed

+2744
-141
lines changed

vulnerabilities/importers/apache_tomcat.py

Lines changed: 210 additions & 136 deletions
Large diffs are not rendered by default.

vulnerabilities/tests/test_apache_tomcat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
2929
TEST_DATA = os.path.join(BASE_DIR, "test_data/apache_tomcat")
3030

31-
# security_updates_home = "https://tomcat.apache.org/security"
32-
3331

3432
# Temp test to flesh out `extract_advisories_from_page()` -- the method .
3533
def test_method_extract_advisories_from_page():
36-
with open(os.path.join(TEST_DATA, "apache_tomcat_cve-2020-9484.html")) as f:
34+
# with open(os.path.join(TEST_DATA, "apache_tomcat_cve-2020-9484.html")) as f:
35+
with open(os.path.join(TEST_DATA, "apache_tomcat-selected-advisories.html")) as f:
3736
raw_data = f.read()
3837
extracted_advisories = ApacheTomcatImporter().extract_advisories_from_page(raw_data)
3938

@@ -333,7 +332,8 @@ def test_fetch_links():
333332
]
334333

335334

336-
def test_to_version_ranges_test():
335+
# def test_to_version_ranges_test():
336+
def test_to_version_ranges():
337337
versions_data = [
338338
"1.0.0-2.0.0",
339339
"3.2.2-3.2.3?",

vulnerabilities/tests/test_data/apache_tomcat/apache_tomcat-selected-advisories.html

Lines changed: 395 additions & 0 deletions
Large diffs are not rendered by default.

vulnerabilities/tests/test_data/apache_tomcat/apache_tomcat_cve-2020-9484.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="UTF-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8-
<title>simple-html-01.html</title>
8+
<title>apache_tomcat_cve-2020-9484.html</title>
99

1010

1111
<style>

0 commit comments

Comments
 (0)