Skip to content

Commit 836bfb5

Browse files
authored
Harden GitHub Actions: pin actions to SHAs and set explicit permissions (#1034)
1 parent edda69c commit 836bfb5

7 files changed

Lines changed: 25 additions & 2 deletions

.github/workflows/01-powerpipe-release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
required: true
2222
type: boolean
2323

24+
permissions:
25+
contents: write
26+
2427
env:
2528
POWERPIPE_UPDATE_CHECK: false
2629
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
@@ -188,7 +191,7 @@ jobs:
188191
path: pipe-fittings
189192

190193
- name: Set up Docker
191-
uses: docker/setup-buildx-action@v3
194+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
192195

193196
- name: Install Docker (if needed)
194197
run: |

.github/workflows/02-powerpipe-smoke-tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
required: true
99
type: string
1010

11+
permissions:
12+
contents: read
13+
1114
env:
1215
# Version from input, used to download the correct release artifacts
1316
VERSION: ${{ github.event.inputs.version }}

.github/workflows/10-test-lint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
workflow_dispatch:
1010
pull_request:
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
golangci:
1417
name: Test Linting

.github/workflows/11-test-acceptance.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
workflow_dispatch:
1010
pull_request:
1111

12+
permissions:
13+
contents: read
14+
1215
env:
1316
POWERPIPE_UPDATE_CHECK: false
1417
SPIPETOOLS_TOKEN: ${{ secrets.SPIPETOOLS_TOKEN }}
@@ -63,7 +66,7 @@ jobs:
6366
go test -timeout 30s ./... -test.v
6467
6568
- name: Set up Docker
66-
uses: docker/setup-buildx-action@v3
69+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
6770

6871
- name: Install Docker (if needed)
6972
run: |

.github/workflows/12-test-post-release-linux-distros.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
required: true
99
type: string
1010

11+
permissions:
12+
contents: read
13+
1114
env:
1215
# Version from input, used to download the correct release artifacts
1316
VERSION: ${{ github.event.inputs.version }}

.github/workflows/30-stale.yaml

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:
1520
runs-on: ubuntu-latest

.github/workflows/31-add-issues-to-pipeling-issue-tracker.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
issues:
55
types: [opened]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
add-to-project:
912
uses: turbot/steampipe-workflows/.github/workflows/assign-issue-to-pipeling-issue-tracker.yml@main

0 commit comments

Comments
 (0)