Skip to content

Commit d527a22

Browse files
Harden GitHub Actions: pin actions to SHAs and set explicit permissions (#4965) (#4975)
(cherry picked from commit 0722f84) Co-authored-by: cbruno10 <cody@turbot.com>
1 parent 872481f commit d527a22

7 files changed

Lines changed: 24 additions & 0 deletions

.github/workflows/01-steampipe-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
# Version number from user input, used throughout the workflow for tagging, branching, and release operations
2629
VERSION: ${{ github.event.inputs.version }}

.github/workflows/02-steampipe-db-image-build.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
required: true
1717
default: 14.19.0
1818

19+
permissions:
20+
contents: read
21+
packages: write
22+
1923
env:
2024
PROJECT_ID: steampipe
2125
IMAGE_NAME: db

.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
@@ -2,6 +2,9 @@ name: "11 - Test: Acceptance"
22
on:
33
pull_request:
44

5+
permissions:
6+
contents: read
7+
58
env:
69
STEAMPIPE_UPDATE_CHECK: false
710
SPIPETOOLS_PG_CONN_STRING: ${{ secrets.SPIPETOOLS_PG_CONN_STRING }}

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