Unverified Commit ef63481d authored by Benjamin Woodruff's avatar Benjamin Woodruff Committed by GitHub

[ci] Set `persist-credentials: false` for all GH actions (#94214)

The actual security implications of this are likely *very* minor, but in
the interest of reducing how many credentials we have, there's little
reason for us not to set this to `false`.

In cases where we create a new commit via GH actions, we already do that
via the GitHub API, so those don't need the on-disk git credentials to
push.

---

From: https://github.com/actions/checkout :

> The auth token is persisted in the local git config. This enables your
scripts to run authenticated git commands. The token is removed during
post-job cleanup. Set persist-credentials: false to opt-out.

```
    # Whether to configure the token or SSH key with the local git config
    # Default: true
    persist-credentials: ''
```
parent 2b8f5f59
...@@ -50,6 +50,7 @@ jobs: ...@@ -50,6 +50,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 1 fetch-depth: 1
persist-credentials: false
- run: echo "${{ github.event.after }}" - run: echo "${{ github.event.after }}"
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
...@@ -134,6 +135,7 @@ jobs: ...@@ -134,6 +135,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
- id: get-store-path - id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
...@@ -243,6 +245,7 @@ jobs: ...@@ -243,6 +245,7 @@ jobs:
# crates/next-napi-bindings/build.rs uses git-describe to find the most recent git tag. It's okay if # crates/next-napi-bindings/build.rs uses git-describe to find the most recent git tag. It's okay if
# this fails, but fetch with enough depth that we're likely to find a recent tag. # this fails, but fetch with enough depth that we're likely to find a recent tag.
fetch-depth: 100 fetch-depth: 100
persist-credentials: false
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
...@@ -398,6 +401,8 @@ jobs: ...@@ -398,6 +401,8 @@ jobs:
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
...@@ -588,6 +593,7 @@ jobs: ...@@ -588,6 +593,7 @@ jobs:
with: with:
sparse-checkout: | sparse-checkout: |
.github .github
persist-credentials: false
- name: Collect bytesize metrics - name: Collect bytesize metrics
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
......
...@@ -34,6 +34,7 @@ jobs: ...@@ -34,6 +34,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
- name: check for docs only change - name: check for docs only change
id: docs-change id: docs-change
...@@ -165,6 +166,7 @@ jobs: ...@@ -165,6 +166,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
# Match the reusable workflow's pnpm-store cache path so this setup-only # Match the reusable workflow's pnpm-store cache path so this setup-only
# job does not bottleneck the larger test matrix. # job does not bottleneck the larger test matrix.
...@@ -228,6 +230,8 @@ jobs: ...@@ -228,6 +230,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: 20 node-version: 20
...@@ -309,6 +313,8 @@ jobs: ...@@ -309,6 +313,8 @@ jobs:
name: ast-grep lint name: ast-grep lint
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: ast-grep lint step - name: ast-grep lint step
uses: ast-grep/action@cf62e780f0c88301228978d593a7784427a097a6 # v1.5.0 uses: ast-grep/action@cf62e780f0c88301228978d593a7784427a097a6 # v1.5.0
with: with:
......
...@@ -238,6 +238,7 @@ jobs: ...@@ -238,6 +238,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
# Cache pnpm store on GitHub-hosted runners (self-hosted runners have their own persistent storage) # Cache pnpm store on GitHub-hosted runners (self-hosted runners have their own persistent storage)
- name: Get pnpm store directory - name: Get pnpm store directory
......
...@@ -154,6 +154,8 @@ jobs: ...@@ -154,6 +154,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Collect integration test stat - name: Collect integration test stat
uses: ./.github/actions/next-integration-stat uses: ./.github/actions/next-integration-stat
......
...@@ -10,6 +10,8 @@ jobs: ...@@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
package-manager-cache: false package-manager-cache: false
......
...@@ -27,6 +27,8 @@ jobs: ...@@ -27,6 +27,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Resolve Playwright version - name: Resolve Playwright version
id: version id: version
......
...@@ -11,6 +11,8 @@ jobs: ...@@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
package-manager-cache: false package-manager-cache: false
......
...@@ -99,6 +99,7 @@ jobs: ...@@ -99,6 +99,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
- name: Check non-docs only change - name: Check non-docs only change
run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.mjs --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.mjs --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT
...@@ -140,6 +141,7 @@ jobs: ...@@ -140,6 +141,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
- name: Check non-docs only change - name: Check non-docs only change
run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.mjs --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT run: echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.mjs --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT
......
...@@ -48,6 +48,8 @@ jobs: ...@@ -48,6 +48,8 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Display release mode - name: Display release mode
run: | run: |
......
...@@ -37,6 +37,7 @@ jobs: ...@@ -37,6 +37,7 @@ jobs:
# Commits made with the default `GITHUB_TOKEN` won't trigger workflows. # Commits made with the default `GITHUB_TOKEN` won't trigger workflows.
# See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow # See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
persist-credentials: false
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
...@@ -99,6 +100,7 @@ jobs: ...@@ -99,6 +100,7 @@ jobs:
# Commits made with the default `GITHUB_TOKEN` won't trigger workflows. # Commits made with the default `GITHUB_TOKEN` won't trigger workflows.
# See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow # See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
persist-credentials: false
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
......
...@@ -66,6 +66,7 @@ jobs: ...@@ -66,6 +66,7 @@ jobs:
with: with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'canary' }} ref: ${{ github.event_name == 'workflow_dispatch' && github.ref_name || 'canary' }}
fetch-depth: 1 fetch-depth: 1
persist-credentials: false
- name: Setup node - name: Setup node
if: steps.precheck.outputs.should_evaluate == 'true' if: steps.precheck.outputs.should_evaluate == 'true'
......
...@@ -32,6 +32,8 @@ jobs: ...@@ -32,6 +32,8 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Rust - name: Setup Rust
uses: ./.github/actions/setup-rust uses: ./.github/actions/setup-rust
......
...@@ -67,6 +67,7 @@ jobs: ...@@ -67,6 +67,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
- id: nextPackageInfo - id: nextPackageInfo
name: Get `next` package info name: Get `next` package info
...@@ -237,6 +238,7 @@ jobs: ...@@ -237,6 +238,7 @@ jobs:
with: with:
sparse-checkout: | sparse-checkout: |
.github .github
persist-credentials: false
- name: Download test report artifacts - name: Download test report artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
...@@ -273,6 +275,8 @@ jobs: ...@@ -273,6 +275,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
......
...@@ -42,6 +42,7 @@ jobs: ...@@ -42,6 +42,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
- name: Install dependencies - name: Install dependencies
run: pnpm install run: pnpm install
......
...@@ -30,6 +30,7 @@ jobs: ...@@ -30,6 +30,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 25 fetch-depth: 25
persist-credentials: false
# https://github.com/actions/virtual-environments/issues/1187 # https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network - name: tune linux network
run: sudo ethtool -K eth0 tx off rx off run: sudo ethtool -K eth0 tx off rx off
......
...@@ -36,6 +36,8 @@ jobs: ...@@ -36,6 +36,8 @@ jobs:
runs-on: ubuntu-latest-16-core-oss runs-on: ubuntu-latest-16-core-oss
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Rust toolchain - name: Setup Rust toolchain
uses: ./.github/actions/setup-rust uses: ./.github/actions/setup-rust
...@@ -71,6 +73,8 @@ jobs: ...@@ -71,6 +73,8 @@ jobs:
runs-on: ubuntu-latest-16-core-oss runs-on: ubuntu-latest-16-core-oss
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Rust toolchain - name: Setup Rust toolchain
uses: ./.github/actions/setup-rust uses: ./.github/actions/setup-rust
...@@ -107,6 +111,8 @@ jobs: ...@@ -107,6 +111,8 @@ jobs:
runs-on: ubuntu-latest-16-core-oss runs-on: ubuntu-latest-16-core-oss
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Rust toolchain - name: Setup Rust toolchain
uses: ./.github/actions/setup-rust uses: ./.github/actions/setup-rust
......
...@@ -37,6 +37,7 @@ jobs: ...@@ -37,6 +37,7 @@ jobs:
# Commits made with the default `GITHUB_TOKEN` won't trigger workflows. # Commits made with the default `GITHUB_TOKEN` won't trigger workflows.
# See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow # See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
persist-credentials: false
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
...@@ -95,6 +96,7 @@ jobs: ...@@ -95,6 +96,7 @@ jobs:
# Commits made with the default `GITHUB_TOKEN` won't trigger workflows. # Commits made with the default `GITHUB_TOKEN` won't trigger workflows.
# See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow # See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
persist-credentials: false
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
......
...@@ -39,6 +39,7 @@ jobs: ...@@ -39,6 +39,7 @@ jobs:
# Commits made with the default `GITHUB_TOKEN` won't trigger workflows. # Commits made with the default `GITHUB_TOKEN` won't trigger workflows.
# See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow # See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
persist-credentials: false
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
......
...@@ -45,6 +45,7 @@ jobs: ...@@ -45,6 +45,7 @@ jobs:
# Commits made with the default `GITHUB_TOKEN` won't trigger workflows. # Commits made with the default `GITHUB_TOKEN` won't trigger workflows.
# See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow # See: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
persist-credentials: false
- name: Setup node - name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
......
...@@ -27,6 +27,8 @@ jobs: ...@@ -27,6 +27,8 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup corepack - name: Setup corepack
run: | run: |
......
...@@ -37,6 +37,7 @@ jobs: ...@@ -37,6 +37,7 @@ jobs:
with: with:
ref: ${{ github.event.repository.default_branch }} ref: ${{ github.event.repository.default_branch }}
fetch-depth: 1 fetch-depth: 1
persist-credentials: false
- name: Enable corepack - name: Enable corepack
run: corepack enable run: corepack enable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment