Skip to content

Commit 9c18c11

Browse files
authored
fix(attestation): camelcase all the things (#1739)
Signed-off-by: Miguel Martinez <[email protected]>
1 parent ffc4650 commit 9c18c11

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

pkg/attestation/renderer/chainloop/testdata/attestation.output.v0.2.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,16 @@
8282
"policyAttBlocked": false,
8383
"policyBlockBypassEnabled": false,
8484
"policyCheckBlockingStrategy": "ADVISORY",
85-
"policyHasViolations": true,
86-
"policy_evaluations": {
85+
"policyEvaluations": {
8786
"sbom": [
8887
{
8988
"annotations": {
9089
"category": "sbom"
9190
},
9291
"description": "Checks that the SBOM is not older than a specified threshold. Supports CycloneDX.\n",
93-
"material_name": "sbom",
92+
"materialName": "sbom",
9493
"name": "sbom-freshness",
95-
"policy_reference": {
94+
"policyReference": {
9695
"annotations": {
9796
"name": "sbom-freshness",
9897
"organization": ""
@@ -117,6 +116,7 @@
117116
}
118117
]
119118
},
119+
"policyHasViolations": true,
120120
"runnerType": "GITHUB_ACTION"
121121
}
122122
}

pkg/attestation/renderer/chainloop/v02.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type ProvenancePredicateV02 struct {
4242
*ProvenancePredicateCommon
4343
Materials []*intoto.ResourceDescriptor `json:"materials,omitempty"`
4444
// Map materials and policies
45-
PolicyEvaluations map[string][]*PolicyEvaluation `json:"policy_evaluations,omitempty"`
45+
PolicyEvaluations map[string][]*PolicyEvaluation `json:"policyEvaluations,omitempty"`
4646
// Whether the attestation has policy violations
4747
PolicyHasViolations bool `json:"policyHasViolations"`
4848
// Whether we want to block the attestation on policy violations
@@ -62,18 +62,18 @@ const (
6262

6363
type PolicyEvaluation struct {
6464
Name string `json:"name"`
65-
MaterialName string `json:"material_name,omitempty"`
65+
MaterialName string `json:"materialName,omitempty"`
6666
Body string `json:"body,omitempty"`
6767
Sources []string `json:"sources,omitempty"`
68-
PolicyReference *intoto.ResourceDescriptor `json:"policy_reference,omitempty"`
68+
PolicyReference *intoto.ResourceDescriptor `json:"policyReference,omitempty"`
6969
Description string `json:"description,omitempty"`
7070
Annotations map[string]string `json:"annotations,omitempty"`
7171
Violations []*PolicyViolation `json:"violations,omitempty"`
7272
With map[string]string `json:"with,omitempty"`
7373
Type string `json:"type"`
7474
Skipped bool `json:"skipped"`
75-
SkipReasons []string `json:"skip_reasons,omitempty"`
76-
GroupReference *intoto.ResourceDescriptor `json:"group_reference,omitempty"`
75+
SkipReasons []string `json:"skipReasons,omitempty"`
76+
GroupReference *intoto.ResourceDescriptor `json:"groupReference,omitempty"`
7777
Requirements []string `json:"requirements,omitempty"`
7878
}
7979

0 commit comments

Comments
 (0)