fix(#910): use repository_owner in WIF attribute conditions - #920
Conversation
The WIF attribute condition used assertion.repository scoped to the .fullsend repo, which rejected OIDC tokens from cross-repo dispatched workflows. When a shim workflow in another repo (e.g. org/my-app) calls .fullsend via workflow_call, GitHub sets the repository claim to the caller repo, causing GCP STS to return HTTP 400. Changed buildAttributeCondition to use assertion.repository_owner instead of assertion.repository, scoping to the org level. Also updated the per-repo path in ProvisionWIF to use repository_owner with just the owner portion. This is safe because the mint's prevalidateOIDCToken already validates org membership, allowed workflow files, and workflow ref prefixes. parseConditionOrgs retains backward compatibility with old assertion.repository conditions via the fullsendRepoSuffix check. Added TestBuildAttributeCondition unit test covering single-org and multi-org cases. Note: pre-commit could not run due to Go toolchain permission error in sandbox. All Go tests pass. Closes #910
|
fullsend review is working on this — view logs |
Site previewPreview: https://306b443d-site.fullsend-ai.workers.dev Commit: |
Review: #920Head SHA: 8325945 SummaryThis is a clean, well-scoped fix that correctly addresses the WIF attribute condition rejecting cross-repo OIDC tokens. The change widens the WIF CEL condition from FindingsLow
Info
FooterOutcome: approve Previous runReview: #920Head SHA: 6bd13fc SummaryThe org-level FindingsHigh
Medium
FooterOutcome: request-changes |
|
fullsend fix is working on this — view logs |
- Revert per-repo ProvisionWIF path to use assertion.repository == '<repo>' instead of assertion.repository_owner. Per-repo installs don't use cross-repo dispatch, and widening to org-level would be inconsistent with the repo-scoped IAM principal binding. - Update parseConditionOrgs doc comment to label repository_owner as the current format and assertion.repository as legacy, matching the new org-level default from this PR. Addresses review feedback on #920 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: fullsend-fix <fullsend-code@users.noreply.github.com>
🔧 Fix agent — iteration 1 (bot-triggered)Addressed both review findings: (1) reverted per-repo WIF condition to repo-scoped assertion.repository to match the IAM binding, (2) fixed parseConditionOrgs comment terminology to reflect repository_owner as current format. Fixed (2):
Tests: passed Decision points
Updated by fullsend fix agent |
|
fullsend review is working on this — view logs |
- ADR 0033: document FULLSEND_PER_REPO_INSTALL guard variable in coexistence section, update migration steps, fix stale CLI flags (--gcp-auth-mode removed in PR #905), update repo variables list - Installation guide: fix WIF attribute condition from assertion.repository == 'org/.fullsend' to assertion.repository_owner == 'org' (PR #920 fix), fix WIF principal from attribute.repository/org/.fullsend to attribute.repository_owner/org Signed-off-by: Wayne Sun <gsun@redhat.com>
The WIF attribute condition used assertion.repository scoped to the .fullsend repo, which rejected OIDC tokens from cross-repo dispatched workflows. When a shim workflow in another repo (e.g. org/my-app) calls .fullsend via workflow_call, GitHub sets the repository claim to the caller repo, causing GCP STS to return HTTP 400.
Changed buildAttributeCondition to use assertion.repository_owner instead of assertion.repository, scoping to the org level. Also updated the per-repo path in ProvisionWIF to use repository_owner with just the owner portion. This is safe because the mint's prevalidateOIDCToken already validates org membership, allowed workflow files, and workflow ref prefixes.
parseConditionOrgs retains backward compatibility with old assertion.repository conditions via the fullsendRepoSuffix check.
Added TestBuildAttributeCondition unit test covering single-org and multi-org cases.
Note: pre-commit could not run due to Go toolchain permission error in sandbox. All Go tests pass.
Closes #910
Post-script verification
agent/910-wif-repository-owner)d0b625254fe4044c99ae9f3b6e9ec5f5b0084e98..HEAD)