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
{{ message }}
This repository was archived by the owner on May 24, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 24, 2026. It is now read-only.
security: envsubst on image/container fields allows environment variable injection #14
image and container config fields are piped through envsubst without validating the expanded result. If a container environment variable contains shell metacharacters, they will be inserted into the generated script unescaped.
And MALICIOUS_VAR="alpine; rm -rf /tmp", the generated script would expand to include the injected content. While the companion fix (quoting IMAGE in the generated command) reduces immediate exploitability, the underlying unvalidated substitution remains a latent risk for future refactors.
Recommended Fix
Validate the expanded value against an allowlist pattern after substitution:
IMAGE=$(echo "${1}"| jq -r .image | envsubst)if [[ !"${IMAGE}"=~ ^[a-zA-Z0-9:/_\.\-]+$ ]];thenecho"Error: invalid image name '${IMAGE}'"return 1
fi
Activity