Version of Gemara
main at 24e52e9
Describe the bug
AssessmentFinding.log is documented as mapping to the EvaluationLog entry containing the finding, but it is an EntryMapping and therefore requires entry-id. #ControlEvaluation, the entry type in #EvaluationLog.evaluations, has no id; it only has name, which is neither constrained as unique nor required to be non-empty.
The enforcement fixture uses control identifiers such as OSPS-DO-01 as log.entry-id, but the corresponding evaluation has no such entry identifier. The reference therefore hangs: consumers cannot determine which ControlEvaluation it denotes.
To Reproduce
- Inspect
#AssessmentFinding.log in enforcementlog.cue:61-74.
- Inspect
#ControlEvaluation in evaluationlog.cue:18-32; it has no id, and name: string has no uniqueness or non-empty constraint.
- Compare
test/test-data/good-enforcement-log.yaml:59-61 (entry-id: OSPS-DO-01) with the EvaluationLog fixture. The matching control is at test/test-data/pvtr-baseline-scan.yaml:300-322; its ControlEvaluation.name is empty and it has no id.
Expected behavior
AssessmentFinding.log must be able to identify a concrete evaluation result in the referenced EvaluationLog. The schema should provide a stable identifier for the target entry and document which evaluation level the finding reference selects.
Screenshots
No response
Additional context
This does not propose cross-artifact dereference or artifact-type validation; Gemara does not generally enforce those. Relevant primitives: mapping_inline.cue:47-57.
Version of Gemara
mainat24e52e9Describe the bug
AssessmentFinding.logis documented as mapping to the EvaluationLog entry containing the finding, but it is anEntryMappingand therefore requiresentry-id.#ControlEvaluation, the entry type in#EvaluationLog.evaluations, has noid; it only hasname, which is neither constrained as unique nor required to be non-empty.The enforcement fixture uses control identifiers such as
OSPS-DO-01aslog.entry-id, but the corresponding evaluation has no such entry identifier. The reference therefore hangs: consumers cannot determine whichControlEvaluationit denotes.To Reproduce
#AssessmentFinding.loginenforcementlog.cue:61-74.#ControlEvaluationinevaluationlog.cue:18-32; it has noid, andname: stringhas no uniqueness or non-empty constraint.test/test-data/good-enforcement-log.yaml:59-61(entry-id: OSPS-DO-01) with the EvaluationLog fixture. The matching control is attest/test-data/pvtr-baseline-scan.yaml:300-322; itsControlEvaluation.nameis empty and it has noid.Expected behavior
AssessmentFinding.logmust be able to identify a concrete evaluation result in the referenced EvaluationLog. The schema should provide a stable identifier for the target entry and document which evaluation level the finding reference selects.Screenshots
No response
Additional context
This does not propose cross-artifact dereference or artifact-type validation; Gemara does not generally enforce those. Relevant primitives:
mapping_inline.cue:47-57.