Skip to content

fix: add missing param to four eyes schema#917

Open
mbevc1 wants to merge 1 commit into
mainfrom
20260529_fix_four-eyes_schema
Open

fix: add missing param to four eyes schema#917
mbevc1 wants to merge 1 commit into
mainfrom
20260529_fix_four-eyes_schema

Conversation

@mbevc1
Copy link
Copy Markdown
Contributor

@mbevc1 mbevc1 commented May 29, 2026

Extend the schema and allow passing params to rego policy

@mbevc1 mbevc1 added bug Something isn't working attestations labels May 29, 2026
@mbevc1 mbevc1 enabled auto-merge (squash) May 29, 2026 15:40
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 29, 2026

Claude finished @mbevc1's task in 1m 46s —— View job


PR Review: fix: add missing param to four eyes schema

  • Gather context and read changed files
  • Run static analysis checks
  • Review code quality and correctness
  • Post review feedback

Static Analysis

All checks pass:

  • go build ./... — clean
  • go vet ./... — clean
  • go mod tidy — no drift

Review

The change is correct and necessary. The rego policy already references data.params.attestation_name (line 25 of four-eyes-policy.rego), and the Go code in evaluateHelpers.go:232-234 conditionally includes "params" in the output map. Without this schema entry, any output containing params would fail validation against additionalProperties: false on the schema's root object.

One minor observation: the Go code gates params behind showInput && params != nil (line 232), meaning params only appears in the output when --show-input is also passed. The schema description says "surfaced in the output" without mentioning this prerequisite — that's fine for a schema (it just declares what's allowed), but worth knowing.

Placement is goodparams is inserted between current_commit and input, which is a logical grouping since both params and input are optional diagnostic fields.

No tests needed — this is a standalone JSON schema file; correctness is enforced by the schema structure itself and there are no existing schema-validation tests to update.

Summary

Clean, minimal fix. LGTM — the schema was missing a property that the code already emits, and additionalProperties: false would reject any output containing it. Good catch.

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

Labels

attestations bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant