NO-JIRA: fix(ci): harden Claude WIF test workflow - #8606
Conversation
Fix operator precedence bug in the job's `if` condition where `&&` binding tighter than `||` caused any OWNER comment on any issue to trigger the workflow with GCP credentials. Add parentheses to properly scope the author association check. Replace curl-pipe-to-bash Claude Code installation with the official claude-code-action GitHub Action, which handles installation internally and is tracked by dependabot via the github-actions ecosystem. This eliminates unverified code execution on a runner holding a GCP WIF token. Also add COLLABORATOR to allowed author associations. Assisted-by: Claude:claude-opus-4-6
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@cblecker: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates the GitHub Actions workflow Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Skipping CI for Draft Pull Request. |
|
Please specify an area label DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cblecker The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test-wif |
1 similar comment
|
/test-wif |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
I now have the complete root cause. Here is the analysis: Test Failure Analysis CompleteJob Information
Test Failure AnalysisErrorSummaryThis is not a test failure — it is a merge conflict preventing tide (the Prow merge controller) from merging the PR. PR #8606 modifies Root CauseThe tide Timeline of events:
After #8609 and #8611 merged,
The PR is 4 commits behind Notably, the operator precedence fix and Recommendations
Evidence
|
|
/close This job is getting removed |
|
@bryan-cox: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Summary
ifcondition —&&binds tighter than||in GitHub Actions expressions, so the original condition allowed any OWNER comment on any issue (not just PRs with/test-wif) to trigger the workflow with GCP credentials. Added parentheses to properly scope the author association check.curl | bashinstallation with the officialanthropics/claude-code-actionGitHub Action (pinned by SHA), which handles Claude Code installation internally and is tracked by dependabot via the existinggithub-actionsecosystem config. This eliminates unverified code execution on a runner holding a GCP WIF token.COLLABORATORto the allowed author associations for the/test-wiftrigger.Test plan
workflow_dispatchto verify the basic auth flow works/test-wifon a PR comment to verifyissue_commenthandling withclaude-code-actionifcondition correctly rejects: non-PR issue comments, comments without/test-wif, and comments from external contributorsSummary by CodeRabbit