Skip to content

Commit

Permalink
ci: Do not persist credentials after checkout (#221)
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 authored Dec 18, 2024
1 parent a71cade commit 97f6292
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || (github.event.number && format('refs/pull/{0}/merge', github.event.number)) }}
persist-credentials: false

- name: Configure Build Matrix
id: configure
Expand Down Expand Up @@ -96,6 +97,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || (github.event.number && format('refs/pull/{0}/merge', github.event.number)) }}
persist-credentials: false

- name: Set Python version
uses: actions/setup-python@v5
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
persist-credentials: false

- name: Set Python version
uses: actions/setup-python@v5
Expand Down

0 comments on commit 97f6292

Please sign in to comment.