.github: workflows: Guard any shell $VAR with "..."

This is with regards to what happened to another project, ref:

<https://www.wiz.io/blog/ultralytics-ai-library-hacked-via-github-for-cryptomining>

Basically, do NOT trust that things like branch names don't contain any
attempt at executing shell code if referenced in a workflow segment that
runs a shell command.
This commit is contained in:
Athanasius committed 2024-12-09 21:43:47 +00:00
1 parent 0938013a2d
commit 214bed27ee
4 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ jobs:
- name: Create submodules changes branch
if: steps.check_for_changes.outputs.changes == 'true'
run: |
git checkout -b "submodule-change/$GITHUB_RUN_ID" $CHECKOUT_BRANCH
git checkout -b "submodule-change/$GITHUB_RUN_ID" "$CHECKOUT_BRANCH"
git commit -am "updating submodules"
git push --set-upstream origin "submodule-change/$GITHUB_RUN_ID"