Skip to content

Commit 05fbf8a

Browse files
authored
actions/checkoutにpersist-credentials: falseをセットする (#1734)
* actions/checkoutにpersist-credentials: falseをセットする * GitHub Appでのtoken周り修正
1 parent 99cdc21 commit 05fbf8a

File tree

8 files changed

+16
-6
lines changed

8 files changed

+16
-6
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
steps:
4343
- name: Checkout repository
4444
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
45+
with:
46+
persist-credentials: false
4547
# Initializes the CodeQL tools for scanning.
4648
- name: Initialize CodeQL
4749
uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3

.github/workflows/create-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
with:
19+
persist-credentials: false
1820
- uses: ./
1921
with:
2022
github-token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/format-json-yml.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ jobs:
1717
format-json-yml:
1818
runs-on: ubuntu-latest
1919
steps:
20+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
22+
with:
23+
fetch-depth: 0
24+
ref: ${{ github.event.pull_request.head.sha }}
25+
persist-credentials: false
2026
- name: Generate a token
2127
id: generate_token
2228
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
2329
with:
2430
app-id: ${{ secrets.PROJECT_AUTOMATION_APP_ID }}
2531
private-key: ${{ secrets.PROJECT_AUTOMATION_PRIVATE_KEY }}
26-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27-
if: github.event_name != 'pull_request' || github.event.action != 'closed'
28-
with:
29-
fetch-depth: 0
30-
ref: ${{ github.event.pull_request.head.sha }}
31-
token: ${{ steps.generate_token.outputs.token }}
3232
- uses: dev-hato/actions-format-json-yml@78a2502c69645dbbd3a56168ddc69065e7ee538c # v0.0.81
3333
with:
3434
github-token: ${{ steps.generate_token.outputs.token }}

.github/workflows/github-actions-cache-cleaner.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
persist-credentials: false
1618
- uses: dev-hato/github-actions-cache-cleaner@7951d10ece225d39f225997fbff2d14f6c44bfa1 # v0.0.63
1719
with:
1820
github-token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/super-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
# Full git history is needed to get a proper list
4545
# of changed files within `super-linter`
4646
fetch-depth: 0
47+
persist-credentials: false
4748
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
4849
with:
4950
cache: npm

.github/workflows/update-dist.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323
ref: ${{ github.event.pull_request.head.sha || github.sha }}
24+
persist-credentials: false
2425
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2526
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2627
with:

.github/workflows/update-gitleaks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424
ref: ${{ github.event.pull_request.head.sha }}
25+
persist-credentials: false
2526
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2627
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2728
with:

.github/workflows/update-package.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525
ref: ${{ github.event.pull_request.head.sha }}
26+
persist-credentials: false
2627
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2728
if: github.event_name != 'pull_request' || github.event.action != 'closed'
2829
with:

0 commit comments

Comments
 (0)