Skip to content

Commit b3ed054

Browse files
Merge pull request #3055 from VWS-Python/env-vars-release
Move release and tag version into env vars to prevent template injection
2 parents a40731e + 07d92f9 commit b3ed054

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ jobs:
4545

4646
- name: Get the changelog underline
4747
id: changelog_underline
48+
env:
49+
RELEASE: ${{ steps.calver.outputs.release }}
4850
run: |
49-
underline="$(echo "${{ steps.calver.outputs.release }}" | tr -c '\n' '-')"
51+
underline="$(echo "$RELEASE" | tr -c '\n' '-')"
5052
echo "underline=${underline}" >> "$GITHUB_OUTPUT"
5153
5254
- name: Update changelog
@@ -64,8 +66,10 @@ jobs:
6466
regex: false
6567

6668
- name: Check Update changelog was modified
69+
env:
70+
MODIFIED_FILES: ${{ steps.update_changelog.outputs.modifiedFiles }}
6771
run: |
68-
if [ "${{ steps.update_changelog.outputs.modifiedFiles }}" = "0" ]; then
72+
if [ "$MODIFIED_FILES" = "0" ]; then
6973
echo "Error: No files were modified when updating changelog"
7074
exit 1
7175
fi

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,16 @@ jobs:
131131
cache-dependency-glob: '**/pyproject.toml'
132132

133133
- name: Set secrets file
134-
run: |
135-
# See the "CI Setup" document for details of how this was set up.
136-
ci/decrypt_secret.sh
137-
tar xvf "${HOME}"/secrets/secrets.tar
138-
cp ./ci_secrets/vuforia_secrets_${{ strategy.job-index }}.env ./vuforia_secrets.env
139134
env:
140135
CI_PATTERN: ${{ matrix.ci_pattern }}
141136
ENCRYPTED_FILE: secrets.tar.gpg
142137
LARGE_SECRET_PASSPHRASE: ${{ secrets.PASSPHRASE_FOR_VUFORIA_SECRETS }}
138+
JOB_INDEX: ${{ strategy.job-index }}
139+
run: |
140+
# See the "CI Setup" document for details of how this was set up.
141+
ci/decrypt_secret.sh
142+
tar xvf "${HOME}"/secrets/secrets.tar
143+
cp "./ci_secrets/vuforia_secrets_${JOB_INDEX}.env" ./vuforia_secrets.env
143144
144145
# We have seen issues with running out of disk space on test_docker
145146
- name: Free Disk Space (Ubuntu)

zizmor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@ rules:
88
disable: true
99
superfluous-actions:
1010
disable: true
11-
template-injection:
12-
disable: true

0 commit comments

Comments
 (0)