Skip to content

Commit 904698b

Browse files
authored
Actions Security (#438)
* apply zizmor actions fixes
1 parent aa476cb commit 904698b

7 files changed

Lines changed: 29 additions & 8 deletions

File tree

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ updates:
1010
directory: "/"
1111
schedule:
1212
interval: "daily"
13+
cooldown:
14+
default-days: 7
1315

1416
# GitHub Actions workflow dependencies
1517
- package-ecosystem: "github-actions"
1618
directory: "/"
1719
schedule:
1820
interval: "daily"
21+
cooldown:
22+
default-days: 7
1923

2024
# Devcontainer dependencies (images and features)
2125
- package-ecosystem: "devcontainers"
2226
directory: "/"
2327
schedule:
2428
interval: "weekly"
29+
cooldown:
30+
default-days: 7

.github/workflows/dependabot-automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
# Only run this job if the PR author is Dependabot
2222
# This prevents the workflow from running on PRs from other contributors
23-
if: github.actor == 'dependabot[bot]'
23+
if: github.event.pull_request.user.login == 'dependabot[bot]'
2424

2525
steps:
2626
# Checkout is not needed since we're only using gh CLI to interact with the PR

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 0
24+
persist-credentials: false
2425

2526
- name: Set up Go
2627
uses: actions/setup-go@v6

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v6
17+
with:
18+
persist-credentials: false
1719
- uses: actions/setup-go@v6
1820
with:
1921
go-version: stable
2022
cache: true
2123
- name: Install golangci-lint
2224
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
2325
- name: Run golangci-lint
24-
run: make lint
26+
run: make lint

.github/workflows/gosec.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v6
18+
with:
19+
persist-credentials: false
1820
- uses: actions/setup-go@v6
1921
with:
2022
go-version: stable
2123
- name: Run Gosec Security Scanner
22-
uses: securego/gosec@master
24+
uses: securego/gosec@6be2b51fd78feca86af91f5186b7964d76cb1256 # v2.22.10
2325
with:
24-
args: '-no-fail -fmt json -out results.json ./...'
25-
26+
args: "-no-fail -fmt json -out results.json ./..."
27+
2628
- name: Check Gosec Results
2729
run: |
2830
FOUND=$(jq '.Stats.found // 0' results.json)
@@ -32,4 +34,9 @@ jobs:
3234
exit 1
3335
else
3436
echo "✅ No security issues found."
35-
fi
37+
fi
38+
39+
- name: Run zizmor 🌈
40+
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
41+
with:
42+
inputs: .

.github/workflows/release.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ jobs:
2121
uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 0
24+
persist-credentials: false
2425
- name: Set up Go
2526
uses: actions/setup-go@v6
2627
with:
2728
go-version: stable
28-
cache: true
29+
cache: false
2930
- name: Run GoReleaser
30-
uses: goreleaser/goreleaser-action@v6
31+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
3132
with:
3233
distribution: goreleaser
3334
args: release --clean --verbose -f goreleaser.yaml ${{ env.flags }}

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
os: [ubuntu-latest, windows-latest]
1919
steps:
2020
- uses: actions/checkout@v6
21+
with:
22+
persist-credentials: false
2123

2224
- uses: actions/setup-go@v6
2325
with:
@@ -54,6 +56,8 @@ jobs:
5456
os: [ubuntu-latest, windows-latest]
5557
steps:
5658
- uses: actions/checkout@v6
59+
with:
60+
persist-credentials: false
5761

5862
- uses: actions/setup-go@v6
5963
with:

0 commit comments

Comments
 (0)