Skip to content

Test PrivateCIWorkflows role assumption from public repo#3

Open
ngallen wants to merge 2 commits intomainfrom
ngallen/test-private-ci-role
Open

Test PrivateCIWorkflows role assumption from public repo#3
ngallen wants to merge 2 commits intomainfrom
ngallen/test-private-ci-role

Conversation

@ngallen
Copy link
Copy Markdown

@ngallen ngallen commented Mar 9, 2026

Summary

Expected Results

Scenario Expected Output
Role doesn't exist yet 📋 "Role does not exist yet"
Role exists, public repo blocked 🔒 "Access denied (EXPECTED for public repos)"
Role exists, public repo allowed ✅ WARNING - this would be a security issue

Test Plan

  1. Open this PR to trigger the workflow
  2. Verify it shows "Role does not exist yet" (infra PR not merged)
  3. After infra PR is merged, re-run the workflow
  4. Verify it shows "Access denied" confirming the repository_visibility=private constraint works

🤖 Generated with Claude Code

ngallen and others added 2 commits March 9, 2026 11:10
Tests whether a public repo can assume the PrivateCIWorkflows IAM role.
This role should only be assumable by private repos due to the
repository_visibility=private constraint.

Expected results:
- Before infra PR merged: "Role does not exist yet"
- After infra PR merged: "Access denied" (expected for public repos)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Print raw error message from AWS for debugging
- Detect "Conditions were not met" for trust policy rejections
- Distinguish between role not existing vs OIDC issues

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant