From a2c1769767e1c8303c7259afbc8c430757dc3806 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Tue, 12 Nov 2024 16:04:56 +0100 Subject: [PATCH] fix: update migrator --- .../job/migrations/compliance/git_parser.go | 4 ++-- .../migrations/compliance/translator_model.go | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/services/migrator/job/migrations/compliance/git_parser.go b/services/migrator/job/migrations/compliance/git_parser.go index ec4dfc09c..0eb82da30 100644 --- a/services/migrator/job/migrations/compliance/git_parser.go +++ b/services/migrator/job/migrations/compliance/git_parser.go @@ -208,7 +208,7 @@ func (g *GitParser) ExtractControls(complianceControlsPath string, controlEnrich Title: control.Title, Description: control.Description, Tags: tags, - IntegrationType: control.IntegrationTypeName, + IntegrationType: control.IntegrationType, Enabled: true, Benchmarks: nil, Severity: types.ParseComplianceResultSeverity(control.Severity), @@ -220,7 +220,7 @@ func (g *GitParser) ExtractControls(complianceControlsPath string, controlEnrich q := db.Query{ ID: control.ID, QueryToExecute: control.Query.QueryToExecute, - IntegrationType: control.IntegrationTypeName, + IntegrationType: control.IntegrationType, PrimaryTable: control.Query.PrimaryTable, ListOfTables: control.Query.ListOfTables, Engine: control.Query.Engine, diff --git a/services/migrator/job/migrations/compliance/translator_model.go b/services/migrator/job/migrations/compliance/translator_model.go index e9ae3ffa8..4c1dfb143 100644 --- a/services/migrator/job/migrations/compliance/translator_model.go +++ b/services/migrator/job/migrations/compliance/translator_model.go @@ -18,15 +18,15 @@ type Benchmark struct { } type Control struct { - ID string `json:"ID" yaml:"ID"` - Title string `json:"Title" yaml:"Title"` - IntegrationTypeName []string `json:"IntegrationTypeName" yaml:"IntegrationTypeName"` - Description string `json:"Description" yaml:"Description"` - Query *shared.Query `json:"Query" yaml:"Query"` - ManualVerification bool `json:"ManualVerification" yaml:"ManualVerification"` - Severity string `json:"Severity" yaml:"Severity"` - Tags map[string][]string `json:"Tags" yaml:"Tags"` - Managed bool `json:"Managed" yaml:"Managed"` + ID string `json:"ID" yaml:"ID"` + Title string `json:"Title" yaml:"Title"` + IntegrationType []string `json:"IntegrationType" yaml:"IntegrationType"` + Description string `json:"Description" yaml:"Description"` + Query *shared.Query `json:"Query" yaml:"Query"` + ManualVerification bool `json:"ManualVerification" yaml:"ManualVerification"` + Severity string `json:"Severity" yaml:"Severity"` + Tags map[string][]string `json:"Tags" yaml:"Tags"` + Managed bool `json:"Managed" yaml:"Managed"` } type QueryView struct {