Skip to content

Commit 7e29ef6

Browse files
committed
Add pinact and zizmor workflow checks
1 parent 4d3e7d0 commit 7e29ef6

4 files changed

Lines changed: 76 additions & 12 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/python-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ jobs:
88
release:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1212
- name: Set up Python 3.7
13-
uses: actions/setup-python@v1
13+
uses: actions/setup-python@0f07f7f756721ebd886c2462646a35f78a8bc4de # v1.2.4
1414
with:
1515
python-version: 3.7
1616
- name: Install build requirements
1717
run: python -m pip install wheel
1818
- name: Build package
1919
run: python setup.py sdist bdist_wheel
2020
- name: Publish package
21-
uses: pypa/gh-action-pypi-publish@master
21+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
2222
with:
2323
user: __token__
2424
password: ${{ secrets.pypi_password }}

.github/workflows/python-test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
format:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1111
- name: Set up Python 3.7
12-
uses: actions/setup-python@v1
12+
uses: actions/setup-python@0f07f7f756721ebd886c2462646a35f78a8bc4de # v1.2.4
1313
with:
1414
python-version: 3.7
1515
- name: Install dependencies
@@ -25,9 +25,9 @@ jobs:
2525
python-version: [3.5, 3.6, 3.7, 3.8]
2626

2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
2929
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v1
30+
uses: actions/setup-python@0f07f7f756721ebd886c2462646a35f78a8bc4de # v1.2.4
3131
with:
3232
python-version: ${{ matrix.python-version }}
3333
- name: Install dependencies
@@ -38,7 +38,7 @@ jobs:
3838
run: tox
3939
- name: Prepare artifacts
4040
run: mkdir .coverage-data && mv .coverage.* .coverage-data/
41-
- uses: actions/upload-artifact@master
41+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4242
with:
4343
name: coverage-data
4444
path: .coverage-data/
@@ -47,13 +47,13 @@ jobs:
4747
runs-on: ubuntu-latest
4848
needs: [test]
4949
steps:
50-
- uses: actions/checkout@v2
51-
- uses: actions/download-artifact@master
50+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
51+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
5252
with:
5353
name: coverage-data
5454
path: .
5555
- name: Set up Python 3.7
56-
uses: actions/setup-python@v1
56+
uses: actions/setup-python@0f07f7f756721ebd886c2462646a35f78a8bc4de # v1.2.4
5757
with:
5858
python-version: 3.7
5959
- name: Install dependencies
@@ -63,4 +63,4 @@ jobs:
6363
- name: Prepare Coverage report
6464
run: tox -e coverage-report
6565
- name: Upload to codecov
66-
uses: codecov/[email protected]
66+
uses: codecov/codecov-action@e34ee485244a5b5e6e4e1b96daa4a15c9073e4fc # v1.0.6

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