diff --git a/pkg/policy/types.go b/pkg/policy/types.go index 97f01fd2e..dcff7ab09 100644 --- a/pkg/policy/types.go +++ b/pkg/policy/types.go @@ -1,6 +1,8 @@ package policy import ( + "encoding/xml" + "github.com/accurics/terrascan/pkg/iac-providers/output" "github.com/accurics/terrascan/pkg/results" ) @@ -12,5 +14,6 @@ type EngineInput struct { // EngineOutput Contains data output from the engine type EngineOutput struct { - *results.ViolationStore `json:"results" yaml:"results" xml:"results,attr"` + XMLName xml.Name `json:"-" yaml:"-" xml:"results"` + *results.ViolationStore `json:"results" yaml:"results" xml:"results"` } diff --git a/pkg/results/types.go b/pkg/results/types.go index 35e38129a..f14d436e7 100644 --- a/pkg/results/types.go +++ b/pkg/results/types.go @@ -42,6 +42,6 @@ type ViolationStats struct { // ViolationStore Storage area for violation data type ViolationStore struct { - Violations []*Violation `json:"violations" yaml:"violations" xml:"violations,attr"` - Count ViolationStats `json:"count" yaml:"count" xml:"count,attr"` + Violations []*Violation `json:"violations" yaml:"violations" xml:"violations>violation"` + Count ViolationStats `json:"count" yaml:"count" xml:"count"` }