ci(autodoc): fix Bedrock OIDC and harden autodoc workflow
Open
OKR : Documentation
Team : Product
Type : Defect
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Summary
The autodoc workflow (issue_autodoc.yml) was failing at AssumeRoleWithWebIdentity in production with a Not authorized to perform sts:AssumeRoleWithWebIdentity error that never appeared on core-workflow-test. Root cause: the IAM trust policy on GitHubActions-BedrockCodeReview gates on the OIDC job_workflow_ref claim, which only resolves correctly when the job is invoked via a reusable workflow — not when it runs inline.
Changes
- Restructure workflow into a multi-job pipeline:
preflight → prep → claude → finalize. Theclaudejob callsdotCMS/ai-workflows/.github/workflows/autodoc-executor.ymlas a reusable workflow, ensuring thejob_workflow_refOIDC claim resolves todotCMS/ai-workflows/...@refs/tags/*and satisfies the Bedrock role trust condition. - modUser guardrail: skip applying a draft when a human (not the CI Autodoc service account) has an outstanding working draft on the content, to avoid overwriting human edits.
- Pin action SHAs to address Semgrep supply-chain findings.
- Replace
secrets: inheritwith explicit secret map for least-privilege. - Move
AUTODOC_DOTCMS_SITE_FOLDERandAUTODOC_DOTCMS_BASE_URLfrom Secrets to Variables — neither is a credential; treating them as secrets obscures config unnecessarily.
Related
dotCMS/ai-workflows#65(merged) — introducesautodoc-executor.ymlreusable workflow- Bedrock IAM role:
GitHubActions-BedrockCodeReview
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.