diff --git a/README.md b/README.md index 42814e7..33597bc 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ git clone https://github.com/drwetter/testssl.sh.git /opt/testssl ``` usage: nagios-testssl.py [-h] --uri URI --testssl TESTSSL + [--ignore-ids IGNORE_IDS] [--critical {LOW,MEDIUM,HIGH,CRITICAL}] [--warning {LOW,MEDIUM,HIGH,CRITICAL}] @@ -32,12 +33,13 @@ optional arguments: --uri URI host|host:port|URL|URL:port.Port 443 is default, URL can only contain HTTPS protocol --testssl TESTSSL Path to the testssl.sh script + --ignore-ids IGNORE_IDS + Comma separated list of test IDs to ignore --critical {LOW,MEDIUM,HIGH,CRITICAL} Findings of this severity level trigger a CRITICAL --warning {LOW,MEDIUM,HIGH,CRITICAL} Findings of this severity level trigger a WARNING ``` - # Examples Checking a URI with default severity levels: @@ -50,10 +52,10 @@ HIGH: secure_client_renego (VULNERABLE, DoS threat) HIGH: BREACH (potentially VULNERABLE, uses gzip HTTP compression - only supplied '/' tested) ``` -The same URI, but skipping specific test IDs: +The same URI, but ignoring two tests: ``` vagrant@buster:~$ ./nagios-testssl.py --testssl /opt/testssl/testssl.sh \ - --uri https://www.geant.org --skip-ids BREACH,secure_client_renego + --uri https://www.geant.org --ignore-ids BREACH,secure_client_renego OK: No issues found for https://www.geant.org with severity HIGH or higher. ``` diff --git a/nagios-testssl.py b/nagios-testssl.py index c5e97fc..4fca9c1 100755 --- a/nagios-testssl.py +++ b/nagios-testssl.py @@ -24,7 +24,7 @@ def nagios_exit(message, code): parser.add_argument('--uri', help='host|host:port|URL|URL:port.' 'Port 443 is default, URL can only contain HTTPS protocol', required=True) parser.add_argument('--testssl', help='Path to the testssl.sh script', required=True) - parser.add_argument('--skip-ids', help='Comma separated list of IDs to skip from the result', default='') + parser.add_argument('--ignore-ids', help='Comma separated list of test IDs to ignore', default='') parser.add_argument('--critical', help='Findings of this severity level trigger a CRITICAL', choices=severities.keys(), default='CRITICAL') parser.add_argument('--warning', help='Findings of this severity level trigger a WARNING', @@ -43,7 +43,7 @@ def nagios_exit(message, code): testssl = args.testssl critical = args.critical warning = args.warning - skip_ids = args.skip_ids.split(',') + ignore_ids = args.ignore_ids.split(',') # trailing_args = args.trailing_args # pprint(args) @@ -89,8 +89,8 @@ def nagios_exit(message, code): # Filter out only supported severity levels r = [x for x in r if x['severity'] in severities.keys()] - # Filter out skip_ids - r = [x for x in r if x['id'] not in skip_ids] + # Filter out ignore_ids + r = [x for x in r if x['id'] not in ignore_ids] # Add integer severity level for item in r: