Skip to content

Commit 79eeba0

Browse files
committed
Add pinact and zizmor workflow checks
1 parent 775ea62 commit 79eeba0

5 files changed

Lines changed: 74 additions & 10 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1212
- name: Unshallow
1313
run: git fetch --prune --unshallow
1414
- name: Set up Go
15-
uses: actions/setup-go@v3
15+
uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3.6.1
1616
with:
1717
go-version: 1.19
1818
- name: Import GPG key
1919
id: import_gpg
20-
uses: paultyng/ghaction-import-gpg@v2.1.0
20+
uses: paultyng/ghaction-import-gpg@53deb67fe3b05af114ad9488a4da7b782455d588 # v2.1.0
2121
env:
2222
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
2323
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2424
- name: Run GoReleaser
25-
uses: goreleaser/goreleaser-action@v2
25+
uses: goreleaser/goreleaser-action@b953231f81b8dfd023c58e0854a721e35037f28b # v2.9.1
2626
with:
2727
version: latest
2828
args: release --rm-dist

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@ jobs:
1313
go-version: [1.19]
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1717

18-
- uses: hashicorp/setup-terraform@v2
18+
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
1919
with:
2020
terraform_version: 1.3.7
2121
terraform_wrapper: false
2222

2323
- name: Set up Go ${{ matrix.go-version }}
24-
uses: actions/setup-go@v3
24+
uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3.6.1
2525
with:
2626
go-version: ${{ matrix.go-version }}
2727

2828
- name: golangci-lint
29-
uses: golangci/golangci-lint-action@v3
29+
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
3030
with:
3131
args: --issues-exit-code=0 --timeout=5m
3232

3333
- name: Run tests
3434
run: go test -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./... -v ./...
3535

3636
- name: Upload to codecov
37-
uses: codecov/codecov-action@v3
37+
uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
3838
with:
3939
verbose: true

.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@v0.5.0
24+
uses: actions/add-to-project@31b3f3ccdc584546fc445612dec3f38ff5edb41c # v0.5.0
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)