@greenarmor/ges-report-generator 0.3.5 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +24 -5
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -22,18 +22,23 @@ export function generateMarkdownReport(options, score, controls, findings) {
22
22
  function generateExecutiveSummary(score, findings) {
23
23
  const lines = [
24
24
  "## Executive Summary\n",
25
- `Overall compliance score: **${score.overall}%**\n`,
26
- "| Framework | Score | Controls | Passed | Failed | Warnings |",
27
- "|-----------|-------|----------|--------|--------|----------|",
25
+ `Overall compliance score: **${score.overall}%** (Grade: **${score.overall_grade}**)
26
+ `,
27
+ "| Framework | Grade | Score | Controls | Passed | Failed | Warnings | Critical Failures |",
28
+ "|-----------|-------|-------|----------|--------|--------|----------|-------------------|",
28
29
  ];
29
30
  for (const [fw, data] of Object.entries(score.frameworks)) {
30
- lines.push(`| ${fw} | ${data.score}% | ${data.total_controls} | ${data.passed_controls} | ${data.failed_controls} | ${data.warning_controls} |`);
31
+ lines.push(`| ${fw} | ${data.grade} | ${data.score}% | ${data.total_controls} | ${data.passed_controls} | ${data.failed_controls} | ${data.warning_controls} | ${data.critical_failures} |`);
31
32
  }
32
33
  if (findings && findings.length > 0) {
33
34
  const critical = findings.filter(f => f.severity === "critical").length;
34
35
  const high = findings.filter(f => f.severity === "high").length;
35
36
  lines.push(`\n**Security Findings**: ${findings.length} total (${critical} critical, ${high} high)`);
36
37
  }
38
+ if (score.audit_impact) {
39
+ const ai = score.audit_impact;
40
+ lines.push(`\n**Audit Impact**: -${ai.total_deduction}% (${ai.critical_findings} critical, ${ai.high_findings} high, ${ai.medium_findings} medium, ${ai.low_findings} low findings)`);
41
+ }
37
42
  return lines.join("\n");
38
43
  }
39
44
  function generateFindingsSection(findings) {
@@ -64,12 +69,26 @@ function generateComplianceSection(score) {
64
69
  "### Framework Scores\n",
65
70
  ];
66
71
  for (const [fw, data] of Object.entries(score.frameworks)) {
67
- lines.push(`#### ${fw} - ${data.score}%\n`);
72
+ lines.push(`#### ${fw} - ${data.score}% (Grade: ${data.grade})\n`);
68
73
  lines.push(`- Total Controls: ${data.total_controls}`);
69
74
  lines.push(`- Passed: ${data.passed_controls}`);
70
75
  lines.push(`- Failed: ${data.failed_controls}`);
71
76
  lines.push(`- Warnings: ${data.warning_controls}`);
72
77
  lines.push(`- Not Applicable: ${data.not_applicable}`);
78
+ lines.push(`- Not Implemented: ${data.not_implemented}`);
79
+ lines.push(`- Critical Failures: ${data.critical_failures}`);
80
+ const sb = data.severity_breakdown;
81
+ lines.push("\n**Severity Breakdown:**");
82
+ lines.push("| Level | Total | Passed | Failed | Warning | Not Implemented |");
83
+ lines.push("|-------|-------|--------|--------|---------|-----------------|");
84
+ if (sb.critical.total > 0)
85
+ lines.push(`| Critical | ${sb.critical.total} | ${sb.critical.passed} | ${sb.critical.failed} | ${sb.critical.warning} | ${sb.critical.not_implemented} |`);
86
+ if (sb.high.total > 0)
87
+ lines.push(`| High | ${sb.high.total} | ${sb.high.passed} | ${sb.high.failed} | ${sb.high.warning} | ${sb.high.not_implemented} |`);
88
+ if (sb.medium.total > 0)
89
+ lines.push(`| Medium | ${sb.medium.total} | ${sb.medium.passed} | ${sb.medium.failed} | ${sb.medium.warning} | ${sb.medium.not_implemented} |`);
90
+ if (sb.low.total > 0)
91
+ lines.push(`| Low | ${sb.low.total} | ${sb.low.passed} | ${sb.low.failed} | ${sb.low.warning} | ${sb.low.not_implemented} |`);
73
92
  lines.push("");
74
93
  }
75
94
  return lines.join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greenarmor/ges-report-generator",
3
- "version": "0.3.5",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "GESF Report Generator - Markdown/HTML/PDF compliance reports",
6
6
  "main": "./dist/index.js",
@@ -12,11 +12,11 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@greenarmor/ges-core": "0.3.5",
16
- "@greenarmor/ges-audit-engine": "0.3.5",
17
- "@greenarmor/ges-compliance-engine": "0.3.5",
18
- "@greenarmor/ges-policy-engine": "0.3.5",
19
- "@greenarmor/ges-scoring-engine": "0.3.5"
15
+ "@greenarmor/ges-core": "0.5.0",
16
+ "@greenarmor/ges-audit-engine": "0.5.0",
17
+ "@greenarmor/ges-compliance-engine": "0.5.0",
18
+ "@greenarmor/ges-policy-engine": "0.5.0",
19
+ "@greenarmor/ges-scoring-engine": "0.5.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "typescript": "^6.0.0",