Skip to content

Commit f39a059

Browse files
EnriqueL8ryjones
authored andcommitted
OpenSSF Scorecard: fine grained workflow permissions
Signed-off-by: Enrique Lacal <[email protected]> Signed-off-by: Ry Jones <[email protected]>
1 parent 1511839 commit f39a059

File tree

6 files changed

+22
-6
lines changed

6 files changed

+22
-6
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Solidity Tests
33
on:
44
pull_request:
55
branches: [main]
6+
permissions:
7+
contents: read
8+
packages: read
69

710
jobs:
811
solidity-test:

0 commit comments

Comments
 (0)