Skip to content

Commit 06ef50e

Browse files
Merge pull request #1 from fahrradflucht/bugfix/stop-commands-in-history-log
Prevent workflow command injection via commit history log
2 parents 4ed4496 + eeda9c0 commit 06ef50e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ declare -A history_type=(
166166
["compare"]="$(git log "${tag_commit}".."${commit}" --format=%B)" \
167167
)
168168
log=${history_type[${branch_history}]}
169+
stop_commands_token=$(cat /proc/sys/kernel/random/uuid)
170+
echo "::stop-commands::${stop_commands_token}"
169171
printf "History:\n---\n%s\n---\n" "$log"
172+
echo "::${stop_commands_token}::"
170173

171174
if [ -z "$tagPrefix" ]
172175
then

0 commit comments

Comments
 (0)