Skip to content

Commit 01c472e

Browse files
committed
Add pinact and zizmor workflow checks
1 parent 8a6c186 commit 01c472e

6 files changed

Lines changed: 82 additions & 18 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v5
43+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
4444

4545
- name: Set up Go
46-
uses: actions/setup-go@v6
46+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
4747
with:
4848
go-version-file: go.mod
4949

5050
# Initializes the CodeQL tools for scanning.
5151
- name: Initialize CodeQL
52-
uses: github/codeql-action/init@v4
52+
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
5353
with:
5454
languages: ${{ matrix.language }}
5555
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -63,7 +63,7 @@ jobs:
6363
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
6464
# If this step fails, then you should remove it and run the build manually (see below)
6565
- name: Autobuild
66-
uses: github/codeql-action/autobuild@v4
66+
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
6767

6868
# ℹ️ Command-line programs to run using the OS shell.
6969
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -76,6 +76,6 @@ jobs:
7676
# ./location_of_script_within_repo/buildscript.sh
7777

7878
- name: Perform CodeQL Analysis
79-
uses: github/codeql-action/analyze@v4
79+
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
8080
with:
8181
category: "/language:${{matrix.language}}"

.github/workflows/dependabot-changie.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ permissions:
1212
jobs:
1313
dependabot-changie:
1414
runs-on: ubuntu-latest
15-
if: github.actor == 'dependabot[bot]'
15+
if: github.triggering_actor == 'dependabot[bot]' # zizmor: ignore[bot-conditions]
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.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
3131

32-
- uses: stefanzweifel/git-auto-commit-action@v7.0.0
32+
- uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
3333
with:
3434
commit_message: "chore(deps): add changelog for dependabot updates"
3535
commit_user_name: "dependabot[bot]"

.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/tests.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ jobs:
1212
go-version: [ "1.22", "1.23", "1.24" ]
1313

1414
steps:
15-
- uses: actions/checkout@v5
15+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
1616

1717
- name: Set up Go ${{ matrix.go-version }}
18-
uses: actions/setup-go@v6
18+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
1919
with:
2020
go-version: ${{ matrix.go-version }}
2121

2222
- name: golangci-lint
2323
continue-on-error: true
24-
uses: golangci/golangci-lint-action@v8
24+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
2525
with:
2626
args: --issues-exit-code=0 --timeout=5m
2727

2828
- name: Run tests
2929
run: go test -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./... -v ./...
3030

3131
- name: Upload to codecov
32-
uses: codecov/codecov-action@v5
32+
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5.5.4
3333
with:
3434
verbose: true
3535

@@ -42,11 +42,11 @@ jobs:
4242
pull-requests: write
4343
actions: write
4444
steps:
45-
- uses: actions/checkout@v5
45+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
4646
with:
4747
fetch-depth: 0
4848

4949
- name: Prepare release
50-
uses: labd/changie-release-action@v0.6.0
50+
uses: labd/changie-release-action@ac4d65e736733f1d2c363dd5d99b43a1add5aaef # v0.6.0
5151
with:
5252
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/triage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
steps:
1616
- name: get app token
1717
id: get-app-token
18-
uses: labd/action-gh-app-token@main
18+
uses: labd/action-gh-app-token@7ff980ba334a28226bad9c85412b4a84c23a3787 # main
1919
with:
2020
app-id: ${{ secrets.RD_APP_ID }}
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)