Skip to content

Commit 276de5e

Browse files
dantte-lpclaude
andauthored
ci: pin dependabot/fetch-metadata by SHA and annotate action versions (gopasspw#3500)
.github/workflows/build.yml pinned dependabot/fetch-metadata to the mutable @V3 tag while every other action in the repository is pinned by commit SHA. A mutable tag can be repointed at arbitrary code by anyone who can push to that repository, and this particular step runs in a job that auto-approves and squash-merges pull requests. OpenSSF Scorecard reports this under Pinned-Dependencies, and .github/workflows/scorecard.yml is enabled here. v3 and v3.1.0 currently resolve to the same commit (25dd0e34f4fe68f24cc83900b1fe3fe149efef98, verified via the GitHub API), so this is a pure pin with no version change. While here, add the missing "# vX.Y.Z" comments to the four docker/* actions that were pinned by SHA without one, so every "uses:" line in the repository states which release the SHA corresponds to. Tags verified via the GitHub API against each pinned SHA; no SHAs were changed. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 38f9248 commit 276de5e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ jobs:
8888

8989
- name: Extract metadata (tags, labels) for Docker
9090
id: meta
91-
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302
91+
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
9292
env:
9393
IMAGE_NAME: ${{ github.repository }}
9494
with:
9595
images: ${{ env.IMAGE_NAME }}
9696

9797
- name: Build container image
98-
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a
98+
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
9999
with:
100100
context: .
101101
push: false
@@ -170,7 +170,7 @@ jobs:
170170
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
171171
steps:
172172
- id: metadata
173-
uses: dependabot/fetch-metadata@v3
173+
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
174174
with:
175175
github-token: "${{ secrets.GITHUB_TOKEN }}"
176176
- run: |

‎.github/workflows/container.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ jobs:
3939
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4040

4141
- name: Log in to the Container registry
42-
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f
42+
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
4343
with:
4444
registry: ${{ env.REGISTRY }}
4545
username: ${{ github.actor }}
4646
password: ${{ secrets.GITHUB_TOKEN }}
4747

4848
- name: Extract metadata (tags, labels) for Docker
4949
id: meta
50-
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302
50+
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
5151
with:
5252
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5353

5454
- name: Build and push Docker image
55-
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a
55+
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
5656
with:
5757
context: .
5858
push: true

0 commit comments

Comments
 (0)
⌂ 换网址