mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
fix: Prevent script injection vulnerability in get-compose-action (#4179)
fix: Prevent script injection in get-compose-action Use environment variable to pass inputs.version instead of direct interpolation in run script to prevent potential script injection. Refs: DI-967, VULN-761 Co-authored-by: fix-it-felix-sentry[bot] <260785270+fix-it-felix-sentry[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
co-authored by
fix-it-felix-sentry[bot] <260785270+fix-it-felix-sentry[bot]@users.noreply.github.com>
parent
c2ed7f7206
commit
4e2f38e391
@@ -10,10 +10,12 @@ runs:
|
||||
steps:
|
||||
- name: Get Compose
|
||||
shell: bash
|
||||
env:
|
||||
COMPOSE_VERSION: ${{ inputs.version }}
|
||||
run: |
|
||||
# Docker Compose v1 is installed here, remove it
|
||||
sudo rm -f "/usr/local/bin/docker-compose"
|
||||
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
|
||||
sudo mkdir -p "/usr/local/lib/docker/cli-plugins"
|
||||
sudo curl -L https://github.com/docker/compose/releases/download/v${{ inputs.version }}/docker-compose-`uname -s`-`uname -m` -o "/usr/local/lib/docker/cli-plugins/docker-compose"
|
||||
sudo curl -L https://github.com/docker/compose/releases/download/v"$COMPOSE_VERSION"/docker-compose-`uname -s`-`uname -m` -o "/usr/local/lib/docker/cli-plugins/docker-compose"
|
||||
sudo chmod +x "/usr/local/lib/docker/cli-plugins/docker-compose"
|
||||
|
||||
Reference in New Issue
Block a user