fix(ci): authenticate to Vault directly for the contentful-docs sync - #488
Conversation
Code Review Agent Run #0f7b25Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Impact Analysis by BitoCross-Repository Impact Analysis
Code Paths AnalyzedImpact: Flow: Direct Changes (Diff Files): Repository Impact: Cross-Repository Dependencies: Database/Caching Impact: API Contract Violations: Infrastructure Dependencies: Additional Insights: Testing RecommendationsFrontend Impact: Service Integration: Data Serialization: Privacy Compliance: Backward Compatibility: OAuth Functionality: Cross-Service Communication: Reliability Testing: Additional Insights: Analysis based on known dependency patterns and edges. Actual impact may vary. |
✅ Review Settings OverriddenStatus: Guidelines:
Note: Extra guidelines beyond 3 general purpose guidelines and 1 language specific guideline per language are not processed. Guidelines are fetched from the source branch. |
The manual sync failed with `Unable to resolve action contentful/vault-github-actions, not found`. The pin was fine; the constraint is that GitHub will not resolve an action from an internal repository for a public one, and this repository is public. All twelve other consumers of that action in the organization are internal or private, so this was never a supported path. Calls `hashicorp/vault-action` directly instead, as publish-npm.yaml already does. The role names, secret path, and bot identity are the preset's, so the trust boundary is unchanged: the same target-owned grant, the same one-hour token scoped to contentful-docs by immutable repository ID. Only the caller differs. Derived and verified against the merged cf-vault constructs: release optimization-github-action-cross-repository-write-contentful-docs-release workflow_dispatch optimization-github-action-cross-repository-write-contentful-docs-workflow-dispatch secret github-cross-repository/token/optimization-cross-repository-write-contentful-docs The role step rejects an ineligible run itself rather than letting Vault refuse the login, because a dispatch from a feature branch is outside the role's bound subject and would otherwise surface as an opaque permission error. The cost, recorded in the ADR, is that the event-to-role mapping now lives here and has to follow contentful/vault-github-actions if that naming changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
e78ac3b
c930f3d to
e78ac3b
Compare
Code Review Agent Run #aacca4Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Summary
The manual sync run failed with:
The pin was fine. The constraint is that GitHub will not resolve an action from an internal repository for a public one, and
contentful/optimizationis public whilecontentful/vault-github-actionsis internal. The error names the repository rather than the ref, and the previously pinned commit is still reachable.Supporting evidence: all twelve other consumers of that action in the organization are INTERNAL or PRIVATE. There is no public consumer, so this was never a supported path.
This calls
hashicorp/vault-actiondirectly instead, exactly aspublish-npm.yamlin this repository already does.The trust boundary does not change
Same target-owned grant, same one-hour
contentful-cross-repositoryApp token scoped tocontentful-docsby immutable repository ID (contents: write,pull_requests: write). Only the caller differs — the role names, secret path, and bot identity are copied from the preset.Derived and verified against the merged
cf-vaultconstructs:release(published, tag)optimization-github-action-cross-repository-write-contentful-docs-releaseworkflow_dispatch(default branch)optimization-github-action-cross-repository-write-contentful-docs-workflow-dispatchSecret:
github-cross-repository/token/optimization-cross-repository-write-contentful-docson mountgithub-actions.The role step rejects an ineligible run itself rather than letting Vault refuse the login, because a dispatch from a feature branch falls outside the role's bound subject and would otherwise surface as an opaque permission error.
Trade-off
The event-to-role mapping now lives in this repository and must follow
contentful/vault-github-actionsif that naming changes. Recorded in ADR 0002, along with the alternative — making that repository public — which is not ours to decide.Validation
Simulated the role-selection step against every event shape:
…-releasemain…-workflow-dispatchcreated, not publishedmainBoth role names and the secret path match the merged Terraform character for character.
# vX.Y.Zcomment Renovate can readbash -n; no${{ }}inside anyrun:pnpm fern:check, Prettier cleanThe Vault login itself is still unrun — it cannot be exercised from a branch, since both triggers read the workflow from the default branch.
🤖 Generated with Claude Code