Skip to content

Commit de48420

Browse files
committed
chore: restrict default token permissions in all workflows
Declare explicit minimal GITHUB_TOKEN permissions on workflows that previously inherited the org default, and fix a missing newline in the stale issue message.
1 parent 1a84aab commit de48420

9 files changed

Lines changed: 37 additions & 5 deletions

.github/workflows/create_test_patches.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- '.spellcheck.dict.txt'
2020
- '**/*.md'
2121

22+
permissions:
23+
contents: read
24+
actions: write
25+
2226
concurrency:
2327
group: ${{ github.workflow }}-${{ github.ref }}
2428
cancel-in-progress: true

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
branches:
1010
- '**'
1111

12+
permissions:
13+
contents: read
14+
actions: write
15+
1216
concurrency:
1317
group: ${{ github.workflow }}-${{ github.ref }}
1418
cancel-in-progress: true

.github/workflows/linting.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- main
1010
- release-v*
1111

12+
permissions:
13+
contents: read
14+
actions: write
15+
1216
concurrency:
1317
group: ${{ github.workflow }}-${{ github.ref }}
1418
cancel-in-progress: true

.github/workflows/rnfb-js-sdk-comparison.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
- '.spellcheck.dict.txt'
2121
- '**/*.md'
2222

23+
permissions:
24+
contents: read
25+
actions: write
26+
2327
concurrency:
2428
group: ${{ github.workflow }}-${{ github.ref }}
2529
cancel-in-progress: true

.github/workflows/stale.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ on:
55
schedule:
66
- cron: 35 * * * *
77
permissions:
8-
contents: read
8+
issues: write
9+
pull-requests: write
910
jobs:
1011
stale:
11-
permissions:
12-
issues: write
13-
pull-requests: write
1412
runs-on: ubuntu-latest
1513
steps:
1614
# https://github.com/actions/stale/releases
@@ -20,7 +18,9 @@ jobs:
2018
stale-issue-message: |
2119
Hello 👋, to help manage issues we automatically close stale issues.
2220
23-
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
21+
This issue has been automatically marked as stale because it has not had activity for quite some time.
22+
23+
Has this issue been fixed, or does it still require attention?
2424
2525
> This issue will be closed in 15 days if no further activity occurs.
2626

.github/workflows/tests_e2e_android.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
- '.spellcheck.dict.txt'
2828
- '**/*.md'
2929

30+
permissions:
31+
contents: read
32+
actions: write
33+
3034
concurrency:
3135
group: ${{ github.workflow }}-${{ github.ref }}
3236
cancel-in-progress: true

.github/workflows/tests_e2e_ios.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
- '.spellcheck.dict.txt'
2828
- '**/*.md'
2929

30+
permissions:
31+
contents: read
32+
actions: write
33+
3034
concurrency:
3135
group: ${{ github.workflow }}-${{ github.ref }}
3236
cancel-in-progress: true

.github/workflows/tests_e2e_other.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
- '.spellcheck.dict.txt'
2828
- '**/*.md'
2929

30+
permissions:
31+
contents: read
32+
actions: write
33+
3034
concurrency:
3135
group: ${{ github.workflow }}-${{ github.ref }}
3236
cancel-in-progress: true

.github/workflows/tests_jest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- '.spellcheck.dict.txt'
2020
- '**/*.md'
2121

22+
permissions:
23+
contents: read
24+
actions: write
25+
2226
concurrency:
2327
group: ${{ github.workflow }}-${{ github.ref }}
2428
cancel-in-progress: true

0 commit comments

Comments
 (0)