Skip to content

Commit 6932a3b

Browse files
committed
Add pinact and zizmor workflow checks
1 parent 00893c6 commit 6932a3b

6 files changed

Lines changed: 78 additions & 14 deletions

File tree

.github/workflows/dependabot-changie.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
if: github.actor == 'dependabot[bot]'
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1919

2020
- name: Fetch Dependabot metadata
2121
id: dependabot-metadata
22-
uses: dependabot/fetch-metadata@v2
22+
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
2323
with:
2424
github-token: "${{ secrets.GITHUB_TOKEN }}"
2525

2626
- name: Create change file
27-
uses: miniscruff/changie-action@v2
27+
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2.0.0
2828
with:
2929
version: latest
3030
args: new --body "${{ github.event.pull_request.title }}" --kind Dependency

.github/workflows/pinact.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Pinact
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
paths:
9+
- ".github/workflows/**"
10+
- ".github/actions/**"
11+
12+
permissions: {}
13+
14+
jobs:
15+
pinact:
16+
# Only run on pull requests from the same repository
17+
if: github.event.pull_request.head.repo.full_name == github.repository
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
27+
- name: Pin actions
28+
uses: suzuki-shunsuke/pinact-action@cf51507d80d4d6522a07348e3d58790290eaf0b6 # v2.0.0
29+
with:
30+
skip_push: true
31+
verify: true
32+
min_age: 7

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout
10-
uses: actions/checkout@v4
10+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1111
with:
1212
fetch-depth: 0
1313

1414
- name: Set up Go
15-
uses: actions/setup-go@v5
15+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
1616
with:
1717
go-version: "1.21"
1818

1919
- name: Import GPG key
2020
id: import_gpg
21-
uses: paultyng/ghaction-import-gpg@v2.1.0
21+
uses: paultyng/ghaction-import-gpg@53deb67fe3b05af114ad9488a4da7b782455d588 # v2.1.0
2222
env:
2323
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
2424
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2525

2626
- name: Run GoReleaser
27-
uses: goreleaser/goreleaser-action@v5
27+
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811 # v5.1.0
2828
with:
2929
version: latest
3030
args: release --rm-dist

.github/workflows/tests.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,24 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
1212

1313
- name: Set up Go 1.21
14-
uses: actions/setup-go@v5
14+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
1515
with:
1616
go-version: "1.21"
1717

1818
- name: golangci-lint
1919
continue-on-error: true
20-
uses: golangci/golangci-lint-action@v6
20+
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
2121
with:
2222
args: --issues-exit-code=0 --timeout=5m
2323

2424
- name: Run tests
2525
run: go test -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./... -v ./...
2626

2727
- name: Upload to codecov
28-
uses: codecov/codecov-action@v4
28+
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
2929
with:
3030
verbose: true
3131

@@ -38,12 +38,12 @@ jobs:
3838
pull-requests: write
3939
actions: write
4040
steps:
41-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4242
with:
4343
fetch-depth: 0
4444

4545
- name: Prepare release
46-
uses: labd/changie-release-action@v0.3.2
46+
uses: labd/changie-release-action@cabe11e8578d5867ea0695351fd37e85ecb32aa6 # v0.3.2
4747
with:
4848
github-token: ${{ secrets.GITHUB_TOKEN }}
4949
release-workflow: 'release.yaml'

.github/workflows/triage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
private-key: ${{ secrets.RD_APP_PRIVATE_KEY }}
2222
installation-id: ${{ secrets.RD_APP_INSTALLATION_ID }}
2323
- name: set to project board
24-
uses: actions/add-to-project@v1.0.2
24+
uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
2525
with:
2626
project-url: https://github.com/orgs/labd/projects/3
2727
github-token: ${{ steps.get-app-token.outputs.app-token }}

.github/workflows/zizmor.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Zizmor
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
paths:
9+
- ".github/workflows/**"
10+
- ".github/actions/**"
11+
12+
permissions: {}
13+
14+
jobs:
15+
zizmor:
16+
name: Run zizmor
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
actions: read
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
persist-credentials: false
26+
27+
- name: Run zizmor
28+
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
29+
with:
30+
advanced-security: false
31+
annotations: true
32+
min-severity: high

0 commit comments

Comments
 (0)