From 1b97d258b73200bb9e806b17b59e58e45d8e039b Mon Sep 17 00:00:00 2001 From: Todd Jacobsen Date: Fri, 28 Aug 2026 08:46:06 -0600 Subject: [PATCH 1/3] fix(workflows): bump GitHub Actions off Node.js 20 runtime actions/checkout, aws-actions/configure-aws-credentials, and astral-sh/setup-uv were all still pinned to Node 20-targeting majors, which GitHub now force-runs on Node 24 with a deprecation warning. Bump to their latest majors (checkout v7, configure-aws-credentials v6, setup-uv v10), including the SHA-pinned refs in autodoc-executor.yml. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/autodoc-executor.yml | 4 ++-- .github/workflows/bedrock-generic-executor.yml | 4 ++-- .github/workflows/bedrock-harness-executor.yml | 6 +++--- .github/workflows/claude-executor.yml | 4 ++-- .github/workflows/codex-executor.yml | 6 +++--- .github/workflows/deployment-guard.yml | 4 ++-- .github/workflows/tests.yml | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/autodoc-executor.yml b/.github/workflows/autodoc-executor.yml index 6c81bca..434575c 100644 --- a/.github/workflows/autodoc-executor.yml +++ b/.github/workflows/autodoc-executor.yml @@ -70,10 +70,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.2.2 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Configure AWS credentials (OIDC) - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4 + uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} diff --git a/.github/workflows/bedrock-generic-executor.yml b/.github/workflows/bedrock-generic-executor.yml index a898c32..df4a6bb 100644 --- a/.github/workflows/bedrock-generic-executor.yml +++ b/.github/workflows/bedrock-generic-executor.yml @@ -96,12 +96,12 @@ jobs: # trailing " -->" keeps the sticky marker from being a prefix of the SHA form. STICKY_MARKER: ${{ inputs.use_sticky_comment == false && format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: fetch-depth: 1 - name: Configure AWS credentials (OIDC) - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@v6 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} diff --git a/.github/workflows/bedrock-harness-executor.yml b/.github/workflows/bedrock-harness-executor.yml index 7256e28..997c5a7 100644 --- a/.github/workflows/bedrock-harness-executor.yml +++ b/.github/workflows/bedrock-harness-executor.yml @@ -150,20 +150,20 @@ jobs: # the sticky marker from being a prefix of the SHA form. STICKY_MARKER: ${{ inputs.use_sticky_comment == false && format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: # Full working tree of the PR (merge ref) so the harness can grep/read any file, # not just the diff. fetch-depth:1 is enough — we read current state, not history. fetch-depth: 1 - name: Configure AWS credentials (OIDC) - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@v6 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} - name: Set up uv - uses: astral-sh/setup-uv@v6 + uses: astral-sh/setup-uv@v10 with: enable-cache: true diff --git a/.github/workflows/claude-executor.yml b/.github/workflows/claude-executor.yml index f746b43..daf3612 100644 --- a/.github/workflows/claude-executor.yml +++ b/.github/workflows/claude-executor.yml @@ -117,13 +117,13 @@ jobs: esac - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 1 - name: Configure AWS credentials (OIDC) if: inputs.provider == 'anthropic-bedrock' - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@v6 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} diff --git a/.github/workflows/codex-executor.yml b/.github/workflows/codex-executor.yml index 7bfca13..54a7302 100644 --- a/.github/workflows/codex-executor.yml +++ b/.github/workflows/codex-executor.yml @@ -152,18 +152,18 @@ jobs: # trailing " -->" keeps the sticky marker from being a prefix of the SHA form. STICKY_MARKER: ${{ inputs.use_sticky_comment == false && format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: fetch-depth: 1 - name: Configure AWS credentials (OIDC) - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@v6 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} - name: Set up uv - uses: astral-sh/setup-uv@v6 + uses: astral-sh/setup-uv@v10 with: enable-cache: true diff --git a/.github/workflows/deployment-guard.yml b/.github/workflows/deployment-guard.yml index 3ab05e3..8259a46 100644 --- a/.github/workflows/deployment-guard.yml +++ b/.github/workflows/deployment-guard.yml @@ -176,7 +176,7 @@ jobs: changed-files: ${{ steps.get-files.outputs.files }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 @@ -266,7 +266,7 @@ jobs: old-images: ${{ steps.check-changes.outputs.old-images }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 894f244..224c825 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: contents: read steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Lint workflows with actionlint (docker) run: | docker run --rm -v "${PWD}:/repo" -w /repo rhysd/actionlint:1.7.7 @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Validate GitHub Actions workflows run: | From b1cb576faa40ed80f34149717b2000a04eb315ee Mon Sep 17 00:00:00 2001 From: Todd Jacobsen Date: Fri, 28 Aug 2026 09:20:56 -0600 Subject: [PATCH 2/3] fix(security): pin GitHub Actions to commit SHA, add source URL doc comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Semgrep github-actions-mutable-action-tag flagged 14 uses: refs pinned to mutable tags (checkout@v7, github-script@v7, configure-aws-credentials@v6, setup-uv@v10, claude-code-action@v1) across 6 workflows. Pin each to the resolved commit SHA with a version + release-URL comment, matching the convention already used in autodoc-executor.yml (also backfilled with URLs here per reviewer request). astral-sh/setup-uv@v10 turned out to be a nonexistent ref upstream (only v10.0.0/v10.0.1 tags exist) — pinned to v10.0.1 instead. --- .github/workflows/autodoc-executor.yml | 8 ++++---- .github/workflows/bedrock-generic-executor.yml | 4 ++-- .github/workflows/bedrock-harness-executor.yml | 6 +++--- .github/workflows/claude-executor.yml | 8 ++++---- .github/workflows/codex-executor.yml | 6 +++--- .github/workflows/deployment-guard.yml | 8 ++++---- .github/workflows/tests.yml | 4 ++-- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/autodoc-executor.yml b/.github/workflows/autodoc-executor.yml index 434575c..951fffb 100644 --- a/.github/workflows/autodoc-executor.yml +++ b/.github/workflows/autodoc-executor.yml @@ -70,10 +70,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 - name: Configure AWS credentials (OIDC) - uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3 + uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3 - https://github.com/aws-actions/configure-aws-credentials/releases/tag/v6.2.3 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} @@ -90,7 +90,7 @@ jobs: echo "value=$ARGS" >> "$GITHUB_OUTPUT" - name: Run Claude (Bedrock) - uses: anthropics/claude-code-action@be7b93b1907a4abad570368f3c74b6fe3807510b # v1 + uses: anthropics/claude-code-action@be7b93b1907a4abad570368f3c74b6fe3807510b # v1.0.183 - https://github.com/anthropics/claude-code-action/releases/tag/v1.0.183 env: AUTODOC_DOTCMS_API_TOKEN_AISEARCH: ${{ secrets.AUTODOC_DOTCMS_API_TOKEN_AISEARCH }} AUTODOC_DOTCMS_API_TOKEN_DRAFTING: ${{ secrets.AUTODOC_DOTCMS_API_TOKEN_DRAFTING }} @@ -105,7 +105,7 @@ jobs: - name: Upload report artifact if: always() - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.6.0 + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.6.0 - https://github.com/actions/upload-artifact/releases/tag/v4.6.0 with: name: autodoc-report path: /tmp/autodoc-report.md diff --git a/.github/workflows/bedrock-generic-executor.yml b/.github/workflows/bedrock-generic-executor.yml index df4a6bb..ca52cce 100644 --- a/.github/workflows/bedrock-generic-executor.yml +++ b/.github/workflows/bedrock-generic-executor.yml @@ -96,12 +96,12 @@ jobs: # trailing " -->" keeps the sticky marker from being a prefix of the SHA form. STICKY_MARKER: ${{ inputs.use_sticky_comment == false && format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 1 - name: Configure AWS credentials (OIDC) - uses: aws-actions/configure-aws-credentials@v6 + uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3 - https://github.com/aws-actions/configure-aws-credentials/releases/tag/v6.2.3 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} diff --git a/.github/workflows/bedrock-harness-executor.yml b/.github/workflows/bedrock-harness-executor.yml index 997c5a7..fcba74a 100644 --- a/.github/workflows/bedrock-harness-executor.yml +++ b/.github/workflows/bedrock-harness-executor.yml @@ -150,20 +150,20 @@ jobs: # the sticky marker from being a prefix of the SHA form. STICKY_MARKER: ${{ inputs.use_sticky_comment == false && format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 with: # Full working tree of the PR (merge ref) so the harness can grep/read any file, # not just the diff. fetch-depth:1 is enough — we read current state, not history. fetch-depth: 1 - name: Configure AWS credentials (OIDC) - uses: aws-actions/configure-aws-credentials@v6 + uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3 - https://github.com/aws-actions/configure-aws-credentials/releases/tag/v6.2.3 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} - name: Set up uv - uses: astral-sh/setup-uv@v10 + uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 - https://github.com/astral-sh/setup-uv/releases/tag/v10.0.1 with: enable-cache: true diff --git a/.github/workflows/claude-executor.yml b/.github/workflows/claude-executor.yml index daf3612..b3121b3 100644 --- a/.github/workflows/claude-executor.yml +++ b/.github/workflows/claude-executor.yml @@ -117,13 +117,13 @@ jobs: esac - name: Checkout repository - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 1 - name: Configure AWS credentials (OIDC) if: inputs.provider == 'anthropic-bedrock' - uses: aws-actions/configure-aws-credentials@v6 + uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3 - https://github.com/aws-actions/configure-aws-credentials/releases/tag/v6.2.3 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} @@ -190,7 +190,7 @@ jobs: id: claude-api if: inputs.provider == 'anthropic-api' && steps.api-check.outputs.available == 'true' continue-on-error: true - uses: anthropics/claude-code-action@v1 + uses: anthropics/claude-code-action@a60f3e1db3edbceed2b1e6c6a9d34c36b8a15eba # v1.0.209 - https://github.com/anthropics/claude-code-action/releases/tag/v1.0.209 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} prompt: ${{ inputs.prompt }} @@ -202,7 +202,7 @@ jobs: id: claude-bedrock if: inputs.provider == 'anthropic-bedrock' continue-on-error: true - uses: anthropics/claude-code-action@v1 + uses: anthropics/claude-code-action@a60f3e1db3edbceed2b1e6c6a9d34c36b8a15eba # v1.0.209 - https://github.com/anthropics/claude-code-action/releases/tag/v1.0.209 with: use_bedrock: "true" prompt: ${{ inputs.prompt }} diff --git a/.github/workflows/codex-executor.yml b/.github/workflows/codex-executor.yml index 54a7302..927cc55 100644 --- a/.github/workflows/codex-executor.yml +++ b/.github/workflows/codex-executor.yml @@ -152,18 +152,18 @@ jobs: # trailing " -->" keeps the sticky marker from being a prefix of the SHA form. STICKY_MARKER: ${{ inputs.use_sticky_comment == false && format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 1 - name: Configure AWS credentials (OIDC) - uses: aws-actions/configure-aws-credentials@v6 + uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3 - https://github.com/aws-actions/configure-aws-credentials/releases/tag/v6.2.3 with: role-to-assume: ${{ inputs.bedrock_role_arn }} aws-region: ${{ inputs.aws_region }} - name: Set up uv - uses: astral-sh/setup-uv@v10 + uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 - https://github.com/astral-sh/setup-uv/releases/tag/v10.0.1 with: enable-cache: true diff --git a/.github/workflows/deployment-guard.yml b/.github/workflows/deployment-guard.yml index 8259a46..0dab6c2 100644 --- a/.github/workflows/deployment-guard.yml +++ b/.github/workflows/deployment-guard.yml @@ -75,7 +75,7 @@ jobs: steps: - name: Check if PR author is organization member id: check - uses: actions/github-script@v7 + uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 - https://github.com/actions/github-script/releases/tag/v7.1.0 with: script: | const trustedOrg = '${{ inputs.trusted_organization }}'; @@ -176,7 +176,7 @@ jobs: changed-files: ${{ steps.get-files.outputs.files }} steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 0 @@ -266,7 +266,7 @@ jobs: old-images: ${{ steps.check-changes.outputs.old-images }} steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 with: fetch-depth: 0 @@ -745,7 +745,7 @@ jobs: - name: Create PR comment if: github.event_name == 'pull_request' - uses: actions/github-script@v7 + uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 - https://github.com/actions/github-script/releases/tag/v7.1.0 with: script: | const shouldBypass = '${{ needs.check-org-membership.outputs.should-bypass }}' === 'true'; diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 224c825..c81192a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: contents: read steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 - name: Lint workflows with actionlint (docker) run: | docker run --rm -v "${PWD}:/repo" -w /repo rhysd/actionlint:1.7.7 @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 - name: Validate GitHub Actions workflows run: | From 0634dc06d77cf5f2feb417f71502d0c6a66942ed Mon Sep 17 00:00:00 2001 From: Todd Jacobsen Date: Fri, 28 Aug 2026 10:46:23 -0600 Subject: [PATCH 3/3] docs(claude): document external action SHA-pinning requirement and tag gotchas Codifies the pattern used in this PR's Semgrep fix: third-party uses: steps must pin full commit SHAs with a version + release-URL comment, plus how to resolve tags to SHAs and the GitHub tag-mutability pitfalls (dead major refs, annotated-tag dereferencing) hit while doing it. --- CLAUDE.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 82d1f51..80a88e4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -173,6 +173,46 @@ uses: dotCMS/ai-workflows/.github/workflows/claude-orchestrator.yml@v1.0.0 uses: dotCMS/ai-workflows/.github/workflows/claude-orchestrator.yml@main ``` +### External Action Pinning (third-party `uses:` steps) + +Every third-party action referenced inside this repo's own workflow files (`actions/checkout`, +`aws-actions/configure-aws-credentials`, `astral-sh/setup-uv`, `anthropics/claude-code-action`, +`actions/github-script`, `actions/upload-artifact`, etc.) **must be pinned to a full 40-character +commit SHA, never a tag or branch**. Semgrep's `github-actions-mutable-action-tag` rule enforces +this in CI. Tags are mutable — the action owner (or an attacker who compromises their account) can +silently repoint one, as happened in the `tegioz/repo-lockdown`, `tj-actions/changed-files`, and +`reviewdog/action-setup` supply-chain incidents. A SHA is the one reference GitHub cannot let +anyone quietly move. + +Required format — SHA, then a comment with the resolved version and a link to that version's +release page: + +```yaml +uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1 +``` + +**How to resolve a tag to a SHA** (don't hand-copy the SHA shown in the GitHub UI for a moving +major like `@v7` — resolve the exact patch tag you intend to pin): + +```bash +gh api repos///git/refs/tags/ --jq '.object.sha, .object.type' +# if .object.type is "tag" (annotated), dereference once more: +gh api repos///git/tags/ --jq '.object.sha' +# confirm which version tag(s) actually point at that commit: +gh api repos///tags --paginate --jq '.[] | select(.commit.sha=="") | .name' +``` + +**GitHub tag behavior to know:** +- A bare major (`v7`, `v6`, `v10`) is a convenience ref some action authors move to track their + latest matching patch release — it is not guaranteed to exist. `astral-sh/setup-uv@v10` was + found dead (only `v10.0.0`/`v10.0.1` tags exist upstream, no `v10`) despite being referenced + live in this repo — always verify the tag resolves before trusting it (`git ls-remote --tags + --heads ` returns nothing if it doesn't). +- Annotated tags need one extra API hop to reach the commit SHA (`git/refs/tags` returns a tag + object, not a commit, until dereferenced) — lightweight tags resolve directly. +- When bumping a pinned SHA later, re-verify with the commands above rather than trusting a stale + comment; the version-in-comment is documentation, not a source of truth. + ## Usage by Consuming Repositories Consumer repositories handle their own webhook triggers and conditional logic, then call centralized workflows. This preserves event context and prevents double triggering.