Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions internal/services/realtimeengine/iacrealtime/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package iacrealtime
import "github.com/checkmarx/ast-cli/internal/services/realtimeengine"

type IacRealtimeResult struct {
SimilarityID string `json:"SimilarityID"`
Title string `json:"Title"`
Description string `json:"Description"`
RemediationAdvice string `json:"RemediationAdvice"`
Severity string `json:"Severity"`
FilePath string `json:"FilePath"`
Locations []realtimeengine.Location `json:"Locations"`
SimilarityID string `json:"SimilarityID"`
Title string `json:"Title"`
Description string `json:"Description"`
ExpectedValue string `json:"ExpectedValue"`
ActualValue string `json:"ActualValue"`
Severity string `json:"Severity"`
FilePath string `json:"FilePath"`
Locations []realtimeengine.Location `json:"Locations"`
}

type IgnoredIacFinding struct {
Expand Down
13 changes: 7 additions & 6 deletions internal/services/realtimeengine/iacrealtime/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ func (m *Mapper) ConvertKicsToIacResults(
lineIndex := m.getOrComputeLineIndex(fileContent, locLine, indexMap)

iacResult := IacRealtimeResult{
Title: result.QueryName,
Description: result.Description,
RemediationAdvice: loc.ExpectedValue,
Severity: m.mapSeverity(result.Severity),
FilePath: filePath,
SimilarityID: loc.SimilarityID,
Title: result.QueryName,
Description: result.Description,
ExpectedValue: loc.ExpectedValue,
ActualValue: loc.ActualValue,
Severity: m.mapSeverity(result.Severity),
FilePath: filePath,
SimilarityID: loc.SimilarityID,
Locations: []realtimeengine.Location{
{
Line: locLine,
Expand Down
Loading