Skip to content

Commit

Permalink
Merge pull request #344 from ca-risken/fix-ai
Browse files Browse the repository at this point in the history
fix: finding details
  • Loading branch information
gassara-kys authored Oct 24, 2023
2 parents db8feea + 5de0f23 commit 788165a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/ai/openai.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Type:
Description:
%s
ScanResult(json):
%s
`
RECOMMEND_FORMAT_FOR_AI = `Detail: %s
Recommendation: %s
Expand Down Expand Up @@ -209,7 +212,7 @@ func (a *AIClient) AskAISummaryStreamFromFinding(
}

func generateFindingDataForAI(f *model.Finding, r *model.Recommend) string {
text := fmt.Sprintf(FINDING_FORMAT_FOR_AI, f.DataSource, f.Description)
text := fmt.Sprintf(FINDING_FORMAT_FOR_AI, f.DataSource, f.Description, f.Data)
if r != nil {
text += fmt.Sprintf(RECOMMEND_FORMAT_FOR_AI, r.Risk, r.Recommendation)
}
Expand Down

0 comments on commit 788165a

Please sign in to comment.