Skip to content

Commit 2f70376

Browse files
committed
ci: disable credential persistence on the remaining checkouts
Add `persist-credentials: false` to the `actions/checkout` steps in the 5 workflows that were not covered by the earlier integration-test change: `check.yml`, `emulate.yml`, `example-app.yml`, `javadoc.yml`, and `release.yaml`. By default `actions/checkout` writes a short-lived `GITHUB_TOKEN`-derived credential into the local `.git/config` for the duration of the job. None of these jobs perform a `git push`, create tags, open PRs, or otherwise require write access to the repository over git: - `check.yml` runs Gradle linters and unit tests - `emulate.yml` runs Android emulator tests and uploads a reports artifact via `actions/upload-artifact` (which uses the runtime artifacts API, not git) - `example-app.yml` runs the example-app connectedAndroidTest - `javadoc.yml` builds Javadoc and uploads it to S3 via `ably/sdk-upload-action`; `githubToken` is passed to that action as an explicit input parameter, not via the checkout-persisted credential, so disabling persistence does not affect the upload - `release.yaml` publishes to Maven Central using Sonatype + GPG credentials from repository secrets and performs no git write `features.yml` only invokes a reusable workflow and has no checkout step of its own, so it requires no change here.
1 parent d33179f commit 2f70376

5 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
15+
with:
16+
persist-credentials: false
1517
- name: Set up the JDK
1618
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
1719
with:

.github/workflows/emulate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
steps:
1818
- name: checkout
1919
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
20+
with:
21+
persist-credentials: false
2022

2123
- name: Set up the JDK
2224
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3

.github/workflows/example-app.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
steps:
1818
- name: checkout
1919
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
20+
with:
21+
persist-credentials: false
2022

2123
- name: Set up the JDK
2224
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3

.github/workflows/javadoc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
deployments: write
1515
steps:
1616
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
17+
with:
18+
persist-credentials: false
1719

1820
- name: Configure AWS Credentials
1921
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
15+
with:
16+
persist-credentials: false
1517

1618
- name: Extract tag
1719
id: tag

0 commit comments

Comments
 (0)