Summary
The deploy-prod.yml workflow uses a raw workflow_dispatch input (inputs.image) directly in a shell command without validation or quoting. A crafted image value could execute arbitrary shell fragments on the self-hosted production runner.
Steps to Address
- Validate
inputs.image against a tight whitelist (e.g., allow only registry/name[:tag] characters — alphanumerics, ., -, _, /, :, @) before use.
- Reject any value containing shell metacharacters.
- Pass the validated value to
docker pull wrapped in quotes (e.g., "$IMAGE").
References
Requested by @ForeverProglamer.
Summary
The
deploy-prod.ymlworkflow uses a rawworkflow_dispatchinput (inputs.image) directly in a shell command without validation or quoting. A craftedimagevalue could execute arbitrary shell fragments on the self-hosted production runner.Steps to Address
inputs.imageagainst a tight whitelist (e.g., allow only registry/name[:tag] characters — alphanumerics,.,-,_,/,:,@) before use.docker pullwrapped in quotes (e.g.,"$IMAGE").References
Requested by @ForeverProglamer.