diff --git a/default.prf b/default.prf index e1d9cbb6..5e48be31 100644 --- a/default.prf +++ b/default.prf @@ -303,10 +303,13 @@ permdir:/root/.ssh:rwx------:root:-:WARN: #config:skip_upgrade_test:yes: # The URL prefix and append to URL's for your custom tests -# Link will be build with: {control_url_prepend}CONTROL-ID{control_url_append} -#config:control_url_prepend:https://cisofy.com/control/: +# Link will be build with: {control_url_protocol}://{control_url_prepend}CONTROL-ID{control_url_append} +#config:control_url_protocol:https: +#config:control_url_prepend:cisofy.com/control/: #config:control_url_append:/: -#config:custom_url_prepend:https://your-domain.example.org/control-info/: +# The URL prefix and append to URL's for your custom tests +#config:custom_url_protocol:https: +#config:custom_url_prepend:ayour-domain.example.org/control-info/: #config:custom_url_append:/: ################################################################################# diff --git a/include/consts b/include/consts index ce4550c3..367409df 100644 --- a/include/consts +++ b/include/consts @@ -63,9 +63,11 @@ unset LANG COMPRESSED_UPLOADS=0 CONTROL_URL_APPEND="" CONTROL_URL_PREPEND="" + CONTROL_URL_PROTOCOL="" CSUMBINARY="" CUSTOM_URL_APPEND="" CUSTOM_URL_PREPEND="" + CUSTOM_URL_PROTOCOL="" DISCOVERED_BINARIES="" DOCKER_DAEMON_RUNNING=0 FILEVALUE="" diff --git a/include/profiles b/include/profiles index 53c1b794..e951c474 100644 --- a/include/profiles +++ b/include/profiles @@ -58,6 +58,11 @@ CONTROL_URL_PREPEND="${VALUE}" ;; + # Protocol to use for control information link + control_url_protocol) + CONTROL_URL_PROTOCOL="${VALUE}" + ;; + # Append something to URL for control information (only applies to CUST-*) custom_url_append) CUSTOM_URL_APPEND="${VALUE}" @@ -68,6 +73,11 @@ CUSTOM_URL_PREPEND="${VALUE}" ;; + # Protocol to use for control information link + custom_url_protocol) + CUSTOM_URL_PROTOCOL="${VALUE}" + ;; + # Do not check security repository in sources.list (Debian/Ubuntu) debian_skip_security_repository) OPTION_DEBIAN_SKIP_SECURITY_REPOSITORY="${VALUE}" diff --git a/include/report b/include/report index f398eed0..fd54e56d 100644 --- a/include/report +++ b/include/report @@ -96,9 +96,11 @@ # ################################################################################# # - if [ "${CONTROL_URL_PREPEND}" = "" ]; then CONTROL_URL_PREPEND="https://cisofy.com/controls/"; fi + if [ "${CONTROL_URL_PROTOCOL}" = "" ]; then CONTROL_URL_PROTOCOL="https"; fi + if [ "${CONTROL_URL_PREPEND}" = "" ]; then CONTROL_URL_PREPEND="cisofy.com/controls/"; fi if [ "${CONTROL_URL_APPEND}" = "" ]; then CONTROL_URL_APPEND="/"; fi - if [ "${CUSTOM_URL_PREPEND}" = "" ]; then CUSTOM_URL_PREPEND="https://your-domain.example.org/controls/"; fi + if [ "${CUSTOM_URL_PROTOCOL}" = "" ]; then CUSTOM_URL_PROTOCOL="https"; fi + if [ "${CUSTOM_URL_PREPEND}" = "" ]; then CUSTOM_URL_PREPEND="your-domain.example.org/controls/"; fi if [ "${CUSTOM_URL_APPEND}" = "" ]; then CUSTOM_URL_APPEND="/"; fi # Show warnings from logfile @@ -115,9 +117,9 @@ IS_CUSTOM=`echo ${ADDLINK} | grep "^CUST"` echo " ${WHITE}- ${SHOWWARNING}${NORMAL}" if [ "${IS_CUSTOM}" = "" ]; then - echo " ${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}" + echo " ${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}" else - echo " ${CUSTOM_URL_PREPEND}${ADDLINK}${CUSTOM_URL_APPEND}" + echo " ${CUSTOM_URL_PROTOCOL}://${CUSTOM_URL_PREPEND}${ADDLINK}${CUSTOM_URL_APPEND}" fi echo "" done @@ -139,9 +141,9 @@ echo " - ${SHOWSUGGESTION}" if [ ! "${DETAILS}" = "-" ]; then echo " - Details: ${DETAILS}"; fi if [ "${IS_CUSTOM}" = "" ]; then - echo " ${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}" + echo " ${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}" else - echo " ${CUSTOM_URL_PREPEND}${ADDLINK}${CUSTOM_URL_APPEND}" + echo " ${CUSTOM_URL_PROTOCOL}://${CUSTOM_URL_PREPEND}${ADDLINK}${CUSTOM_URL_APPEND}" fi done echo ""