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

Disabled test results #212

Merged
merged 9 commits into from
Jul 22, 2024
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
10 changes: 8 additions & 2 deletions framework/python/src/test_orc/test_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,19 +436,25 @@ def _run_test_module(self, module):

try:
with open(results_file, "r", encoding="utf-8-sig") as f:

# Load results from JSON file
module_results_json = json.load(f)
module_results = module_results_json["results"]
for test_result in module_results:

# Convert dict into TestCase object
# Convert dict from json into TestCase object
test_case = TestCase(
name=test_result["name"],
description=test_result["description"],
expected_behavior=test_result["expected_behavior"],
required_result=test_result["required_result"],
result=test_result["result"])
test_case.result=test_result["result"]

# Any informational test should always report informational
if test_case.required_result == "Informational":
test_case.result = "Informational"

# Add steps to resolve if test is non-compliant
if (test_case.result == "Non-Compliant" and
"recommendations" in test_result):
test_case.recommendations = test_result["recommendations"]
Expand Down
6 changes: 6 additions & 0 deletions modules/test/dns/conf/module_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
"recommendations": [
"Install a DNS client that supports fetching DNS servers from DHCP options"
]
},
{
"name": "dns.mdns",
"test_description": "If the device has MDNS (or any kind of IP multicast), can it be disabled",
"expected_behavior": "Device may send MDNS requests",
"required_result": "Informational"
}
]
}
Expand Down
21 changes: 21 additions & 0 deletions modules/test/tls/conf/module_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,27 @@
"Disable connections to unsecure services",
"Ensure any URLs connected to are secure (https)"
]
},
{
"name": "security.tls.v1_3_server",
"test_description": "Check the device web server TLS 1.3 & certificate is valid",
"expected_behavior": "TLS 1.3 certificate is issued to the web browser client when accessed",
"required_result": "Informational",
"recommendations": [
"Enable TLS 1.3 support in the web server configuration",
"Disable TLS 1.0 and 1.1",
"Sign the certificate used by the web server"
]
},
{
"name": "security.tls.v1_3_client",
"test_description": "Device uses TLS with connection to an external service on port 443 (or any other port which could be running the webserver-HTTPS)",
"expected_behavior": "The packet indicates a TLS connection with at least TLS 1.3",
"required_result": "Informational",
"recommendations": [
"Disable connections to unsecure services",
"Ensure any URLs connected to are secure (https)"
]
}
]
}
Expand Down