UNPKG

@catladder/cli

Version:

Panter cli tool for cloud CI/CD and DevOps

26 lines (25 loc) 922 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.commandSecurityEvaluate = void 0; const defineCommand_1 = require("../../core/defineCommand"); const evaluateSecurityAudit_1 = require("../../security/evaluateSecurityAudit"); const projects_1 = require("../../utils/projects"); exports.commandSecurityEvaluate = (0, defineCommand_1.defineCommand)({ name: "project security-evaluate", description: "evaluate project's security audit document", group: "project", inputs: {}, execute: async ctx => { const gitRoot = await (0, projects_1.getGitRoot)(); const result = await (0, evaluateSecurityAudit_1.evaluateSecurityAudit)({ path: gitRoot }); if (result.isErr()) { ctx.log(`Could not evaluate security audit document: ${result.error}`); } else { ctx.log((0, evaluateSecurityAudit_1.makeSecurityAuditOverview)(result.value)); } } });