Skip to content

Commit 631d7dd

Browse files
authored
Zizmor hardening (#66)
2 parents f830b37 + 8d45c8f commit 631d7dd

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ updates:
77
directory: "/" # Location of package manifests
88
schedule:
99
interval: "monthly"
10+
cooldown:
11+
default-days: 7
1012
- package-ecosystem: "github-actions"
1113
directory: "/"
1214
schedule:
@@ -15,3 +17,5 @@ updates:
1517
actions:
1618
patterns:
1719
- "*"
20+
cooldown:
21+
default-days: 7

.github/workflows/main.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
pull_request:
88

9+
permissions:
10+
contents: read
11+
912
defaults:
1013
run:
1114
shell: bash -l {0}
@@ -31,10 +34,12 @@ jobs:
3134

3235
steps:
3336
- name: Checkout
34-
uses: actions/checkout@v5
37+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
38+
with:
39+
persist-credentials: false
3540

3641
- name: Setup Python ${{ matrix.python-version }}
37-
uses: actions/setup-python@v6
42+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
3843
with:
3944
python-version: ${{ matrix.python-version }}
4045

.github/workflows/publish.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ jobs:
1616
permissions:
1717
id-token: write
1818
steps:
19-
- uses: actions/checkout@v5
20-
19+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
20+
with:
21+
persist-credentials: false
22+
2123
- name: Set up Python
22-
uses: actions/setup-python@v6
24+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
2325
with:
2426
python-version: '3.x'
2527
- name: Install dependencies
@@ -31,7 +33,7 @@ jobs:
3133
- name: Install built wheel
3234
run: pip install dist/*.whl
3335
- name: Echo current tag
34-
run: echo ${{ github.ref }}
36+
run: echo "$GITHUB_REF"
3537
- name: Get package version
3638
run: |
3739
export PACKAGE_VERSION=$(python -c 'import matplotlib_inline; print(matplotlib_inline.__version__)')

0 commit comments

Comments
 (0)