Skip to content

Commit 6997605

Browse files
fix: Zizmor fixes (#366)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent 099ff57 commit 6997605

File tree

3 files changed

+43
-24
lines changed

3 files changed

+43
-24
lines changed

.github/workflows/ci_cd.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ concurrency:
2020
group: ${{ github.workflow }}-${{ github.ref }}
2121
cancel-in-progress: true
2222

23+
permissions: {}
24+
2325
jobs:
2426

2527
update-changelog:
@@ -30,7 +32,7 @@ jobs:
3032
contents: write
3133
pull-requests: write
3234
steps:
33-
- uses: ansys/actions/doc-deploy-changelog@v10
35+
- uses: ansys/actions/doc-deploy-changelog@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
3436
with:
3537
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
3638
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
@@ -42,27 +44,37 @@ jobs:
4244
steps:
4345
- name: PyAnsys Vulnerability check (on main)
4446
if: github.ref == 'refs/heads/main'
45-
uses: ansys/actions/check-vulnerabilities@v10
47+
uses: ansys/actions/check-vulnerabilities@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
4648
with:
4749
python-version: ${{ env.MAIN_PYTHON_VERSION }}
4850
python-package-name: ${{ env.PACKAGE_NAME }}
4951
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
5052

5153
- name: PyAnsys Vulnerability check (on dev mode)
5254
if: github.ref != 'refs/heads/main'
53-
uses: ansys/actions/check-vulnerabilities@v10
55+
uses: ansys/actions/check-vulnerabilities@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
5456
with:
5557
python-version: ${{ env.MAIN_PYTHON_VERSION }}
5658
python-package-name: ${{ env.PACKAGE_NAME }}
5759
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
5860
dev-mode: true
5961

62+
actions-security:
63+
name: Actions Security
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: ansys/actions/check-actions-security@123a1f17d71f117e0ba29c53d6a0f602e0d8d902 # v10.1.3
67+
with:
68+
generate-summary: true
69+
token: ${{ secrets.GITHUB_TOKEN }}
70+
auditing-level: 'high'
71+
6072
docs-style:
6173
name: Documentation Style Check
6274
runs-on: ubuntu-latest
6375
steps:
6476
- name: PyAnsys documentation style checks
65-
uses: ansys/actions/doc-style@v10
77+
uses: ansys/actions/doc-style@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
6678
with:
6779
token: ${{ secrets.GITHUB_TOKEN }}
6880

@@ -72,10 +84,10 @@ jobs:
7284
needs: [docs-style]
7385
steps:
7486
- name: Setup headless display
75-
uses: pyvista/setup-headless-display-action@v4
87+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
7688

7789
- name: "Run Ansys documentation building action"
78-
uses: ansys/actions/doc-build@v10
90+
uses: ansys/actions/doc-build@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
7991
with:
8092
python-version: ${{ env.MAIN_PYTHON_VERSION }}
8193
add-pdf-html-docs-as-assets: true
@@ -95,7 +107,7 @@ jobs:
95107
os: macos-latest
96108
steps:
97109
- name: Build wheelhouse and perform smoke test
98-
uses: ansys/actions/build-wheelhouse@v10
110+
uses: ansys/actions/build-wheelhouse@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
99111
with:
100112
library-name: ${{ env.PACKAGE_NAME }}
101113
operating-system: ${{ matrix.os }}
@@ -108,27 +120,28 @@ jobs:
108120
runs-on: ubuntu-latest
109121
steps:
110122
- name: Restore images cache
111-
uses: actions/cache@v4
123+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
112124
with:
113125
path: tests/graphics/image_cache
114126
key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
115127
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
128+
lookup-only: true
116129

117130
- name: "Run pytest"
118-
uses: ansys/actions/tests-pytest@v10
131+
uses: ansys/actions/tests-pytest@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
119132
with:
120133
python-version: ${{ env.MAIN_PYTHON_VERSION }}
121134
requires-xvfb: true
122135

123136
- name: Upload PyVista generated images (cache and results)
124137
if: always()
125-
uses: actions/upload-artifact@v4
138+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
126139
with:
127140
name: pytest-pyvista-images-${{ runner.os }}
128141
path: tests/_image_cache
129142
retention-days: 7
130143

131-
- uses: codecov/codecov-action@v5
144+
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
132145
name: 'Upload coverage to CodeCov'
133146
with:
134147
token: ${{ secrets.CODECOV_TOKEN }}
@@ -139,7 +152,7 @@ jobs:
139152
runs-on: ubuntu-latest
140153
steps:
141154
- name: Build library source and wheel artifacts
142-
uses: ansys/actions/build-library@v10
155+
uses: ansys/actions/build-library@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
143156
with:
144157
library-name: ${{ env.PACKAGE_NAME }}
145158
python-version: ${{ env.MAIN_PYTHON_VERSION }}
@@ -151,7 +164,7 @@ jobs:
151164
needs: [package]
152165
steps:
153166
- name: Deploy the latest documentation
154-
uses: ansys/actions/doc-deploy-dev@v10
167+
uses: ansys/actions/doc-deploy-dev@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
155168
with:
156169
cname: ${{ env.DOCUMENTATION_CNAME }}
157170
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
@@ -183,7 +196,7 @@ jobs:
183196
skip-existing: false
184197

185198
- name: Release to GitHub
186-
uses: ansys/actions/release-github@v10
199+
uses: ansys/actions/release-github@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
187200
with:
188201
token: ${{ secrets.GITHUB_TOKEN }}
189202
library-name: ${{ env.PACKAGE_NAME }}
@@ -195,7 +208,7 @@ jobs:
195208
needs: [release]
196209
steps:
197210
- name: Deploy the stable documentation
198-
uses: ansys/actions/doc-deploy-stable@v10
211+
uses: ansys/actions/doc-deploy-stable@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
199212
with:
200213
cname: ${{ env.DOCUMENTATION_CNAME }}
201214
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}

.github/workflows/label.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
1717

18+
permissions: {}
19+
1820
jobs:
1921
label-syncer:
2022
name: Syncer
2123
runs-on: ubuntu-latest
2224
steps:
23-
- uses: actions/checkout@v5
24-
- uses: micnncim/action-label-syncer@v1
25+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
with:
27+
persist-credentials: false
28+
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
2529
env:
2630
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2731

@@ -35,42 +39,43 @@ jobs:
3539
steps:
3640
# Label based on modified files
3741
- name: Label based on changed files
38-
uses: actions/labeler@v6
42+
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
3943
with:
4044
repo-token: ${{ secrets.GITHUB_TOKEN }}
4145
sync-labels: true
4246

43-
- uses: actions-ecosystem/action-add-labels@v1
47+
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
4448
if: |
4549
startsWith(github.event.pull_request.head.ref, 'doc') ||
4650
startsWith(github.event.pull_request.head.ref, 'docs')
4751
with:
4852
labels: documentation
49-
- uses: actions-ecosystem/action-add-labels@v1
53+
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
5054
if: |
5155
startsWith(github.event.pull_request.head.ref, 'maint') ||
5256
startsWith(github.event.pull_request.head.ref, 'no-ci') ||
5357
startsWith(github.event.pull_request.head.ref, 'ci')
5458
with:
5559
labels: maintenance
5660

57-
- uses: actions-ecosystem/action-add-labels@v1
61+
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
5862
if: startsWith(github.event.pull_request.head.ref, 'feat')
5963
with:
6064
labels: enhancement
6165

62-
- uses: actions-ecosystem/action-add-labels@v1
66+
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
6367
if: |
6468
startsWith(github.event.pull_request.head.ref, 'fix') ||
6569
startsWith(github.event.pull_request.head.ref, 'patch')
6670
with:
6771
labels: bug
6872

6973
commenter:
74+
name: "Commenter to suggest adding labels"
7075
runs-on: ubuntu-latest
7176
steps:
7277
- name: Suggest to add labels
73-
uses: peter-evans/create-or-update-comment@v4
78+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
7479
# Execute only when no labels have been applied to the pull request
7580
if: toJSON(github.event.pull_request.labels.*.name) == '{}'
7681
with:
@@ -92,7 +97,7 @@ jobs:
9297
pull-requests: write
9398
runs-on: ubuntu-latest
9499
steps:
95-
- uses: ansys/actions/doc-changelog@v10
100+
- uses: ansys/actions/doc-changelog@c2fa7c93f6883114e0e643599431b33d29f0b13f # v10.1.4
96101
with:
97102
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
98103
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix: Zizmor fixes

0 commit comments

Comments
 (0)