You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(install): Add --no-gpg-check flag and interactive GPG verification override (#2998)
* Add --no-gpg-check flag and GPG verification override prompt
* Display GPG verification failure details to user regardless of override choice
* Fix script early exit on GPG verification failure by handling set -e
* Add security warning for --no-gpg-check flag usage
* Remove redundant warning
printf"\\n${indent}$(fg_yellow 'Continuing without signature verification is NOT RECOMMENDED unless you have independently verified the package authenticity.')\\n\\n"
850
+
decrease_indent
851
+
852
+
commandprintf"${indent}Do you wish to continue installation without GPG verification? "
853
+
prompt "n"
854
+
read -r gpg_override_input
855
+
printf"\\n"
856
+
857
+
if [ "$gpg_override_input"!="y" ] && [ "$gpg_override_input"!="Y" ];then
858
+
if [ -n"$gpg_verify_output" ];then
859
+
increase_indent
860
+
error "Verification failed due to:"
861
+
printf"%s\n""$gpg_verify_output"
862
+
decrease_indent
863
+
fi
864
+
error_exit "$LINENO""Installation aborted due to GPG verification failure."
865
+
fi
866
+
867
+
warn "Continuing installation without GPG verification. Ensure package authenticity has been verified through other means."
868
+
fi
814
869
fi
815
870
unpack_package || error_exit "$LINENO""Failed to extract package"
816
871
succeeded
@@ -858,6 +913,13 @@ install_package()
858
913
}
859
914
860
915
verify_package() {
916
+
# If GPG check is skipped, return success immediately
917
+
if [ "$skip_gpg_check"="true" ];then
918
+
warn "GPG signature verification is being bypassed with the '--no-gpg-check' flag."
919
+
warn "This disables a critical security check and should only be used if your organization policies permit it."
0 commit comments