Skip to content

Commit 16b8081

Browse files
committed
Restrict token permissions
1 parent fdd252c commit 16b8081

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1215
cancel-in-progress: true

.github/workflows/ossf-scorecard.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ on:
88
- cron: "43 6 * * 5" # weekly at 06:43 (UTC) on Friday
99
workflow_dispatch:
1010

11-
permissions: read-all
11+
permissions:
12+
contents: read
1213

1314
jobs:
1415
analysis:
1516
runs-on: ubuntu-latest
1617
permissions:
18+
contents: read
1719
# Needed for Code scanning upload
1820
security-events: write
1921
# Needed for GitHub OIDC token if publish_results is true

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@ name: Release
22
on:
33
workflow_dispatch:
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
release:
10+
permissions:
11+
contents: write # for creating the release
712
runs-on: ubuntu-latest
813
outputs:
914
version: ${{ steps.create-github-release.outputs.version }}

0 commit comments

Comments
 (0)