Skip to content

Commit 8c874f7

Browse files
authored
Harden GitHub Actions: set explicit permissions (#76)
1 parent d75a052 commit 8c874f7

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed

.github/workflows/golangci-lint.yml

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

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
golangci_lint_workflow:
1215
uses: turbot/steampipe-workflows/.github/workflows/golangci-lint.yml@main

.github/workflows/registry-publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: read
10+
packages: write
11+
812
jobs:
913
registry_publish_workflow_ghcr:
1014
uses: turbot/steampipe-workflows/.github/workflows/registry-publish-ghcr.yml@main

.github/workflows/stale.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
default: "false"
1111
type: string
1212

13+
permissions:
14+
contents: read
15+
issues: write
16+
pull-requests: write
17+
1318
jobs:
1419
stale_workflow:
1520
uses: turbot/steampipe-workflows/.github/workflows/stale.yml@main

.github/workflows/steampipe-anywhere.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- 'v*'
77

88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
anywhere_publish_workflow:
1114
uses: turbot/steampipe-workflows/.github/workflows/steampipe-anywhere.yml@main

.github/workflows/sync-labels.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
- cron: "30 22 * * 1"
55
workflow_dispatch:
66

7+
permissions:
8+
contents: read
9+
issues: write
10+
711
jobs:
812
sync_labels_workflow:
913
uses: turbot/steampipe-workflows/.github/workflows/sync-labels.yml@main

0 commit comments

Comments
 (0)