Skip to content

Commit b13a9b9

Browse files
docs: improve actions security documentation (#1018)
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
1 parent 1ed0ce3 commit b13a9b9

File tree

3 files changed

+65
-2
lines changed

3 files changed

+65
-2
lines changed

check-actions-security/zizmor.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates.
2+
# SPDX-License-Identifier: MIT
3+
#
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in all
13+
# copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
# SOFTWARE.
22+
23+
rules:
24+
unpinned-uses:
25+
config:
26+
policies:
27+
ansys/*: ref-pin
28+
actions/*: hash-pin
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve actions security documentation

doc/source/vulnerability-actions/index.rst

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,45 @@ Check actions security action
5555

5656
#. Create a virtual environment with ``python -m venv .venv`` and activate it.
5757
#. Install zizmor: ``pip install zizmor==1.12.1``.
58+
#. If the repository doesn't use a custom ``zizmor.yml`` file, download the ``zizmor.yml`` file from the
59+
`ansys/action check-actions-security folder <https://github.com/ansys/actions/tree/main/check-actions-security>`_
60+
and move it to the root of the repository.
61+
62+
#. If ``trust-ansys-actions`` has been set to false in the workflow (i.e., you pin ``ansys/actions`` with a SHA instead of a tag), you must edit the
63+
default policies in ``zizmor.yml`` as follows:
64+
65+
.. tab-set::
66+
67+
68+
.. tab-item:: Before
69+
70+
.. code:: yaml
71+
72+
rules:
73+
unpinned-uses:
74+
config:
75+
policies:
76+
ansys/*: ref-pin
77+
actions/*: hash-pin
78+
79+
80+
.. tab-item:: After
81+
82+
.. code:: yaml
83+
84+
rules:
85+
unpinned-uses:
86+
config:
87+
policies:
88+
ansys/*: hash-pin
89+
actions/*: hash-pin
90+
5891
#. Run ``zizmor --persona=pedantic .`` for a minimal audit (action's default) or ``zizmor --persona=auditor`` for a stricter audit.
5992
#. To generate a summary table locally:
6093

61-
- Download ``zizmor-summary.py`` from the
62-
`ansys/action python utilities folder <https://github.com/ansys/actions/tree/main/python-utils>`_.
94+
- Download the ``zizmor-summary.py`` file from the
95+
`ansys/action python utilities folder <https://github.com/ansys/actions/tree/main/python-utils>`_ and
96+
move it to the root of the repository.
6397
- Set one of the following environment variables:
6498

6599
- ``HIGH_AUDIT_LEVEL=--persona=pedantic`` for minimal audit.

0 commit comments

Comments
 (0)