Skip to content

Commit ef3ae77

Browse files
committed
feat: add doc on pinning GitHub actions
1 parent 7e6433c commit ef3ae77

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

doc/source/getting-started/administration.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ The PyAnsys core team performs these checks when performing the technical review
180180
| |uncheck| :ref:`Branch protection` is enabled.
181181
| |uncheck| :ref:`Tag protection` is enabled.
182182
| |uncheck| :ref:`Workflow protection` is enabled.
183+
| |uncheck| :ref:`Pin actions with full-length commit SHA` is enabled.
183184
184185

185186
.. |check| raw:: html

doc/source/how-to/repository-protection.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,19 @@ their PR workflows do not have to be accepted every time that they intend to run
132132

133133
Internal and private repositories are only available to organization users and repository members,
134134
respectively. Thus, no specific rules for outside collaborators are needed.
135+
136+
Pin actions with full-length commit SHA
137+
---------------------------------------
138+
139+
Protect your workflows by requiring actions to be pinned to a full-length commit SHA.
140+
To enable the setting **Require actions to be pinned to a full-length commit SHA**, select
141+
**Settings > Actions > General** and see the **Actions permissions** section.
142+
143+
When this option is active, all GitHub Actions used in workflows must reference a specific
144+
commit hash, for example `actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2` instead
145+
of a moving tag such as `v4`. The main advantage of this option is supply chain security. Indeed, tags
146+
are mutable in the sense that an attacker who gains access to a project, or even a legitimate maintainer
147+
updating a tag, could introduce breaking changes or malicious code without you noticing. Pinning to a
148+
commit SHA eliminates that risk by locking the dependency to a known version. On top of that, since the
149+
action's code cannot change silently in the background, it guarantees that every workflow run uses the
150+
exact same version of the action.

0 commit comments

Comments
 (0)