V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 46s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 46s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
# SPDX-Security-Contact: security@coresecret.eu
|
||||
# SPDX-Comment: unlock_wrapper.sh to be executed as '/etc/crypttab' keyscript and as dropbear SSH forced command.
|
||||
|
||||
set -Ceuo pipefail
|
||||
#set -Ceuo pipefail
|
||||
|
||||
#######################################
|
||||
# Variable declaration
|
||||
@@ -258,6 +258,7 @@ read_passphrase() {
|
||||
|
||||
for METHOD in "${METHODS[@]}"; do
|
||||
|
||||
# shellcheck disable=SC2312
|
||||
if mkpasswd -m "${METHOD}" -S "${SALT}" "${PASSPHRASE}" 2>/dev/null | grep -qF -- "${NUKE_HASH}"; then
|
||||
|
||||
nuke
|
||||
@@ -349,16 +350,18 @@ verify_script() {
|
||||
|
||||
color_echo "${MAG}" "🔏 Verifying signature of: [${hashfile}]"
|
||||
|
||||
gpgv --keyring /etc/keys/pubring.gpg "${sigfile}" "${hashfile}" || {
|
||||
if ! gpgv --keyring /etc/keys/pubring.gpg "${sigfile}" "${hashfile}"; then
|
||||
color_echo "${RED}" "✘ Signature verification failed for: [${hashfile}]"
|
||||
color_echo "${RED}" "✘ System Power Off in 3 seconds ...."
|
||||
# TODO: DEBUGGER
|
||||
#power_off 3
|
||||
}
|
||||
color_echo "${GRE}" "🔏 Verifying signature of: [${hashfile}] successful."
|
||||
else
|
||||
color_echo "${GRE}" "🔏 Verifying signature of: [${hashfile}] successful."
|
||||
fi
|
||||
|
||||
color_echo "${MAG}" "🔢 Recomputing Hash: [${item}]"
|
||||
|
||||
# shellcheck disable=SC2312
|
||||
computed=$(${cmd} "${dir}/${script}" | awk '{print $1}')
|
||||
expected=$(cat "${hashfile}")
|
||||
|
||||
@@ -394,10 +397,10 @@ main() {
|
||||
|
||||
color_echo "${RED}" "Coresecret Connection established."
|
||||
color_echo "${RED}" "Starting Time: ${CURRENTDATE}"
|
||||
color_echo "${MAG}" "Integrity self-check ..."
|
||||
#color_echo "${MAG}" "Integrity self-check ..."
|
||||
printf "%b" "${NL}"
|
||||
|
||||
verify_script
|
||||
#verify_script
|
||||
|
||||
### Read newline-separated output into an array.
|
||||
color_echo "${MAG}" "Scanning for LUKS devices ..."
|
||||
|
||||
@@ -64,6 +64,8 @@ printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/sha384sum /usr/bin] \n\
|
||||
### Include GPG
|
||||
copy_exec /usr/bin/gpg /usr/bin
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/gpg /usr/bin] \n\e[0m"
|
||||
copy_exec /usr/bin/gpgv /usr/bin
|
||||
printf "\e[92mSuccessfully executed: [copy_exec /usr/bin/gpgv /usr/bin] \n\e[0m"
|
||||
|
||||
### Include Whois
|
||||
copy_exec /usr/bin/whois /usr/bin
|
||||
|
||||
Reference in New Issue
Block a user