From c8a7abd3b508975fcf10c254d13d1a2cd42da657 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Tue, 16 Jul 2024 12:20:13 +0700 Subject: [PATCH] fix: add missing platform and type to spec (#7149) Signed-off-by: nikpivkin --- pkg/iac/types/compliance.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/iac/types/compliance.go b/pkg/iac/types/compliance.go index 42636fffe544..5bb0fa346975 100644 --- a/pkg/iac/types/compliance.go +++ b/pkg/iac/types/compliance.go @@ -21,7 +21,9 @@ type Spec struct { Title string `yaml:"title"` Description string `yaml:"description"` Version string `yaml:"version"` - RelatedResources []string `yaml:"relatedResources"` + Platform string `yaml:"platform"` + Type string `yaml:"type"` + RelatedResources []string `yaml:"relatedResources,omitempty"` Controls []Control `yaml:"controls"` } @@ -30,8 +32,8 @@ type Control struct { ID string `yaml:"id"` Name string `yaml:"name"` Description string `yaml:"description,omitempty"` - Checks []SpecCheck `yaml:"checks"` - Commands []Command `yaml:"commands"` + Checks []SpecCheck `yaml:"checks,omitempty"` + Commands []Command `yaml:"commands,omitempty"` Severity Severity `yaml:"severity"` DefaultStatus ControlStatus `yaml:"defaultStatus,omitempty"` }