Skip to content

Commit 9021038

Browse files
Pin actions to a full length commit SHA (#1543)
- Pinned actions by SHA https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies >Pin actions to a full length commit SHA >Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions [How do I validate these pinned actions?](https://gist.github.com/naveensrinivasan/ca008c07279176acce28969fb77d056f) Also, dependabot supports upgrading based on SHA. ossf/scorecard#1700 GitHub's own repository pin's their checkout actions by SHA and doesn't use the version tag https://github.com/github/docs/blob/ea7f218c91ecbae9a700a8702b51a7d2736e0d2c/.github/workflows/docs-review-collect.yml#L23 Signed-off-by: naveensrinivasan <[email protected]> [skip ci]
1 parent 0cdbce7 commit 9021038

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@ jobs:
5151
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
5252
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
5353
- name: Deploy new images
54-
uses: nick-invision/retry@v2
54+
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # v2
5555
with:
5656
timeout_minutes: 20
5757
max_attempts: 3
5858
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release
5959
- name: Tag images as latest
60-
uses: nick-invision/retry@v2
60+
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # v2
6161
with:
6262
timeout_minutes: 20
6363
max_attempts: 3
6464
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make tag_latest
6565
- name: Deploy latest tag
66-
uses: nick-invision/retry@v2
66+
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # v2
6767
with:
6868
timeout_minutes: 20
6969
max_attempts: 3
7070
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release_latest
7171
- name: Tag browser images
72-
uses: nick-invision/retry@v2
72+
uses: nick-invision/retry@7f8f3d9f0f62fe5925341be21c2e8314fd4f7c7c # v2
7373
with:
7474
timeout_minutes: 20
7575
max_attempts: 3
@@ -80,7 +80,7 @@ jobs:
8080
git config --local user.name "Selenium CI Bot"
8181
git commit -m "Update tag in docs and files [skip ci]" -a
8282
- name: Push changes
83-
uses: ad-m/github-push-action@master
83+
uses: ad-m/github-push-action@a3fd843e49cd58d296bdd2431c4853569a1b900f # master
8484
with:
8585
github_token: ${{ secrets.SELENIUM_CI_TOKEN }}
8686
branch: trunk

.github/workflows/lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
action:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: dessant/lock-threads@v3
17+
- uses: dessant/lock-threads@e460dfeb36e731f3aeb214be6b0c9a9d9a67eda6 # v3
1818
with:
1919
process-only: 'issues'
2020
issue-lock-inactive-days: '30'

0 commit comments

Comments
 (0)