Skip to content

Commit

Permalink
ci: Do not persist credentials after checkout
Browse files Browse the repository at this point in the history
See actions/checkout#485 and https://johnstawinski.com/2024/01/11/playing-with-fire-how-we-executed-a-critical-supply-chain-attack-on-pytorch/

In short, it is a terrible idea to persist even our default credentials after checkout. There's no call for that, so we will now set `persist-credentials: false` on all checkout actions.
  • Loading branch information
joeyparrish committed Dec 18, 2024
1 parent 519d0ba commit 56e4098
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/sync-common-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
- uses: actions/checkout@v4
with:
path: workflows
persist-credentials: false

- name: Sync Workflows
run: |
git config --global user.email "[email protected]"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sync-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: shaka-project/shaka-github-tools
persist-credentials: false

# TODO: revert to micnncim and new release after landing
# https://github.com/micnncim/action-label-syncer/pull/68
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-update-issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
persist-credentials: false

- name: Test
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: shaka-project/shaka-github-tools
persist-credentials: false

- name: Update Issues
env:
Expand Down
1 change: 1 addition & 0 deletions compute-sha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ needs.compute-sha.outputs.SHA }}
persist-credentials: false

# ...
```
1 change: 1 addition & 0 deletions sync-labels/sync-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: shaka-project/shaka-github-tools
persist-credentials: false

# TODO: revert to micnncim and new release after landing
# https://github.com/micnncim/action-label-syncer/pull/68
Expand Down
1 change: 1 addition & 0 deletions update-issues/update-issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: shaka-project/shaka-github-tools
persist-credentials: false

- name: Update Issues
env:
Expand Down

0 comments on commit 56e4098

Please sign in to comment.