Skip to content

Commit 2f77692

Browse files
authored
Commands.yml - whitelist sourced variables in apply phase (#18818)
1 parent d82b8df commit 2f77692

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/commands.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,15 @@ jobs:
118118
- name: Read metadata
119119
id: read-meta
120120
run: |
121-
source result
121+
run_step_outcome=""
122+
hasPatch=""
123+
while IFS='=' read -r key value; do
124+
case "$key" in
125+
run_step_outcome) run_step_outcome="$value" ;;
126+
hasPatch) hasPatch="$value" ;;
127+
*) echo "Unexpected key: $key" >&2; exit 1 ;;
128+
esac
129+
done < result
122130
echo "run_step_outcome=$run_step_outcome" >> $GITHUB_OUTPUT
123131
echo "hasPatch=$hasPatch" >> $GITHUB_OUTPUT
124132

0 commit comments

Comments
 (0)