Skip to content

Commit b046c02

Browse files
authored
Merge pull request #1618 from hyperledger/workflow_token_permissions
OpenSSF Scorecard: fine grained workflow permissions
2 parents c7e6058 + cccc93a commit b046c02

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

.github/workflows/docker_main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ on:
88
- '.github/**' # exclude .github directory
99
- '**.md' # exclude all markdown files
1010

11+
permissions:
12+
contents: read
13+
packages: write
14+
1115
jobs:
1216
docker:
1317
runs-on: ubuntu-latest
14-
permissions:
15-
contents: read
16-
packages: write
1718
steps:
1819
- uses: actions/checkout@v3
1920
with:

.github/workflows/docker_release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ on:
44
release:
55
types: [released, prereleased]
66

7+
permissions:
8+
contents: read
9+
packages: write
10+
711
jobs:
812

913
docker:
1014
runs-on: ubuntu-latest
11-
permissions:
12-
contents: read
13-
packages: write
1415
steps:
1516
- uses: actions/checkout@v4
1617
with:

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
pull_request:
88
release:
99
types: [released]
10+
11+
permissions:
12+
contents: write
13+
1014
jobs:
1115
build:
1216
runs-on: ubuntu-latest

.github/workflows/go.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Go
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main]
66
paths:
77
- '**' # include all files
88
- '!.github/**' # exclude .github directory
@@ -18,6 +18,10 @@ on:
1818

1919
workflow_dispatch:
2020

21+
permissions:
22+
contents: read
23+
packages: write
24+
2125
jobs:
2226
build:
2327
env:

.github/workflows/integration.yml

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

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
e2e-test:
1215
runs-on: firefly-ubuntu-latest

.github/workflows/solidity.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
pull_request:
55
branches: [main]
66

7+
permissions:
8+
contents: read
9+
packages: read
10+
711
jobs:
812
solidity-test:
913
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)