(run WorkflowRun, cfg auditRunConfig, useLocalCache bool)
| 582 | } |
| 583 | |
| 584 | func prepareRunForAnalysis(run WorkflowRun, cfg auditRunConfig, useLocalCache bool) WorkflowRun { |
| 585 | if useLocalCache && run.DatabaseID == 0 { |
| 586 | run = WorkflowRun{ |
| 587 | DatabaseID: cfg.runID, |
| 588 | WorkflowName: fmt.Sprintf("Workflow Run %d", cfg.runID), |
| 589 | Status: "unknown", |
| 590 | LogsPath: cfg.outputDir, |
| 591 | } |
| 592 | fmt.Fprintln(os.Stderr, console.FormatInfoMessage("Using locally cached artifacts without metadata. Some report details may be unavailable.")) |
| 593 | } |
| 594 | run.LogsPath = cfg.outputDir |
| 595 | if !run.StartedAt.IsZero() && !run.UpdatedAt.IsZero() { |
| 596 | run.Duration = run.UpdatedAt.Sub(run.StartedAt) |
| 597 | } |
| 598 | return run |
| 599 | } |
| 600 | |
| 601 | func collectAuditAnalysisResults(run WorkflowRun, runOutputDir string, verbose bool, hasFirewallArtifact bool) auditAnalysisResults { |
| 602 | results := auditAnalysisResults{} |
no test coverage detected