test(hack): add mint-access-patterns harness for workflow-host policy - #6918
test(hack): add mint-access-patterns harness for workflow-host policy#6918ifireball wants to merge 10 commits into
Conversation
Exercise mint repos-field and workflow-host access patterns via GHA OIDC (ADR 0082): per-repo, per-org, and both modes with optional enrollment, role filter, and foreign e2e cases. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
PR Summary by QodoAdd mint access-pattern workflow-host policy harness
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
🤖 Finished Review · ✅ Success · Started 2:45 PM UTC · Completed 3:05 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.66 |
Code Review by Qodo
1.
|
|
Risk Assessment: moderate (2/5) DetailsTier 1 signals unchanged from prior assessment — single newly added 992-line bash test harness in hack/ with no protected paths, no security-sensitive files, and no dependency or CI changes; blast_radius=large and zero test-file ratio push change-size composite to 5 but the eight-dimension Tier 1 average is ~2.1 and the all-new-file Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, confirming the prior moderate score. Previous runRisk Assessment: moderate (2/5) DetailsTier 1 signals unchanged from prior assessment — single newly added 990-line bash test harness in hack/ with no protected paths, no security-sensitive files, and no dependency or CI changes; blast_radius=large and zero test-file ratio push change-size composite to 5 but the eight-dimension Tier 1 average is ~2.1 and the all-new-file Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, confirming the prior moderate score. Previous run (2)Risk Assessment: moderate (2/5) DetailsTier 1 signals unchanged from prior assessment — single newly added 990-line bash test harness in hack/ with no protected paths, no security-sensitive files, and no dependency or CI changes; blast_radius=large and zero test-file ratio push change-size composite to 5 but the eight-dimension Tier 1 average is ~2.1 and the all-new-file Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, confirming the prior moderate score. Previous run (3)Risk Assessment: moderate (2/5) DetailsTier 1 signals are unchanged from the prior assessment -- single newly added 990-line bash test harness in hack/ with no protected paths, no security-sensitive files, and no dependency or CI changes; blast_radius=large and zero test-file ratio push the change-size composite to 5 but the eight-dimension Tier 1 average is ~2.1 and the all-new-file Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, confirming the prior moderate score. Previous run (4)Risk Assessment: moderate (2/5) DetailsTier 1 signals are unchanged from the prior assessment -- single newly added 977-line bash test harness in hack/ with no protected paths, no security-sensitive files, and no dependency or CI changes; blast_radius=large and zero test-file ratio push the change-size composite to 5 but the eight-dimension Tier 1 average is ~2.1 and the all-new-file Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, confirming the prior moderate score. Previous run (5)Risk Assessment: moderate (2/5) DetailsTier 1 signals are unchanged from the prior assessment — single newly added 972-line bash test harness in hack/ with no protected paths, no security-sensitive files, and no dependency or CI changes; blast_radius=large and zero test-file ratio push the change-size composite to 5 but the eight-dimension Tier 1 average is ~2.1 and the all-new-file Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, confirming the prior moderate score. Previous run (6)Risk Assessment: moderate (2/5) DetailsTier 1 signals are unchanged from the prior assessment -- single newly added 971-line test harness in hack/ with no production code, no protected paths, no security-sensitive files, and no dependency changes; blast_radius=large and zero test-file ratio push the change-size composite to 5 but the eight-dimension Tier 1 average is ~2.1 and the all-new-file Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, confirming the prior moderate score. Previous run (7)Risk Assessment: moderate (2/5) DetailsTier 1 and Tier 2 signals are identical to the prior assessment -- single newly added 962-line test harness in hack/ with no production code, no protected paths, no security-sensitive files, and no dependency changes; blast_radius=large and zero test-file ratio push the change-size composite to 5 but the eight-dimension Tier 1 average is ~2.1 and the all-new-file Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, confirming the prior moderate score. Previous run (8)Risk Assessment: moderate (2/5) DetailsSingle newly added 960-line test harness in hack/ with no production code changes, no protected paths, no security-sensitive files, and no dependency changes; blast radius=large and zero test-file ratio push Tier 1 change-size signals up but the average Tier 1 sub-score remains ~2.1 and the all-new-files Tier 2 baseline is 2, yielding a weighted composite (62/38 split) of ~2.1 rounded to 2, consistent with the prior moderate assessment. Previous run (9)Risk Assessment: moderate (2/5) DetailsSingle new 943-line test harness script in hack/ with no production code changes, no protected paths, no security-sensitive files, and no dependency changes; blast radius and zero test-file ratio push change-size signals up but the test-only nature and experienced non-bot author hold the composite at moderate, consistent with the prior assessment. Previous run (10)Risk Assessment: moderate (2/5) DetailsSingle new 846-line test harness script in hack/ with no production code changes, no protected paths, no security-sensitive files, and no dependency changes; the large line count elevates change-size but the test-only nature and experienced non-bot author keep overall risk moderate. |
ReviewFindingsMedium
Low
Next steps:
Previous runReviewFindingsMedium
Low
Next steps:
Previous run (2)ReviewFindingsMedium
Low
Next steps:
Previous run (3)ReviewFindingsMedium
Low
Next steps:
Previous run (4)ReviewFindingsHigh
Medium
Low
Next steps:
Previous run (5)ReviewFindingsHigh
Medium
Low
Next steps:
Previous run (6)ReviewFindingsLow
Next steps:
Previous run (7)ReviewFindingsLow
Next steps:
Previous run (8)ReviewFindingsMedium
Low
Next steps:
Previous run (9)ReviewFindingsMedium
Low
Next steps:
Previous run (10)ReviewFindingsMedium
Low
Next steps:
|
waynesun09
left a comment
There was a problem hiding this comment.
Review sweep: 4 additional findings not covered by the existing bot reviews (checked against qodo-code-review and fullsend-ai-review comments on this PR for overlap).
Distinguish policy denials from infrastructure errors, validate exact minted scope, and make generated workflow resources disposable. Fail closed during enrollment and harden argument, polling, artifact, and cleanup behavior. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
|
🤖 Review · ❌ Terminated · Started 7:18 AM UTC · Ended 7:37 AM UTC Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🤖 Finished Review · ✅ Success · Started 7:18 AM UTC · Completed 7:37 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.51 |
Document removal of temporary per-org compatibility coverage, make usage output structurally stable, standardize validation failures, and clarify workflow writer parameters. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
|
🤖 Finished Review · ✅ Success · Started 11:38 AM UTC · Completed 12:00 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.59 |
Resolve Git credentials from an exported token only inside the helper process, keeping the token out of command arguments and repository configuration. Hoist the remaining local declaration for consistency. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
|
🤖 Finished Review · ✅ Success · Started 12:22 PM UTC · Completed 12:40 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.85 |
Clarify temporary ADR 0044 migration coverage and optional coder permissions, handle unexpected generated-workflow roles explicitly, and align local declaration style. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
|
🤖 Finished Review · ✅ Success · Started 5:58 AM UTC · Completed 6:14 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.58 |
Describe the workflow run polling contract so the larger shell helper remains consistent with the surrounding documented functions. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
|
🤖 Finished Review · ✅ Success · Started 6:17 AM UTC · Completed 6:37 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.38 |
Allow the mint harness to accept either canonical coder permissions shape while retaining exact scope validation for unexpected additions or omissions. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
|
🤖 Finished Review · ✅ Success · Started 6:40 AM UTC · Completed 7:00 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.32 |
Emit compact result markers for log fallback parsing, reject workflow-command delimiters in token values, and reuse the branch suffix helper. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
|
🤖 Finished Review · ✅ Success · Started 7:06 AM UTC · Completed 7:22 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.84 |
|
🤖 Finished Review · ✅ Success · Started 7:27 AM UTC · Completed 7:43 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.05 |
Use the script-wide silent redirection form in branch cleanup. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
8e7c5b6 to
828a1e0
Compare
|
🤖 Finished Review · ✅ Success · Started 7:55 AM UTC · Completed 8:12 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.58 |
Document the distinct primary test, foreign test, and upstream workflow-host organizations used by the harness. Signed-off-by: Barak Korren <bkorren@redhat.com> Assisted-by: Codex (gpt-5.6-sol)
|
🤖 Finished Review · ✅ Success · Started 8:16 AM UTC · Completed 8:32 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $3.87 |
Summary
hack/mint-access-patterns.sh, a bash harness that exercises mintrepos-field and workflow-host access patterns via GHA OIDC (ADR 0082).--mode per-repo|per-org|both, optional--projectenrollment,--rolefilter, and foreign e2e cases against staging/dev/public/Cloudflare mints.mint-ap-resultartifacts; workflows always exit green so failures surface only in harness output.Test plan
mint-test.korren.org,mint.fullsend.sh,mint-status-auth-test.barak-korren.workers.dev) — per-repo without enrollmentMade with Cursor