Skip to content

Commit c7cd077

Browse files
committed
fix: Pin actions to SHA and add permissions blocks
1 parent 2b321b2 commit c7cd077

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

.github/workflows/changelog-preview.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- reopened
88
- edited
99
- labeled
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
1014
jobs:
1115
changelog-preview:
1216
uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2

.github/workflows/danger-workflow-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
pr-analysis:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
1919

2020
- name: Run danger action
2121
id: danger
@@ -39,7 +39,7 @@ jobs:
3939
extra-dangerfile-test:
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
4343

4444
- name: Run danger with extra dangerfile
4545
id: danger-extra
@@ -64,7 +64,7 @@ jobs:
6464
extra-packages-test:
6565
runs-on: ubuntu-latest
6666
steps:
67-
- uses: actions/checkout@v4
67+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
6868

6969
# Create a test dangerfile that requires curl
7070
- name: Create test dangerfile requiring curl

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,27 @@ on:
88
force:
99
description: Force a release even when there are release-blockers
1010
required: false
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
1115
jobs:
1216
release:
1317
runs-on: ubuntu-latest
1418
name: Release a new version
1519
steps:
1620
- name: Get auth token
1721
id: token
18-
uses: actions/create-github-app-token@v1
22+
uses: actions/create-github-app-token@d72941d797fd3113feb6b93fd0dec494b13a2547 # v2
1923
with:
2024
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2125
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
22-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
2327
with:
2428
token: ${{ steps.token.outputs.token }}
2529
fetch-depth: 0
2630
- name: Prepare release
27-
uses: getsentry/craft@v2
31+
uses: getsentry/craft@39ee616a6a58dc64797feecb145d66770492b66c # v2
2832
env:
2933
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3034
with:

.github/workflows/script-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- run: git config --global core.autocrlf false
2222

23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
2424

2525
- run: Invoke-Pester
2626
working-directory: updater
@@ -35,7 +35,7 @@ jobs:
3535
run:
3636
working-directory: danger
3737
steps:
38-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
3939

4040
- uses: actions/setup-node@v4
4141
with:

.github/workflows/workflow-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
updater-pr-creation:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
1818

1919
- name: Run updater action
2020
id: updater
@@ -63,7 +63,7 @@ jobs:
6363
updater-target-branch:
6464
runs-on: ubuntu-latest
6565
steps:
66-
- uses: actions/checkout@v4
66+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
6767

6868
- name: Run updater action with target-branch
6969
id: updater
@@ -113,7 +113,7 @@ jobs:
113113
updater-no-changes:
114114
runs-on: macos-latest
115115
steps:
116-
- uses: actions/checkout@v4
116+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
117117

118118
- name: Run updater action
119119
id: updater
@@ -167,7 +167,7 @@ jobs:
167167
- macos
168168
- windows
169169
steps:
170-
- uses: actions/checkout@v4
170+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v2
171171

172172
- uses: ./sentry-cli/integration-test/
173173
with:

0 commit comments

Comments
 (0)