Skip to content

Commit cbcd15a

Browse files
authored
github workflows: tighten security (KhronosGroup#6770)
- don't persist credentials when using actions/checkout - use GITHUB_REF_NAME instead of github.ref_name expansion. crbug.com/529861263
1 parent 91e89a9 commit cbcd15a

5 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/autoroll.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
21+
with:
22+
persist-credentials: false
2123

2224
# Checkout the depot tools they are needed by roll_deps.sh
2325
- name: Checkout depot tools

.github/workflows/bazel.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2424
with:
2525
fetch-depth: '0'
26+
persist-credentials: false
2627
- name: Download dependencies
2728
run: python3 utils/git-sync-deps
2829
- name: Mount Bazel cache
@@ -47,6 +48,7 @@ jobs:
4748
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4849
with:
4950
fetch-depth: '0'
51+
persist-credentials: false
5052
- name: Download dependencies
5153
run: python3 utils/git-sync-deps
5254
- name: Mount Bazel cache

.github/workflows/ios.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ jobs:
1515
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1616
steps:
1717
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
18-
- uses: lukka/get-cmake@f5b8fbb4d77cec1acc5a5f9f0df4beffaf5d98d9 # v4.02
18+
with:
19+
persist-credentials: false
20+
- uses: lukka/get-cmake@f5b8fbb4d77cec1acc5a5f9f0df4beffaf5d98d9 # v4.3.4
1921
- name: Download dependencies
2022
run: python3 utils/git-sync-deps
2123
# NOTE: The MacOS SDK ships universal binaries. CI should reflect this.

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
17+
with:
18+
persist-credentials: false
1719
- name: Prepare CHANGELOG for version
1820
run: |
19-
python utils/generate_changelog.py CHANGES "${{ github.ref_name }}" VERSION_CHANGELOG
21+
python utils/generate_changelog.py CHANGES "${GITHUB_REF_NAME}" VERSION_CHANGELOG
2022
- name: Create release
2123
run: |
22-
gh release create -t "Release ${{ github.ref_name }}" -F VERSION_CHANGELOG "${{ github.ref_name }}"
24+
gh release create -t "Release ${GITHUB_REF_NAME}" -F VERSION_CHANGELOG "${GITHUB_REF_NAME}"
2325
env:
2426
GITHUB_TOKEN: ${{ github.token }}
2527

.github/workflows/wasm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1919
with:
2020
fetch-depth: '0'
21+
persist-credentials: false
2122
- name: Build web
2223
run: docker compose -f source/wasm/docker-compose.yml --project-directory . up
2324
- name: Run tests

0 commit comments

Comments
 (0)