mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-30 21:35:26 +01:00 
			
		
		
		
	Strict check on binaries needed: no busybox
When users try to reinvent the wheel and write an own dockerfile this PR checks when binaries come from busybox -- as it is the case with Alpine Linux.
This commit is contained in:
		| @@ -8442,7 +8442,7 @@ certificate_info() { | |||||||
|           prln_svrty_medium ">= 5 years is too long" |           prln_svrty_medium ">= 5 years is too long" | ||||||
|           fileout "cert_validityPeriod${json_postfix}" "MEDIUM" "$((diffseconds / 3600 * 24 )) days" |           fileout "cert_validityPeriod${json_postfix}" "MEDIUM" "$((diffseconds / 3600 * 24 )) days" | ||||||
|      else |      else | ||||||
|           [[ "$DEBUG" -ge 1 ]] && outln "OK: below 5 years certificate life time" |           [[ "$DEBUG" -ge 1 ]] && outln "${spaces}OK: below 5 years certificate life time" | ||||||
|           fileout "cert_validityPeriod${json_postfix}" "INFO" "$((diffseconds / 3600 * 24 )) days" |           fileout "cert_validityPeriod${json_postfix}" "INFO" "$((diffseconds / 3600 * 24 )) days" | ||||||
|      fi |      fi | ||||||
|  |  | ||||||
| @@ -18480,6 +18480,10 @@ check_base_requirements() { | |||||||
|           if ! type -p "${binary}" &> /dev/null; then |           if ! type -p "${binary}" &> /dev/null; then | ||||||
|                fatal "You need to install ${binary} for this program to work" $ERR_RESOURCE |                fatal "You need to install ${binary} for this program to work" $ERR_RESOURCE | ||||||
|           fi |           fi | ||||||
|  |           "${binary}" --help 2>&1 | grep -ivq busybox | ||||||
|  |           if [[ $? -ne 0 ]]; then | ||||||
|  |                fatal "${binary} is from busybox. Please install a regular binary" $ERR_RESOURCE | ||||||
|  |           fi | ||||||
|      done |      done | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dirk Wetter
					Dirk Wetter