Skip to content

Commit 686b04a

Browse files
committed
[fix] Fix shell syntax and protect against shell injection #613
1 parent d19d977 commit 686b04a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/reusable-bot-autoassign.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ jobs:
4444
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
4545
REPOSITORY: ${{ github.repository }}
4646
GITHUB_EVENT_NAME: ${{ github.event_name }}
47-
run: >
47+
BOT_COMMAND: ${{ inputs.bot_command }}
48+
run: |
4849
if [ -n "$GITHUB_EVENT_PATH" ]; then
49-
python openwisp-utils/.github/actions/bot-autoassign/__main__.py ${{ inputs.bot_command }} "$GITHUB_EVENT_PATH"
50+
python openwisp-utils/.github/actions/bot-autoassign/__main__.py "$BOT_COMMAND" "$GITHUB_EVENT_PATH"
5051
else
51-
python openwisp-utils/.github/actions/bot-autoassign/__main__.py ${{ inputs.bot_command }}
52+
python openwisp-utils/.github/actions/bot-autoassign/__main__.py "$BOT_COMMAND"
5253
fi

0 commit comments

Comments
 (0)