Skip to content

Commit d4abcbe

Browse files
authored
Pass branch name via env var to prevent script injection (#312)
1 parent 5dfaf40 commit d4abcbe

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/dev.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ jobs:
188188
runs-on: ubuntu-22.04
189189
steps:
190190
- run: mkdir binaries
191-
- run: echo "https://github.com/DataDog/dd-trace-cpp@${{ github.head_ref || github.ref_name }}" > binaries/cpp-load-from-git
191+
- run: echo "https://github.com/DataDog/dd-trace-cpp@${BRANCH_NAME}" > binaries/cpp-load-from-git
192+
env:
193+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
192194
- name: Save artifact
193195
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
194196
with:

0 commit comments

Comments
 (0)