Skip to content

Commit f2d397f

Browse files
committed
Add pinact and zizmor workflow checks
1 parent 298cc5a commit f2d397f

6 files changed

Lines changed: 81 additions & 17 deletions

File tree

.github/workflows/checks.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
os: [ ubuntu-latest, macos-latest, windows-latest ]
1515
runs-on: ${{ matrix.os }}
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1818
- name: Set up Python
19-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
2020
with:
2121
python-version: ${{ matrix.python }}
2222

@@ -25,7 +25,7 @@ jobs:
2525
run: echo "::set-output name=python_version::$(python --version)"
2626

2727
- name: Cache dependencies
28-
uses: actions/cache@v3
28+
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
2929
with:
3030
path: .venv
3131
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies-${{ hashFiles('**/poetry.lock') }}
@@ -67,7 +67,7 @@ jobs:
6767
shell: bash
6868
run: poetry run coverage xml
6969

70-
- uses: codecov/codecov-action@v3
70+
- uses: codecov/codecov-action@ab904c41d6ece82784817410c45d8b8c02684457 # v3.1.6
7171
with:
7272
files: ./coverage.xml
7373

@@ -80,16 +80,16 @@ jobs:
8080
ports:
8181
- "3000:3000"
8282
steps:
83-
- uses: actions/checkout@v3
83+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
8484
- name: Set up Python
85-
uses: actions/setup-python@v4
85+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
8686
with:
8787
python-version: "3.10"
8888
- name: Get Python Version
8989
id: get_python_version
9090
run: echo "::set-output name=python_version::$(python --version)"
9191
- name: Cache dependencies
92-
uses: actions/cache@v3
92+
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
9393
with:
9494
path: .venv
9595
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies-${{ hashFiles('**/poetry.lock') }}
@@ -107,7 +107,7 @@ jobs:
107107
- name: Check for any file changes
108108
run: python .github/check_for_changes.py
109109
- name: Cache Generated Client Dependencies
110-
uses: actions/cache@v3
110+
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
111111
with:
112112
path: integration-tests/.venv
113113
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-integration-dependencies-${{ hashFiles('**/poetry.lock') }}

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
2020
with:
2121
# We must fetch at least the immediate parents so that if this is
2222
# a pull request then we can checkout the head.
@@ -29,10 +29,10 @@ jobs:
2929

3030
# Initializes the CodeQL tools for scanning.
3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@v2
32+
uses: github/codeql-action/init@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2.28.1
3333
# Override language selection by uncommenting this and choosing your languages
3434
with:
3535
languages: python
3636

3737
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@v2
38+
uses: github/codeql-action/analyze@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2.28.1

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
release:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1313
with:
1414
fetch-depth: 0
1515
token: ${{ secrets.PAT }}
1616
- name: Install Knope
17-
uses: knope-dev/action@v1
17+
uses: knope-dev/action@f694bf4663f7c20743102e732728d676b2ab95db # v1
1818
with:
1919
version: 0.6.2
20-
- run: knope release --dry-run
20+
- run: knope release --dry-run

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ jobs:
66
release:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1010
with:
1111
fetch-depth: 0
1212
token: ${{ secrets.PAT }}
1313
- name: Import GPG key
14-
uses: crazy-max/ghaction-import-gpg@v5
14+
uses: crazy-max/ghaction-import-gpg@d6f3f49f3345e29369fe57596a3ca8f94c4d2ca7 # v5.4.0
1515
with:
1616
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
1717
git_user_signingkey: true
1818
git_commit_gpgsign: true
1919
git_push_gpgsign: false
2020
- name: Install Knope
21-
uses: knope-dev/action@v1
21+
uses: knope-dev/action@f694bf4663f7c20743102e732728d676b2ab95db # v1
2222
with:
2323
version: 0.6.2
2424
- name: Bump Version & Create GitHub Release

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