Skip to content

[rounds] ci: pin build workflow actions and add default permissions #4

Description

@jhgaylor

Carried over from the archived managoat/rounds#1 when the demo suite
was consolidated into this repository. The original repo has been deleted, so
this is the surviving copy.

  • Originally opened by @app/fountain-rounds on 2026-08-24 (PR https://github.com/managoat/rounds/pull/1)
  • Now lives at: (root workflows)
  • Status: APPLIED to .github/workflows/ in the monorepo — same substance as mend#1. Kept for the record.

chant flagged 7 things in .github/workflows/build.yml. This pull request fixes them.

  • actions/checkout not pinned to a SHA (GHA021) in build — Pinned actions/checkout to commit 3d3c42e5aac5ba805825da76410c181273ba90b1 (tag v7), keeping the # v7 comment for readability.
  • Action not pinned to a commit SHA (GHA029) in build — Pinned oven-sh/setup-bun to commit 0c5077e51419868618aeaa5fe8019c62421857d6 (tag v2), keeping the # v2 comment for readability.
  • Action not pinned to a commit SHA (GHA029) in build — Pinned docker/setup-qemu-action to commit 96fe6ef7f33517b61c61be40b68a1882f3264fb8 (tag v4), keeping the # v4 comment for readability.
  • Action not pinned to a commit SHA (GHA029) in build — Pinned docker/setup-buildx-action to commit 37fe631027851001ddb9b187196cc803df7f5f0e (tag v4), keeping the # v4 comment for readability.
  • Action not pinned to a commit SHA (GHA029) in build — Pinned docker/login-action to commit dbcb813823bdd20940b903addbd779551569679f (tag v4), keeping the # v4 comment for readability.
  • Action not pinned to a commit SHA (GHA029) in build — Pinned docker/build-push-action to commit 53b7df96c91f9c12dcc8a07bcb9ccacbed38856a (tag v7), keeping the # v7 comment for readability.
  • No explicit permissions block (GHA017) — Added a top-level permissions: contents: read block as the workflow default.

Verified by re-running the audit: merge-worthy findings 11 → 4.


Opened by Rounds, which audits this repository's configuration on a schedule. Close it without merging and this file will never be raised again.


Original diff
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0f546b3..1c11a5d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,6 +20,9 @@ concurrency:
 env:
   IMAGE: ghcr.io/${{ github.repository_owner }}/rounds
 
+permissions:
+  contents: read
+
 jobs:
   build:
     runs-on: ubuntu-latest
@@ -27,22 +30,22 @@ jobs:
       contents: write
       packages: write
     steps:
-      - uses: actions/checkout@v7
-      - uses: oven-sh/setup-bun@v2
+      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
+      - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
       - name: Test and build
         run: |
           bun install --frozen-lockfile
           bun test
           bun run build
-      - uses: docker/setup-qemu-action@v4
-      - uses: docker/setup-buildx-action@v4
-      - uses: docker/login-action@v4
+      - uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4
+      - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4
+      - uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
         with:
           registry: ghcr.io
           username: ${{ github.actor }}
           password: ${{ secrets.GITHUB_TOKEN }}
       - name: Build and push
-        uses: docker/build-push-action@v7
+        uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7
         with:
           context: .
           platforms: linux/amd64,linux/arm64

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions