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 7d6e592 commit dd75b14
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
persist-credentials: false

- name: Build
run: npm ci && npm run build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: refs/tags/${{ steps.release.outputs.tag_name }}
persist-credentials: false
if: ${{ steps.release.outputs.release_created }}

- uses: actions/setup-node@v1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ inputs.ref || github.ref }}
persist-credentials: false

- name: Test
run: |
Expand Down

0 comments on commit dd75b14

Please sign in to comment.