Skip to content

Commit 1fe0f43

Browse files
committed
added the workflow and script to pin commit hash
Signed-off-by: antedotee <soniyadav2051982@gmail.com>
1 parent 85d9faf commit 1fe0f43

3 files changed

Lines changed: 491 additions & 0 deletions

File tree

.gha-reversemap.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# Approved commit hashes for GitHub Actions used in .github/workflows.
2+
# Every workflow must reference these actions by this SHA (not by tag).
3+
# See hack/gha-reversemap.sh for verify/apply/update commands.
4+
5+
actions/cache:
6+
sha: 0057852bfaa89a56745cba8c7296529d2fc39830
7+
sha-url: https://github.com/actions/cache/commit/0057852bfaa89a56745cba8c7296529d2fc39830
8+
tag: v4
9+
tag-url: https://github.com/actions/cache/tree/v4
10+
11+
actions/checkout:
12+
sha: 11bd71901bbe5b1630ceea73d27597364c9af683
13+
sha-url: https://github.com/actions/checkout/commit/11bd71901bbe5b1630ceea73d27597364c9af683
14+
tag: v4.2.2
15+
tag-url: https://github.com/actions/checkout/tree/v4.2.2
16+
17+
actions/download-artifact:
18+
sha: 37930b1c2abaa49bbe596cd826c3c89aef350131
19+
sha-url: https://github.com/actions/download-artifact/commit/37930b1c2abaa49bbe596cd826c3c89aef350131
20+
tag: v7.0.0
21+
tag-url: https://github.com/actions/download-artifact/tree/v7.0.0
22+
23+
actions/github-script:
24+
sha: f28e40c7f34bde8b3046d885e986cb6290c5673b
25+
sha-url: https://github.com/actions/github-script/commit/f28e40c7f34bde8b3046d885e986cb6290c5673b
26+
tag: v7
27+
tag-url: https://github.com/actions/github-script/tree/v7
28+
29+
actions/labeler:
30+
sha: ac9175f8a1f3625fd0d4fb234536d26811351594
31+
sha-url: https://github.com/actions/labeler/commit/ac9175f8a1f3625fd0d4fb234536d26811351594
32+
tag: v4
33+
tag-url: https://github.com/actions/labeler/tree/v4
34+
35+
actions/setup-go:
36+
sha: be3c94b385c4f180051c996d336f57a34c397495
37+
sha-url: https://github.com/actions/setup-go/commit/be3c94b385c4f180051c996d336f57a34c397495
38+
tag: v3
39+
tag-url: https://github.com/actions/setup-go/tree/v3
40+
41+
actions/setup-node:
42+
sha: 3235b876344d2a9aa001b8d1453c930bba69e610
43+
sha-url: https://github.com/actions/setup-node/commit/3235b876344d2a9aa001b8d1453c930bba69e610
44+
tag: v3
45+
tag-url: https://github.com/actions/setup-node/tree/v3
46+
47+
actions/stale:
48+
sha: 1160a2240286f5da8ec72b1c0816ce2481aabf84
49+
sha-url: https://github.com/actions/stale/commit/1160a2240286f5da8ec72b1c0816ce2481aabf84
50+
tag: v8
51+
tag-url: https://github.com/actions/stale/tree/v8
52+
53+
actions/upload-artifact:
54+
sha: b7c566a772e6b6bfb58ed0dc250532a479d7789f
55+
sha-url: https://github.com/actions/upload-artifact/commit/b7c566a772e6b6bfb58ed0dc250532a479d7789f
56+
tag: v6.0.0
57+
tag-url: https://github.com/actions/upload-artifact/tree/v6.0.0
58+
59+
azure/setup-helm:
60+
sha: bf6a7d304bc2fdb57e0331155b7ebf2c504acf0a
61+
sha-url: https://github.com/azure/setup-helm/commit/bf6a7d304bc2fdb57e0331155b7ebf2c504acf0a
62+
tag: v4
63+
tag-url: https://github.com/azure/setup-helm/tree/v4
64+
65+
ca-dp/code-butler:
66+
sha: 95c1e1519154f897313c8d6c87658e695f16f28b
67+
sha-url: https://github.com/ca-dp/code-butler/commit/95c1e1519154f897313c8d6c87658e695f16f28b
68+
tag: v1
69+
tag-url: https://github.com/ca-dp/code-butler/tree/v1
70+
71+
codecov/codecov-action:
72+
sha: ab904c41d6ece82784817410c45d8b8c02684457
73+
sha-url: https://github.com/codecov/codecov-action/commit/ab904c41d6ece82784817410c45d8b8c02684457
74+
tag: v3
75+
tag-url: https://github.com/codecov/codecov-action/tree/v3
76+
77+
docker/build-push-action:
78+
sha: 48aba3b46d1b1fec4febb7c5d0c644b249a11355
79+
sha-url: https://github.com/docker/build-push-action/commit/48aba3b46d1b1fec4febb7c5d0c644b249a11355
80+
tag: v6.10.0
81+
tag-url: https://github.com/docker/build-push-action/tree/v6.10.0
82+
83+
docker/login-action:
84+
sha: 9780b0c442fbb1117ed29e0efdff1e18412f7567
85+
sha-url: https://github.com/docker/login-action/commit/9780b0c442fbb1117ed29e0efdff1e18412f7567
86+
tag: v3.3.0
87+
tag-url: https://github.com/docker/login-action/tree/v3.3.0
88+
89+
docker/setup-buildx-action:
90+
sha: c47758b77c9736f4b2ef4073d4d51994fabfe349
91+
sha-url: https://github.com/docker/setup-buildx-action/commit/c47758b77c9736f4b2ef4073d4d51994fabfe349
92+
tag: v3.7.1
93+
tag-url: https://github.com/docker/setup-buildx-action/tree/v3.7.1
94+
95+
docker/setup-qemu-action:
96+
sha: 49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
97+
sha-url: https://github.com/docker/setup-qemu-action/commit/49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
98+
tag: v3.2.0
99+
tag-url: https://github.com/docker/setup-qemu-action/tree/v3.2.0
100+
101+
github/codeql-action/analyze:
102+
sha: 2b983b380ce715a6c836c917154509c332c19b3a
103+
sha-url: https://github.com/github/codeql-action/commit/2b983b380ce715a6c836c917154509c332c19b3a
104+
tag: v3
105+
tag-url: https://github.com/github/codeql-action/tree/v3
106+
107+
github/codeql-action/autobuild:
108+
sha: 2b983b380ce715a6c836c917154509c332c19b3a
109+
sha-url: https://github.com/github/codeql-action/commit/2b983b380ce715a6c836c917154509c332c19b3a
110+
tag: v3
111+
tag-url: https://github.com/github/codeql-action/tree/v3
112+
113+
github/codeql-action/init:
114+
sha: 2b983b380ce715a6c836c917154509c332c19b3a
115+
sha-url: https://github.com/github/codeql-action/commit/2b983b380ce715a6c836c917154509c332c19b3a
116+
tag: v3
117+
tag-url: https://github.com/github/codeql-action/tree/v3
118+
119+
peaceiris/actions-hugo:
120+
sha: 75d2e84710de30f6ff7268e08f310b60ef14033f
121+
sha-url: https://github.com/peaceiris/actions-hugo/commit/75d2e84710de30f6ff7268e08f310b60ef14033f
122+
tag: v3.0.0
123+
tag-url: https://github.com/peaceiris/actions-hugo/tree/v3.0.0
124+
125+
peter-evans/create-pull-request:
126+
sha: c5a7806660adbe173f04e3e038b0ccdcd758773c
127+
sha-url: https://github.com/peter-evans/create-pull-request/commit/c5a7806660adbe173f04e3e038b0ccdcd758773c
128+
tag: v6
129+
tag-url: https://github.com/peter-evans/create-pull-request/tree/v6
130+
131+
pipe-cd/actions-event-register:
132+
sha: 20c98a503062021720b2fcf2058276b32453dee6
133+
sha-url: https://github.com/pipe-cd/actions-event-register/commit/20c98a503062021720b2fcf2058276b32453dee6
134+
tag: v1.2.0
135+
tag-url: https://github.com/pipe-cd/actions-event-register/tree/v1.2.0
136+
137+
pipe-cd/actions-gh-release:
138+
sha: b95a9be7405d47907b0da252d0323e17304ba6c2
139+
sha-url: https://github.com/pipe-cd/actions-gh-release/commit/b95a9be7405d47907b0da252d0323e17304ba6c2
140+
tag: v2.6.0
141+
tag-url: https://github.com/pipe-cd/actions-gh-release/tree/v2.6.0
142+
143+
reviewdog/action-golangci-lint:
144+
sha: f9bba13753278f6a73b27a56a3ffb1bfda90ed71
145+
sha-url: https://github.com/reviewdog/action-golangci-lint/commit/f9bba13753278f6a73b27a56a3ffb1bfda90ed71
146+
tag: v2.8.0
147+
tag-url: https://github.com/reviewdog/action-golangci-lint/tree/v2.8.0
148+
149+
softprops/action-gh-release:
150+
sha: c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda
151+
sha-url: https://github.com/softprops/action-gh-release/commit/c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda
152+
tag: v2.2.1
153+
tag-url: https://github.com/softprops/action-gh-release/tree/v2.2.1
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Ensures every GitHub Action in our workflows is pinned by commit hash (not tag).
2+
# That improves supply chain security: we run a fixed, auditable version of each action.
3+
# The job runs hack/gha-reversemap.sh verify-mapusage, which checks that each "uses:"
4+
# line points to a 40-char hash listed in .gha-reversemap.yml. If the check fails,
5+
# run "hack/gha-reversemap.sh apply-reversemap" locally and commit the changes.
6+
7+
name: Verify Action Hashes
8+
9+
on:
10+
push:
11+
branches:
12+
- master
13+
paths:
14+
- ".github/workflows/**"
15+
- ".gha-reversemap.yml"
16+
pull_request:
17+
branches:
18+
- master
19+
- "release-v*"
20+
- "feat/*"
21+
paths:
22+
- ".github/workflows/**"
23+
- ".gha-reversemap.yml"
24+
workflow_dispatch:
25+
26+
permissions:
27+
contents: read
28+
29+
jobs:
30+
verify-action-hashes:
31+
name: Verify workflows use commit hashes
32+
runs-on: ubuntu-24.04
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
37+
- name: Ensure all actions are pinned by commit hash
38+
run: hack/gha-reversemap.sh verify-mapusage

0 commit comments

Comments
 (0)