Skip to content

feat(EC-1775): verify test attestation content#1728

Open
robnester-rh wants to merge 12 commits into
conforma:mainfrom
robnester-rh:worktree-EC-1775
Open

feat(EC-1775): verify test attestation content#1728
robnester-rh wants to merge 12 commits into
conforma:mainfrom
robnester-rh:worktree-EC-1775

Conversation

@robnester-rh
Copy link
Copy Markdown
Contributor

Summary

  • Add new policy package policy.release.test_attestation that verifies in-toto test-result attestation content
  • 4 rules: no_failed_tests (deny), no_test_warnings (warn), test_result_known (deny), test_data_found (deny)
  • 2 helpers: _test_name (extracts configuration name), _test_list (safely formats test name arrays)
  • Consumes intoto.verified_statements_by_predicate from EC-1774's trust layer — only chain-of-trust-verified attestations are evaluated
  • Complete no-op when no test-result attestations are present
  • 13 test cases covering happy path, failure modes, edge cases (WARNED+FAILED coexistence, multiple failures, non-string result type safety)

Design Decisions

  • Verify what exists — checks attestations present, does not enforce a required tests list (deferred per Joe Stuart)
  • Decision on overall result, detail from arrays — deny/warn driven by top-level result enum; optional failedTests/warnedTests arrays enrich error messages
  • Rule 3/4 mutual exclusiontest_result_known guards with statement.predicate.result before checking set membership, preventing overlap with test_data_found
  • Test identity from predicate — uses configuration[0].name rather than OCI annotations

Test plan

  • 13 test cases all passing with msg content assertions
  • 913/913 total tests passing (baseline was 900)
  • OPA format clean
  • 100% coverage on new files
  • Committee-reviewed design spec and testing strategy
  • Two rounds of local code review with all findings addressed

Jira: EC-1775

🤖 Generated with Claude Code

robnester-rh and others added 5 commits May 15, 2026 11:49
Add new policy package test_attestation that verifies the content of
in-toto test-result attestations. Includes 4 rules (no_failed_tests,
no_test_warnings, test_result_known, test_data_found) and 2 helpers
(_test_name, _test_list) with 6 test cases.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d type safety

Add test cases for mixed PASSED/FAILED, no-op behavior, test name
extraction, WARNED+FAILED coexistence, multiple failures, and
non-string result type safety.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove multi-line >- syntax from failure_msg fields to avoid YAML
parsing issues. Use single-line format consistent with existing
policy rules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify test_result_known rule fires specifically and message contains
"unsupported result value" instead of just checking count > 0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Verify each deny result message contains "has a failed result" to
ensure the message template renders correctly for both attestations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds a Rego package test_attestation that inspects in-toto test-result attestations: it enforces a required result field, validates allowed values (PASSED/WARNED/FAILED), emits denials for failed results, emits warnings for warned results, and includes tests and Antora docs covering single/multi-attestation and edge cases.

Changes

Test Attestation Policy Module

Layer / File(s) Summary
Policy contract & helpers
policy/release/test_attestation/test_attestation.rego
Package declaration, verified-statement extraction, and helper functions to extract test name and format optional list fields.
Deny on FAILED result
policy/release/test_attestation/test_attestation.rego
Rule emitting denials for attestations with result == "FAILED", including test name and failedTests.
Warn on WARNED result
policy/release/test_attestation/test_attestation.rego
Rule emitting warnings for attestations with result == "WARNED", including test name and warnedTests.
Enforce allowed result values
policy/release/test_attestation/test_attestation.rego
Rule denying attestations whose result is not one of PASSED, FAILED, or WARNED.
Require result field
policy/release/test_attestation/test_attestation.rego
Rule denying attestations missing the result field.
Test infrastructure & mock data
policy/release/test_attestation/test_attestation_test.rego
Test package setup, mock referrers, provenance/stub statements, and blob builders for PASSED/FAILED/WARNED/unknown/missing-result variants (single and multi-attestation).
Core & edge case tests
policy/release/test_attestation/test_attestation_test.rego
Tests asserting expected deny/warn outputs for basic outcomes, invalid/missing results, mixed attestations, and no-attestation no-op.
Advanced test scenarios
policy/release/test_attestation/test_attestation_test.rego
Tests for configured test-name extraction and fallback, WARNED+FAILED coexistence, multiple failures, and non-string result handling.
Docs: package page
antora/docs/modules/ROOT/pages/packages/release_test_attestation.adoc
New documentation page describing the test_attestation package, its rules, messages, and source links.
Docs: release policy references
antora/docs/modules/ROOT/pages/release_policy.adoc
Added cross-references in the redhat ruleset and an Available Packages entry for release_test_attestation.
Docs: navigation
antora/docs/modules/ROOT/partials/release_policy_nav.adoc
Added “Test attestation” navigation subtree with xrefs to the four sub-rules.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding verification for test attestation content, with the feature scope identifier EC-1775.
Description check ✅ Passed The description comprehensively explains the new policy package, its four rules, helpers, design decisions, and test plan with all test cases passing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-for-conforma
Copy link
Copy Markdown

Review Summary by Qodo

Add test attestation content verification policy package

✨ Enhancement 🧪 Tests

Grey Divider

Walkthroughs

Description
• Add new test_attestation policy package verifying in-toto test-result attestation content
• Implement 4 deny/warn rules: no_failed_tests, no_test_warnings, test_result_known,
  test_data_found
• Include 2 helper functions for test name extraction and safe array formatting
• Provide 13 comprehensive test cases covering happy path, edge cases, and type safety
Diagram
flowchart LR
  A["Verified Test Attestations"] -->|"_test_attestations"| B["Policy Rules"]
  B -->|"no_failed_tests"| C["Deny on FAILED"]
  B -->|"no_test_warnings"| D["Warn on WARNED"]
  B -->|"test_result_known"| E["Deny on Invalid Result"]
  B -->|"test_data_found"| F["Deny on Missing Result"]
  C --> G["Result with Message"]
  D --> G
  E --> G
  F --> G
Loading

Grey Divider

File Changes

1. policy/release/test_attestation/test_attestation.rego ✨ Enhancement +156/-0

Test attestation content verification policy rules

• New policy package with 4 rules verifying test-result attestation predicates
• no_failed_tests rule denies attestations with FAILED result, includes failed test names
• no_test_warnings rule warns on WARNED result, includes warned test names
• test_result_known rule denies unsupported result values (only PASSED/WARNED/FAILED valid)
• test_data_found rule denies missing result field in predicate
• Two helper functions: _test_name extracts configuration name with fallback, _test_list safely
 formats test arrays

policy/release/test_attestation/test_attestation.rego


2. policy/release/test_attestation/test_attestation_test.rego 🧪 Tests +496/-0

Comprehensive test suite for test attestation policy

• 13 comprehensive test cases covering all rule scenarios and edge cases
• Test cases include: all passed, failed with/without details, warned, unknown result, missing
 result
• Multi-attestation scenarios: mixed PASSED/FAILED, WARNED+FAILED coexistence, multiple failures
• Edge cases: custom configuration names, empty configuration fallback, non-string result values
• No-op behavior when no test attestations present
• Mock infrastructure for referrers, verification, and blob retrieval

policy/release/test_attestation/test_attestation_test.rego


Grey Divider

Qodo Logo

@qodo-for-conforma
Copy link
Copy Markdown

qodo-for-conforma Bot commented May 15, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Unsafe predicate object.get ✓ Resolved 🐞 Bug ☼ Reliability
Description
_test_name(statement) calls object.get(statement.predicate, ...) without verifying
statement.predicate is an object, so a verified statement with a missing/non-object predicate can
raise a type error and break evaluation (notably in test_data_found, which targets missing result
fields). Because the trust layer json.unmarshal’s arbitrary blobs and only checks
_type/predicateType, malformed predicates can still reach this package.
Code

policy/release/test_attestation/test_attestation.rego[R36-40]

+_test_name(statement) := name if {
+	config := object.get(statement.predicate, "configuration", [])
+	count(config) > 0
+	name := config[0].name
+} else := "unknown test"
Relevance

⭐⭐⭐ High

Team accepted defensive type-checking to prevent eval failures; safe extraction patterns common in
PR #1715/#1468.

PR-#1715
PR-#1468

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The policy reads nested fields via object.get(statement.predicate, ...) and
_test_name(statement) is invoked when the policy detects missing predicate.result; meanwhile the
trust layer admits any JSON statement content after unmarshal as long as _type matches and
predicateType matches, so malformed/missing predicate is possible and will trigger the type
error path.

policy/release/test_attestation/test_attestation.rego[36-40]
policy/release/test_attestation/test_attestation.rego[148-155]
policy/lib/intoto/trust.rego[50-58]
policy/lib/intoto/trust.rego[60-63]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`_test_name(statement)` assumes `statement.predicate` is an object and calls `object.get(statement.predicate, ...)`. If `statement.predicate` is missing or not an object, OPA will raise a type error and the policy query can fail, preventing `test_data_found` (and any rule using `_test_name`) from returning a normal deny/warn result.

### Issue Context
Verified statements come from `json.unmarshal(blob)` and are only filtered by `_type` and `predicateType`, so predicate structure is not validated upstream.

### Fix Focus Areas
- policy/release/test_attestation/test_attestation.rego[36-40]
- policy/release/test_attestation/test_attestation.rego[148-155]

### Suggested fix
1. Make `_test_name` defensive:
  - `predicate := object.get(statement, "predicate", {})`
  - require `is_object(predicate)` before further reads
  - `config := object.get(predicate, "configuration", [])`
  - require `is_array(config)` and `count(config) > 0`
  - require `is_object(config[0])` and `is_string(config[0].name)` (or fall back)
  - otherwise fall back to `"unknown test"`
2. Make `test_data_found` defensive as well, avoiding `statement.predicate.result` access when `predicate` is missing/non-object:
  - e.g., `predicate := object.get(statement, "predicate", {})` and then check `object.get(predicate, "result", null) == null` (or explicitly deny when `not is_object(predicate)`).
3. Add a unit test for a test-result statement with `predicateType` set but missing/invalid `predicate`, asserting you get a clean `test_data_found` denial (not an evaluation error).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Unsafe concat on test lists ✓ Resolved 🐞 Bug ☼ Reliability
Description
_test_list concatenates attestation-provided arrays via concat(", ", value) without ensuring
elements are strings, so a producer emitting non-string items in failedTests/warnedTests can raise a
type error and fail evaluation instead of returning a result. The trust layer passes through
json.unmarshal’d statement content without schema validation, and the tests already demonstrate
unexpected (non-string) predicate field types can occur.
Code

policy/release/test_attestation/test_attestation.rego[R42-47]

+_test_list(predicate, key) := result if {
+	value := object.get(predicate, key, [])
+	is_array(value)
+	count(value) > 0
+	result := concat(", ", value)
+} else := "(none listed)"
Relevance

⭐⭐ Medium

They value avoiding eval crashes (e.g., PR #1468/#1446), but no direct history about concat element
type-guards.

PR-#1468
PR-#1446

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The implementation directly concatenates array values from the predicate without element type
checks; because verified statements are produced by unmarshalling arbitrary JSON blobs, unexpected
element types are possible (and the test suite already models non-string predicate values).

policy/release/test_attestation/test_attestation.rego[42-47]
policy/lib/intoto/trust.rego[50-55]
policy/release/test_attestation/test_attestation_test.rego[264-273]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`_test_list(predicate, key)` calls `concat(", ", value)` on an attestation-provided array. If any element is not a string, OPA can raise a type error and the policy query can fail.

### Issue Context
Statement content is sourced from `json.unmarshal(blob)` and not schema-validated in the trust layer; the test suite already includes a case with a non-string `predicate.result`, demonstrating producers can emit unexpected types.

### Fix Focus Areas
- policy/release/test_attestation/test_attestation.rego[42-47]

### Suggested fix
Harden `_test_list` by either:
- Filtering to strings only:
 - `items := [x | x := value[_]; is_string(x)]`
 - if `count(items) > 0` then `concat(", ", items)` else `"(none listed)"`

OR
- Stringifying all elements safely before concatenation:
 - `items := [sprintf("%v", [x]) | x := value[_]]`
 - then `concat(", ", items)`

Add a unit test where `failedTests` (or `warnedTests`) contains a non-string element and assert the policy returns a stable message instead of erroring.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@robnester-rh
Copy link
Copy Markdown
Contributor Author

As a note, we should probably ensure that conforma/cli#3311 is merged before we merge this as it's predicated on some of the changes introduced in the CLI there.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
policy/release/test_attestation/test_attestation_test.rego (1)

463-480: ⚡ Quick win

Strengthen test_multiple_failures to detect extra deny rows and unexpected warnings.

Using set equality alone can still pass when duplicate/extra deny objects are emitted. Add explicit cardinality and warn-empty checks.

Proposed patch
 test_multiple_failures if {
 	results := test_attestation.deny with input.image.ref as _image_ref
 		with ec.oci.image_referrers as _mock_referrers_two
 		with ec.sigstore.verify_attestation as _mock_verify_two
 		with ec.oci.blob as _mock_blob_multi_failed
 		with ec.oci.image_manifests as _mock_manifests
 		with data.trusted_task_rules as _trusted_task_rules.trusted_task_rules
 
+	count(results) == 2
+
 	deny_codes := {r.code | some r in results}
 	assertions.assert_equal(deny_codes, {"test_attestation.no_failed_tests"})
 
 	deny_terms := {r.term | some r in results}
 	assertions.assert_equal(deny_terms, {"clair-scan", "sanity-check"})
 
 	every r in results {
 		contains(r.msg, "has a failed result")
 	}
+
+	assertions.assert_empty(test_attestation.warn) with input.image.ref as _image_ref
+		with ec.oci.image_referrers as _mock_referrers_two
+		with ec.sigstore.verify_attestation as _mock_verify_two
+		with ec.oci.blob as _mock_blob_multi_failed
+		with ec.oci.image_manifests as _mock_manifests
+		with data.trusted_task_rules as _trusted_task_rules.trusted_task_rules
 }

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@policy/release/test_attestation/test_attestation_test.rego` around lines 463
- 480, The test_multiple_failures should also assert there are exactly the
expected number of deny rows and that no warnings are emitted: after computing
results, add an assertion for the cardinality (e.g.,
assertions.assert_equal(count(results), 2) or the exact expected count) and
assert that no result contains a warn/warning field (e.g.,
assertions.assert_equal({w | some r in results; w := r.warn}, {}) or add every r
in results { not r.warn }) so duplicate/extra deny objects or unexpected
warnings will fail the test; update the test_multiple_failures block with these
checks alongside deny_codes and deny_terms.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@policy/release/test_attestation/test_attestation_test.rego`:
- Around line 463-480: The test_multiple_failures should also assert there are
exactly the expected number of deny rows and that no warnings are emitted: after
computing results, add an assertion for the cardinality (e.g.,
assertions.assert_equal(count(results), 2) or the exact expected count) and
assert that no result contains a warn/warning field (e.g.,
assertions.assert_equal({w | some r in results; w := r.warn}, {}) or add every r
in results { not r.warn }) so duplicate/extra deny objects or unexpected
warnings will fail the test; update the test_multiple_failures block with these
checks alongside deny_codes and deny_terms.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: fba5387c-023f-4737-85e6-9d93d4b8f1e6

📥 Commits

Reviewing files that changed from the base of the PR and between 47e34b6 and 8d05b39.

📒 Files selected for processing (2)
  • policy/release/test_attestation/test_attestation.rego
  • policy/release/test_attestation/test_attestation_test.rego

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
...icy/release/test_attestation/test_attestation.rego 100.00% <100.00%> (ø)
...elease/test_attestation/test_attestation_test.rego 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Reorder rules so all deny rules are adjacent, followed by the warn
rule. Fixes Regal messy-rule violation where the warn rule broke the
deny rule grouping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread policy/release/test_attestation/test_attestation.rego
robnester-rh and others added 6 commits May 15, 2026 13:46
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add count(results) == 2 cardinality check and assert warn set is empty
to catch duplicate/extra deny objects and unexpected warnings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use object.get(statement, "predicate", {}) before accessing
configuration field to prevent type errors when a verified statement
has predicateType set but no predicate object. Adds test case 14 for
this edge case per Qodo review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add is_string guard in _test_list to prevent type errors when
failedTests/warnedTests arrays contain non-string elements. Adds
test case 15 per Qodo review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split test_multiple_failures into two tests to avoid Regal
non-loop-expression violation from standalone with-clause expression.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robnester-rh robnester-rh requested a review from joejstuart May 15, 2026 18:17
Copy link
Copy Markdown
Contributor

@st3penta st3penta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good overall, but i have a few questions and test gaps

import data.lib.intoto
import data.lib.metadata

_test_attestations := intoto.verified_statements_by_predicate(intoto.predicate_test_result)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package is a deliberate no-op when no test-result attestations are attached, but Jira AC-1 says "Policy denies if no test-result attestations are attached to the image." PR description says this was deferred per Joe -- is that recorded anywhere besides this PR? The ticket still lists it as an acceptance criterion. Worth updating EC-1775 to reflect the scope reduction so the decision is traceable.


_test_list(predicate, key) := result if {
value := object.get(predicate, key, [])
is_array(value)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The is_array guard is untested. No test case provides a non-array value (string, object, number) for failedTests/warnedTests. That's a distinct equivalence class from "key missing" and "key present with valid array."

value := object.get(predicate, key, [])
is_array(value)
items := [x | some x in value; is_string(x)]
count(items) > 0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This boundary is also untested. An empty failedTests: [] takes a different path than a missing key, but both should produce "(none listed)."

# collections:
# - redhat
# depends_on:
# - attestation_type.known_attestation_type
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting a latent coupling here. attestation_type.known_attestation_type checks lib.pipelinerun_attestations -- attestations embedded in SLSA provenance via input.attestations. This package consumes a completely different trust chain: OCI referrer attestations verified independently through intoto.verified_statements_by_predicate.

Today both attestation pipelines are always present together, so depends_on works fine. But the semantic mismatch means if the project ever moves toward OCI referrer-only attestations (no pipelinerun attestation), known_attestation_type would deny and depends_on would suppress this package's findings -- even though they're independently valid from a separate trust chain.

This is the first consumer of verified_statements_by_predicate outside the intoto library, so there's no established depends_on pattern for referrer-based policies yet. Not actionable for this PR, but worth keeping in mind when a second referrer-based package appears -- that's when you'd want a new base rule analogous to known_attestation_type for the referrer trust chain.

result := metadata.result_helper_with_term(
rego.metadata.chain(),
[_test_name(statement), failed],
_test_name(statement),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The term resolves to configuration[0].name. If two attestations share the same config name (e.g. two "clair-scan" runs at different pipeline stages), their violations get identical terms. A policy exclusion targeting one silently suppresses the other.

The existing test package doesn't have this problem because its term comes from pipeline task names, which are unique within a pipeline. Test attestation config names have no such guarantee.

Is configuration[0].name expected to be unique across test-result attestations for a given image? If not, would incorporating additional identity (e.g. the statement subject digest) into the term produce more precise exclusion targeting?

#
deny contains result if {
some statement in _test_attestations
not statement.predicate.result
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not statement.predicate.result in Rego is true for both absent fields and falsy values (false, null, 0, ""). The failure message says "missing the required result field" but result: false would trigger this too. Intentional, or should this check for key absence specifically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants