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
# Validate extra-install-packages to prevent code injection
40
+
- name: Validate package names
41
+
if: ${{ inputs.extra-install-packages }}
42
+
shell: bash
43
+
run: |
44
+
packages="${{ inputs.extra-install-packages }}"
45
+
# Only allow alphanumeric characters, hyphens, periods, plus signs, underscores, and spaces
46
+
if ! echo "$packages" | grep -E '^[a-zA-Z0-9._+-]+( [a-zA-Z0-9._+-]+)*$' > /dev/null; then
47
+
echo "::error::Invalid package names in extra-install-packages. Only alphanumeric characters, hyphens, periods, plus signs, underscores, and spaces are allowed."
48
+
exit 1
49
+
fi
50
+
35
51
# Using a pre-built docker image in GitHub container registry instead of NPM to reduce possible attack vectors.
36
-
- name: Run DangerJS
37
-
id: danger
52
+
- name: Setup container
38
53
shell: bash
39
54
run: |
40
-
docker run \
55
+
# Start a detached container with all necessary volumes and environment variables
0 commit comments