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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
4 changes: 3 additions & 1 deletion framework/python/src/test_orc/test_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ def _calculate_result(self):
result = "Compliant"
for test_result in self._session.get_test_results():
if (test_result.required_result.lower() == "required"
and test_result.result.lower() != "compliant"):
and test_result["result"].lower() != "compliant"
jboddey marked this conversation as resolved.
Show resolved Hide resolved
and ("enabled" in test_result
and not test_result["enabled"])):
result = "Non-Compliant"
return result

Expand Down
8 changes: 6 additions & 2 deletions modules/test/base/python/src/test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,12 @@ def run_tests(self):
else:
test['description'] = 'No description was provided for this test'
else:
test['result'] = 'Error'
test['description'] = 'An error occured whilst running this test'
if 'enabled' in test and not test['enabled']:
test['result'] = 'Skipped'
test['description'] = 'Test disabled'
else:
test['result'] = 'Error'
test['description'] = 'An error occured whilst running this test'

# Remove the steps to resolve if compliant already
if (test['result'] == 'Compliant' and
Expand Down
7 changes: 7 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,13 @@
"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": "Recommended",
"enabled": false
}
]
}
Expand Down
23 changes: 23 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,29 @@
"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": "Recommended",
"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"
],
"enabled":false
},
{
"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": "Recommended",
"recommendations": [
"Disable connections to unsecure services",
"Ensure any URLs connected to are secure (https)"
],
"enabled":false
}
]
}
Expand Down
Loading