Skip to content

Commit a4ea89a

Browse files
Harden GitHub Actions: pin actions to SHAs and set explicit permissions (#1034) (#1043)
(cherry picked from commit 836bfb5) Co-authored-by: cbruno10 <cody@turbot.com>
1 parent d52fa2d commit a4ea89a

7 files changed

Lines changed: 23 additions & 0 deletions

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

Lines changed: 3 additions & 0 deletions
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 }}

.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: 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
env:
1316
POWERPIPE_UPDATE_CHECK: false
1417
SPIPETOOLS_TOKEN: ${{ secrets.SPIPETOOLS_TOKEN }}

.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)