mirror of
https://github.com/jtesta/ssh-audit.git
synced 2026-05-25 07:21:23 +02:00
pr307 update 2
This commit is contained in:
@@ -12,7 +12,7 @@ class TestHardeningGuides:
|
||||
@staticmethod
|
||||
def _test_conf(conf, **kwargs):
|
||||
options = {
|
||||
'get_hardening_guides': ''
|
||||
'get_hardening_guides': '',
|
||||
}
|
||||
for k, v in kwargs.items():
|
||||
options[k] = v
|
||||
@@ -26,13 +26,16 @@ class TestHardeningGuides:
|
||||
with pytest.raises(SystemExit):
|
||||
conf = c('--get-hardening-guides')
|
||||
self._test_conf(conf)
|
||||
with pytest.raises(SystemExit):
|
||||
conf = c('--list-hardening-guides')
|
||||
self._test_conf(conf)
|
||||
|
||||
for vendor in ["Amazon", "Debian", "Rocky", "Mint", "Ubuntu", "NoOS"]:
|
||||
for vendor in ["Amazon", "Debian", "Rocky", "Mint", "Ubuntu", "NoOS", " "]:
|
||||
vendor = vendor
|
||||
for os_ver in ["2404", "2204", "2004", "1804", "2023", "22", "21", "20", "9", "Bookworm", "Bullseye", "NoVersion"]:
|
||||
for os_ver in ["2404", "2204", "2004", "1804", "2023", "22", "21", "20", "9", "Bookworm", "Bullseye", "NoVersion", ""]:
|
||||
os_ver = os_ver
|
||||
for cs_type in ["Client", "Server", "Mistake"]:
|
||||
for cs_type in ["Client", "Server", "Mistake", ""]:
|
||||
cs_type = cs_type
|
||||
with pytest.raises(SystemExit):
|
||||
conf = c(f'--print-config {vendor} {os_ver} {cs_type}')
|
||||
conf = c(f'--get-hardening-guides {vendor} {os_ver} {cs_type}')
|
||||
self._test_conf(conf)
|
||||
|
||||
Reference in New Issue
Block a user