| 102 | } |
| 103 | |
| 104 | function renderChecks(checks) { |
| 105 | if (checks.length === 0) { |
| 106 | return "No checks recorded."; |
| 107 | } |
| 108 | |
| 109 | return checks |
| 110 | .map((check) => { |
| 111 | const parts = [`- [${check.status.toUpperCase()}] ${check.id}: ${check.message}`]; |
| 112 | if (check.why) { |
| 113 | parts.push(`Why: ${check.why}`); |
| 114 | } |
| 115 | if (check.evidence?.length > 0) { |
| 116 | parts.push(`Evidence: ${check.evidence.join(" ")}`); |
| 117 | } |
| 118 | if (check.remediation?.length > 0) { |
| 119 | parts.push(`Remediation: ${check.remediation.join(" ")}`); |
| 120 | } |
| 121 | return parts.join(" "); |
| 122 | }) |
| 123 | .join("\n"); |
| 124 | } |
| 125 | |
| 126 | function renderMetrics(metrics) { |
| 127 | if (metrics.length === 0) { |