Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 811b090

Browse files
committed
Avoid potentialy user-controlled template expansion in workflows
I don't believe `do_no_merge.yml` is unsafe, but there's no need to echo the environment variable (it'll either pass or fail based on the value anyway.) I also don't think the `circleci.yml` context variable is vulnerable, but zizmor warns about it, and it's easy to avoid if turns out to be vulnerable.
1 parent 5b9f4bc commit 811b090

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/circleci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ jobs:
3434

3535
- name: Fetch result artifacts
3636
id: fetch-artifacts
37+
env:
38+
target_url: "${{ github.event.target_url }}"
3739
run: |
38-
python .circleci/fetch_doc_logs.py "${{ github.event.target_url }}"
40+
python .circleci/fetch_doc_logs.py "${target_url}"
3941
4042
- name: Set up reviewdog
4143
if: "${{ steps.fetch-artifacts.outputs.count != 0 }}"

.github/workflows/do_not_merge.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
echo "This PR cannot be merged because it has one of the following labels: "
2424
echo "* status: needs comment/discussion"
2525
echo "* status: waiting for other PR"
26-
echo "${{env.has_tag}}"
2726
exit 1
2827
- name: Allow merging
2928
if: ${{'false' == env.has_tag}}

0 commit comments

Comments
 (0)