Skip to content

Commit f135bfa

Browse files
authored
chore: Set permissions for GitHub actions (#8550)
Restrict the GitHub token permissions only to just what is required and make them read-only where possible. Signed-off-by: neilnaveen <[email protected]>
1 parent 8494f75 commit f135bfa

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

.github/workflows/build-cli.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@ on:
88
env:
99
CI: true
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build_cli:
16+
permissions:
17+
contents: write # for softprops/action-gh-release to create GitHub release
1318
runs-on: macos-11
1419
steps:
1520
- uses: actions/checkout@v2

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [master]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test:
1114
runs-on: ubuntu-latest

.github/workflows/nodejs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
pull_request:
1010
branches: [master]
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
build:
1417
runs-on: ubuntu-latest

.github/workflows/release-insiders.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: [master]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
build:
912
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
build:
912
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)