Skip test_data_found when test-result attestations exist - #1805
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe release test policy accepts verified OCI test-result attestations as test data. Tests cover verification outcomes and combined data sources. Policy collections and documentation include the updated test rules. ChangesRelease test attestation support
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to The change allows verified test-result attestations to satisfy test-data enforcement while preserving denial when attestations or TEST_OUTPUT are absent or unverified; no actionable merge-blocking risk remains after normal checks. Sequence Diagram(s)sequenceDiagram
participant ReleasePolicy
participant TEST_OUTPUT
participant OCIReferrers
participant IntotoVerification
ReleasePolicy->>TEST_OUTPUT: Check pipeline test results
ReleasePolicy->>OCIReferrers: Find test-result attestations
OCIReferrers->>IntotoVerification: Verify matching attestation
IntotoVerification-->>ReleasePolicy: Return verification result
ReleasePolicy-->>ReleasePolicy: Deny when both sources are absent
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🤖 Review · Commit: |
PR Summary by QodoSkip test_data_found when verified test-result attestations are present
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
🤖 Finished Review · ✅ Success · Started 12:52 PM UTC · Completed 1:05 PM UTC Commit: |
Code Review by Qodo
1.
|
ReviewFindingsLow
Previous runReviewFindingsLow
Previous run (2)Looks good to me Labels: PR extends policy enforcement rule with new attestation-based compliance path |
…(EC-1952) When test.test_data_found skips its denial because verified test-result attestations exist, enforcement shifts to the test_attestation package. That compensating coverage was missing from @redhat_security: the rules were only in @redhat. Add redhat_security to no_erred_test_attestations, no_skipped_test_attestations, subject_mismatch, and rule_data_provided so @redhat_security consumers retain enforcement when the skip path is taken. Addresses review feedback from st3penta on PR conforma#1805. Co-Authored-By: Claude <noreply@anthropic.com>
|
🤖 Review · Commit: |
When verified test-result attestations are present via OCI referrers, test_data_found no longer requires TEST_OUTPUT in the build pipeline provenance. This supports the migration of tests to their own pipeline where results are delivered as attestations rather than task results. Resolves: EC-1952 Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…(EC-1952) When test.test_data_found skips its denial because verified test-result attestations exist, enforcement shifts to the test_attestation package. That compensating coverage was missing from @redhat_security: the rules were only in @redhat. Add redhat_security to no_erred_test_attestations, no_skipped_test_attestations, subject_mismatch, and rule_data_provided so @redhat_security consumers retain enforcement when the skip path is taken. Addresses review feedback from st3penta on PR conforma#1805. Co-Authored-By: Claude <noreply@anthropic.com>
EC-2031 removed data.trusted_task_rules in favor of data.rule_data.trusted_task_rules. Two test_data_found skip-path tests still mocked the removed location, so after rebasing onto main the trusted-task lookup found nothing, attestation verification returned no verified statements, and test_data_found denied instead of skipping. Point the mocks at data.rule_data.trusted_task_rules, matching the rename main applied to lib/intoto/trust_test.rego. Co-Authored-By: Claude <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 1:50 PM UTC · Completed 2:04 PM UTC Commit: |
- Wrap _trusted_task_rules in the trusted_task_rules key and dot-index at the use sites, matching the shape in test_attestation_test.rego. - Shorten the four new test_data_found test names to the file's convention while keeping the denies/skips outcome explicit. Cosmetic only; no behavior change. 1070/1070 tests pass. Co-Authored-By: Claude <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 2:24 PM UTC · Completed 2:43 PM UTC Commit: |
|
🤖 Finished Retro · ✅ Success · Started 3:03 PM UTC · Completed 3:15 PM UTC Commit: |
Retro: PR #1805 — Skip test_data_found when test-result attestations existTimeline
Review quality assessmentThe human reviewer caught the only correctness bug — a collection-membership gap that would have silently dropped enforcement for The bug was mechanically detectable: the diff's inline comment Evidence for existing issues
Proposals filed
|
Summary
When verified test-result attestations are present via OCI referrers,
test_data_foundno longer requiresTEST_OUTPUTin the build pipeline provenance. This supports the migration of tests to their own pipeline where results are delivered as attestations rather than task results.Modified
test_data_founddeny rule — added condition:count(intoto.verified_statements_by_predicate(intoto.predicate_test_result)) == 0. When verified test-result attestations exist, enforcement is delegated to thetest_attestationpackage (same collections).Updated METADATA — title, description, and solution now mention test-result attestations as an alternative to
TEST_OUTPUT.Added 4 test cases:
Test plan
make test— 1056/1056 pass, 100% coveragemake lint— 0 violationsmake fmt— cleanmake generate-docs— Antora docs regeneratedResolves: EC-1952
🤖 Generated with Claude Code