Harden several CI and deployment scripts against potential injection vectors.
Changes
- .github/actions/configure-docker/action.yml: Migrated direct
githubcontext interpolation to intermediate environment variables to prevent potential script injection from untrusted context data. - contrib/macdeploy/macdeployqtplus: Refactored the
codesignsubprocess call to useshell=Falseand list-based arguments. Fixed several linting issues (E401, F841). - contrib/verify-binaries/verify.py:
- Replaced
wgetwithurllib.requestfor file retrieval, enforcing HTTP(S) protocols to mitigate potential LFI risks. - Fixed a bug in
verify_with_gpgwhere an empty string was passed to the--outputargument when no output file was specified. - Removed unused imports and cleaned up code.
- Replaced
- contrib/verify-binaries/test.py: Updated
run_verifyto execute viashell=False.
These changes reduce the attack surface for command injection in automated environments and local deployment scripts while improving code quality and reliability.