Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/autodoc-executor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.2.2
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@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4
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 }}
Expand All @@ -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 }}
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bedrock-generic-executor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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('<!-- dotcms-ai-review:v3:{0}:{1} -->', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('<!-- dotcms-ai-review:v3:{0} -->', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }}
steps:
- uses: actions/checkout@v4
- 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@v4
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 }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bedrock-harness-executor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,20 @@ jobs:
# the sticky marker from being a prefix of the SHA form.
STICKY_MARKER: ${{ inputs.use_sticky_comment == false && format('<!-- dotcms-ai-review:v3:{0}:{1} -->', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('<!-- dotcms-ai-review:v3:{0} -->', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }}
steps:
- uses: actions/checkout@v4
- 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@v4
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@v6
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

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/claude-executor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ jobs:
esac

- name: Checkout repository
uses: actions/checkout@v4
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@v4
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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codex-executor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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('<!-- dotcms-ai-review:v3:{0}:{1} -->', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id, github.event.pull_request.head.sha || github.sha) || format('<!-- dotcms-ai-review:v3:{0} -->', inputs.sticky_namespace != '' && inputs.sticky_namespace || inputs.model_id) }}
steps:
- uses: actions/checkout@v4
- 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@v4
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@v6
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

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deployment-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}';
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
changed-files: ${{ steps.get-files.outputs.files }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1
with:
fetch-depth: 0

Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
old-images: ${{ steps.check-changes.outputs.old-images }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1
with:
fetch-depth: 0

Expand Down Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
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
Expand All @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - https://github.com/actions/checkout/releases/tag/v7.0.1

- name: Validate GitHub Actions workflows
run: |
Expand Down
40 changes: 40 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<owner>/<repo>/git/refs/tags/<tag> --jq '.object.sha, .object.type'
# if .object.type is "tag" (annotated), dereference once more:
gh api repos/<owner>/<repo>/git/tags/<sha-from-above> --jq '.object.sha'
# confirm which version tag(s) actually point at that commit:
gh api repos/<owner>/<repo>/tags --paginate --jq '.[] | select(.commit.sha=="<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 <url> <tag>` 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.
Expand Down
Loading