Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions vulnerabilities/importers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from vulnerabilities.importers import alpine_linux
from vulnerabilities.importers import apache_httpd
from vulnerabilities.importers import apache_tomcat
from vulnerabilities.importers import archlinux
from vulnerabilities.importers import debian
from vulnerabilities.importers import debian_oval
Expand Down Expand Up @@ -55,6 +56,7 @@
project_kb_msr2019.ProjectKBMSRImporter,
suse_scores.SUSESeverityScoreImporter,
elixir_security.ElixirSecurityImporter,
apache_tomcat.ApacheTomcatImporter,
]

IMPORTERS_REGISTRY = {x.qualified_name: x for x in IMPORTERS_REGISTRY}
592 changes: 488 additions & 104 deletions vulnerabilities/importers/apache_tomcat.py

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions vulnerabilities/severity_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,27 @@ def compute(self, scoring_elements: str) -> str:
name="Apache Httpd Severity",
url="https://httpd.apache.org/security/impact_levels.html",
)
APACHE_HTTPD.choices = [
"Critical",
"Important",
"Moderate",
"Low",
]

# This is essentially identical to apache_http except for the addition of the "High" score,
# which seems to be used interchangeably for "Important".
APACHE_TOMCAT = ScoringSystem(
identifier="apache_tomcat",
name="Apache Tomcat Severity",
url="https://tomcat.apache.org/security-impact.html",
)
APACHE_TOMCAT.choices = [
"Critical",
"High",
"Important",
"Moderate",
"Low",
]

SCORING_SYSTEMS = {
system.identifier: system
Expand All @@ -137,5 +158,6 @@ def compute(self, scoring_elements: str) -> str:
CVSS31_QUALITY,
GENERIC,
APACHE_HTTPD,
APACHE_TOMCAT,
)
}
1 change: 0 additions & 1 deletion vulnerabilities/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def no_rmtree(monkeypatch):
# Step 3: Migrate all the tests
collect_ignore = [
"test_apache_kafka.py",
"test_apache_tomcat.py",
"test_api.py",
"test_models.py",
"test_package_managers.py",
Expand Down
568 changes: 367 additions & 201 deletions vulnerabilities/tests/test_apache_tomcat.py

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading