Skip to content

Commit fa7582d

Browse files
authored
ci: add explicit permissions to workflows to mitigate security concerns (#1392)
**Motivation:** add explicit permission to all core repo CIs, and address security concerns and alerts **Modifications:** add explicit permission to all core repo CIs **Result:** workflows are safe now
1 parent 788e131 commit fa7582d

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

.github/workflows/automation.yml

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

7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
711
jobs:
812
# triage:
913
# runs-on: protocol-x64-16core

.github/workflows/foundry-post-merge.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- 'foundry.toml'
1313
- '**/*.sol'
1414

15+
permissions:
16+
contents: read
17+
pull-requests: read
1518

1619
env:
1720
FOUNDRY_PROFILE: medium

.github/workflows/foundry.yml

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

10+
permissions:
11+
contents: read
12+
pull-requests: read
1013

1114
env:
1215
FOUNDRY_PROFILE: medium

.github/workflows/validate-deployment-scripts.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: Validate Deployment Scripts
22

3-
permissions:
4-
contents: read
5-
63
on:
74
workflow_dispatch:
85
pull_request:
96
paths:
107
- 'script/**'
118
- '.github/workflows/validate-deployment-scripts.yml'
129

10+
permissions:
11+
contents: read
12+
pull-requests: read
1313

1414
jobs:
1515

0 commit comments

Comments
 (0)