Skip to content

Commit 2af9d56

Browse files
authored
Securely map changed files to environment variable
Vulnerability: Script Injection via Untrusted Input
1 parent 6fa1ff5 commit 2af9d56

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/check-generated-files.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ jobs:
2727

2828
- name: Fail if generated files are out of sync
2929
if: steps.verify-changed-files.outputs.files_changed == 'true'
30+
# SECURITY: Map untrusted input to an environment variable.
31+
# This prevents the shell from interpreting special characters in filenames as commands.
32+
env:
33+
CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }}
3034
run: |
3135
echo "::error::Generated files are out of sync!"
3236
echo ""
3337
echo "The following files need to be regenerated:"
34-
echo "${{ steps.verify-changed-files.outputs.changed_files }}"
38+
echo "$CHANGED_FILES"
3539
echo ""
3640
echo "Please run the following commands locally and commit the changes:"
3741
echo " make ui-static"

0 commit comments

Comments
 (0)