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
13 changes: 7 additions & 6 deletions internal/services/realtimeengine/iacrealtime/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ 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"`
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"`
RemediationAdvice string `json:"RemediationAdvice"`
Severity string `json:"Severity"`
FilePath string `json:"FilePath"`
Locations []realtimeengine.Location `json:"Locations"`
}

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

iacResult := IacRealtimeResult{
Title: result.QueryName,
Description: result.Description,
Severity: m.mapSeverity(result.Severity),
FilePath: filePath,
SimilarityID: loc.SimilarityID,
Title: result.QueryName,
Description: result.Description,
RemediationAdvice: loc.ExpectedValue,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the remediation advice is part of the location?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kics results structure. for each vulnerability, they tell you in the line of the vulnerable code, what they were expected to find

Severity: m.mapSeverity(result.Severity),
FilePath: filePath,
SimilarityID: loc.SimilarityID,
Locations: []realtimeengine.Location{
{
Line: locLine,
Expand Down
Loading