Skip to content

Commit 3ca5f0e

Browse files
committed
workflows: add permissions block
We'd like to run GitHub Actions with the least possible permissions assigned to the token for security reasons. To make this possible, let's add a permissions block to each workflow that lacks one.
1 parent cf4ba45 commit 3ca5f0e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- go.mod
1313
- go.sum
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
lint:
1720
runs-on: ubuntu-latest

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
on: [push, pull_request]
33
name: Test
4+
permissions:
5+
contents: read
46
jobs:
57
test:
68
strategy:

0 commit comments

Comments
 (0)