Skip to content

Commit b6115ca

Browse files
committed
Fix error[template-injection]: code injection via template expansion
1 parent 6b7f89f commit b6115ca

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
env:
2323
branch_base: 'origin/${{ github.event.pull_request.base.ref }}'
2424
branch_pr: 'origin/${{ github.event.pull_request.head.ref }}'
25+
commits: ${{ github.event.pull_request.commits }}
2526
refspec_base: '+${{ github.event.pull_request.base.sha }}:remotes/origin/${{ github.event.pull_request.base.ref }}'
2627
refspec_pr: '+${{ github.event.pull_request.head.sha }}:remotes/origin/${{ github.event.pull_request.head.ref }}'
2728
steps:
@@ -40,7 +41,7 @@ jobs:
4041
if: github.event_name == 'pull_request'
4142
run: |
4243
# Fetch enough history to find a common ancestor commit (aka merge-base):
43-
git fetch origin ${{ env.refspec_pr }} --depth=$(( ${{ github.event.pull_request.commits }} + 1 )) \
44+
git fetch origin ${{ env.refspec_pr }} --depth=$(( ${{ env.commits }} + 1 )) \
4445
--no-tags --prune --no-recurse-submodules
4546
4647
# This should get the oldest commit in the local fetched history (which may not be the commit the PR branched from):

.github/workflows/reusable-tsan.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
name: 'Thread sanitizer'
2424
runs-on: ubuntu-24.04
2525
timeout-minutes: 60
26+
env:
27+
OPTIONS: ${{ inputs.options }}
28+
SUPPRESSIONS_PATH: ${{ inputs.suppressions_path }}
2629
steps:
2730
- uses: actions/checkout@v4
2831
with:
@@ -49,7 +52,7 @@ jobs:
4952
sudo sysctl -w vm.mmap_rnd_bits=28
5053
- name: TSAN Option Setup
5154
run: |
52-
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }} handle_segv=0" >> "$GITHUB_ENV"
55+
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_log suppressions=${GITHUB_WORKSPACE}/${{ env.SUPPRESSIONS_PATH }} handle_segv=0" >> "$GITHUB_ENV"
5356
echo "CC=clang" >> "$GITHUB_ENV"
5457
echo "CXX=clang++" >> "$GITHUB_ENV"
5558
- name: Add ccache to PATH
@@ -61,7 +64,7 @@ jobs:
6164
save: ${{ github.event_name == 'push' }}
6265
max-size: "200M"
6366
- name: Configure CPython
64-
run: ${{ inputs.options }}
67+
run: ${{ env.OPTIONS }}
6568
- name: Build CPython
6669
run: make -j4
6770
- name: Display build info

.github/workflows/reusable-windows-msi.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ jobs:
1717
runs-on: windows-latest
1818
timeout-minutes: 60
1919
env:
20+
ARCH: ${{ inputs.arch }}
2021
IncludeFreethreaded: true
2122
steps:
2223
- uses: actions/checkout@v4
2324
with:
2425
persist-credentials: false
2526
- name: Build CPython installer
26-
run: .\Tools\msi\build.bat --doc -${{ inputs.arch }}
27+
run: .\Tools\msi\build.bat --doc -${{ env.ARCH }}

.github/workflows/reusable-windows.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
name: 'build and test (${{ inputs.arch }})'
2727
runs-on: ${{ inputs.os }}
2828
timeout-minutes: 60
29+
env:
30+
ARCH: ${{ inputs.arch }}
2931
steps:
3032
- uses: actions/checkout@v4
3133
with:
@@ -37,7 +39,7 @@ jobs:
3739
run: >-
3840
.\\PCbuild\\build.bat
3941
-e -d -v
40-
-p ${{ inputs.arch }}
42+
-p ${{ env.ARCH }}
4143
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
4244
- name: Display build info # FIXME(diegorusso): remove the `if`
4345
if: inputs.arch != 'arm64'
@@ -46,6 +48,6 @@ jobs:
4648
if: inputs.arch != 'arm64'
4749
run: >-
4850
.\\PCbuild\\rt.bat
49-
-p ${{ inputs.arch }}
51+
-p ${{ env.ARCH }}
5052
-d -q --fast-ci
5153
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}

0 commit comments

Comments
 (0)