blob: 5a376cbf7c279fa1dacdb32560d936589e0d6f1a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import chalk from "chalk";
import type { Project } from "../types.js";
export function outputSummary(projects: Project[]) {
const text = `
This is what i found:
${projects.map((project) => {
let projectVulnerabilities = project.metadata.vulnerabilities.total;
return `
${project.projectName} has ${projectVulnerabilities > 0 ? chalk.bold.red(projectVulnerabilities) : chalk.bold.green(projectVulnerabilities)} Security Issues`;
})}
`;
console.log(text);
}
|