diff --git a/types/analysis.go b/types/analysis.go index 9492dde..8b473a8 100644 --- a/types/analysis.go +++ b/types/analysis.go @@ -86,11 +86,12 @@ type AnalysisReport struct { } type AnalysisResult struct { - RunID string `json:"run_id"` - Status Status `json:"status"` - CheckSeq string `json:"check_seq"` - Report AnalysisReport `json:"report"` - ReportObject string `json:"report_object"` + RunID string `json:"run_id"` + Status Status `json:"status"` + CheckSeq string `json:"check_seq"` + AnalyzerShortcode string `json:"analyzer_shortcode"` + Report AnalysisReport `json:"report"` + ReportObject string `json:"report_object"` } type AnalysisResultCeleryTask struct { diff --git a/types/autofixbot.go b/types/autofixbot.go index c6a55b6..198864e 100644 --- a/types/autofixbot.go +++ b/types/autofixbot.go @@ -75,6 +75,11 @@ const ( ) type AutofixBotAnalysis struct { + // Set by the config gen engine to denote whether the config has been passed through config gen. + // This ensures that we do not retry config gen if the number of analyzers and targets detected + // are zero. + IsGenerated bool `json:"is_generated"` + FlowID string `json:"flow_id"` FlowType string `json:"flow_type"` RepositoryID string `json:"repository_id"` @@ -116,6 +121,10 @@ type AutofixBotAnalysis struct { // based on the config. ExpectedAnalyzers []string `json:"expected_analyzers"` + // ExpectedTargets are the final list of SCA targets that will be run + // based on the config. + ExpectedTargets []SCATarget `json:"expected_targets"` + // MarvinAnalyzerDataMap is generated with the analyzer container // metadata based on the config generation step. MarvinAnalyzerDataMap map[string]MarvinAnalyzerData `json:"marvin_analyzer_data_map,omitempty"` diff --git a/types/ds_config.go b/types/ds_config.go index 233b534..d1f4cc8 100644 --- a/types/ds_config.go +++ b/types/ds_config.go @@ -20,6 +20,7 @@ type DSConfig struct { ExcludePatterns []string `toml:"exclude_patterns,omitempty" json:"exclude_patterns,omitempty"` TestPatterns []string `toml:"test_patterns,omitempty" json:"test_patterns,omitempty"` Analyzers []Analyzer `toml:"analyzers,omitempty" json:"analyzers,omitempty"` + SCATargets []SCATarget `toml:"sca_targets,omitempty" json:"sca_targets,omitempty"` Transformers []Transformer `toml:"transformers,omitempty" json:"transformers,omitempty"` } @@ -35,5 +36,5 @@ type AnalysisConfig struct { //proteus:generate type IDEConfig struct { - IsIDE bool `json:"is_ide"` + IsIDE bool `json:"is_ide"` }