MCPcopy
hub / github.com/aquasecurity/trivy / PostAnalyze

Method PostAnalyze

pkg/fanal/analyzer/config/config.go:43–49  ·  view source on GitHub ↗

PostAnalyze performs configuration analysis on the input filesystem and detect misconfigurations.

(ctx context.Context, input analyzer.PostAnalysisInput)

Source from the content-addressed store, hash-verified

41
42// PostAnalyze performs configuration analysis on the input filesystem and detect misconfigurations.
43func (a *Analyzer) PostAnalyze(ctx context.Context, input analyzer.PostAnalysisInput) (*analyzer.AnalysisResult, error) {
44 misconfs, err := a.scanner.Scan(ctx, input.FS)
45 if err != nil {
46 return nil, xerrors.Errorf("%s scan error: %w", a.typ, err)
47 }
48 return &analyzer.AnalysisResult{Misconfigurations: misconfs}, nil
49}
50
51// Required checks if the given file path has one of the required file extensions.
52func (a *Analyzer) Required(filePath string, _ os.FileInfo) bool {

Callers 1

TestAnalyzer_PostAnalyzeFunction · 0.95

Calls 1

ScanMethod · 0.65

Tested by 1

TestAnalyzer_PostAnalyzeFunction · 0.76