Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/setup-python-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ runs:
args="$args --group docs"
fi
if [[ -n "$EXTRA_ARGS" ]]; then
# Validate each whitespace-split token: must start with '-' and contain only safe flag characters.
# NOTE: '--' (end-of-options marker) is intentionally allowed; positional args would fail validation.
for arg in $EXTRA_ARGS; do
if [[ ! "$arg" =~ ^-[a-zA-Z0-9=._:/@+-]+$ ]]; then
echo "::error::Unsafe extra-args token: '$arg'. Each token must start with '-' and contain only safe flag characters." >&2
exit 1
fi
done
fi
# shellcheck disable=SC2086 # intentional word-splitting for uv flags
# shellcheck disable=SC2086 # intentional word-splitting for uv flags (all tokens validated above)
uv sync $args $EXTRA_ARGS