@greenarmor/ges-core 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.
@@ -1,5 +1,5 @@
1
1
  import type { ProjectType, FrameworkName } from "../types/index.js";
2
- export declare const GESF_VERSION = "0.3.3";
2
+ export declare const GESF_VERSION: string;
3
3
  export declare const PROJECT_TYPES: {
4
4
  value: ProjectType;
5
5
  label: string;
@@ -1,4 +1,11 @@
1
- export const GESF_VERSION = "0.3.3";
1
+ import { createRequire } from "node:module";
2
+ import * as url from "node:url";
3
+ import * as path from "node:path";
4
+ const __filename = url.fileURLToPath(import.meta.url);
5
+ const __dirname = path.dirname(__filename);
6
+ const require = createRequire(import.meta.url);
7
+ const pkg = require("../../package.json");
8
+ export const GESF_VERSION = pkg.version;
2
9
  export const PROJECT_TYPES = [
3
10
  { value: "saas", label: "SaaS" },
4
11
  { value: "ai-application", label: "AI Application" },
@@ -1,6 +1,7 @@
1
1
  export type ProjectType = "saas" | "ai-application" | "mcp-server" | "blockchain" | "wallet" | "government-system" | "healthcare-system" | "event-platform" | "photo-storage-platform" | "vulnerability-scanner" | "generic-web-application" | "api-backend" | "mobile-application";
2
2
  export type FrameworkName = "GDPR" | "OWASP" | "CIS" | "NIST" | "ISO27001" | "ISO27701";
3
3
  export type DataClassification = "public" | "internal" | "confidential" | "restricted";
4
+ export type SeverityLevel = "critical" | "high" | "medium" | "low";
4
5
  export type ControlStatus = "pass" | "fail" | "warning" | "not-applicable" | "not-implemented";
5
6
  export type ReportFormat = "markdown" | "html" | "pdf";
6
7
  export interface ProjectConfig {
@@ -41,7 +42,7 @@ export interface Control {
41
42
  framework: FrameworkName;
42
43
  article?: string;
43
44
  status: ControlStatus;
44
- severity: "critical" | "high" | "medium" | "low";
45
+ severity: SeverityLevel;
45
46
  implementation_guidance: string;
46
47
  checks: ControlCheck[];
47
48
  }
@@ -51,19 +52,64 @@ export interface ControlCheck {
51
52
  status: ControlStatus;
52
53
  evidence?: string;
53
54
  }
55
+ export type ComplianceGrade = "A" | "B" | "C" | "D" | "F";
56
+ export interface SeverityBreakdown {
57
+ critical: {
58
+ total: number;
59
+ passed: number;
60
+ failed: number;
61
+ warning: number;
62
+ not_implemented: number;
63
+ };
64
+ high: {
65
+ total: number;
66
+ passed: number;
67
+ failed: number;
68
+ warning: number;
69
+ not_implemented: number;
70
+ };
71
+ medium: {
72
+ total: number;
73
+ passed: number;
74
+ failed: number;
75
+ warning: number;
76
+ not_implemented: number;
77
+ };
78
+ low: {
79
+ total: number;
80
+ passed: number;
81
+ failed: number;
82
+ warning: number;
83
+ not_implemented: number;
84
+ };
85
+ }
54
86
  export interface ComplianceScore {
55
87
  framework: FrameworkName;
56
88
  score: number;
89
+ grade: ComplianceGrade;
57
90
  total_controls: number;
58
91
  passed_controls: number;
59
92
  failed_controls: number;
60
93
  warning_controls: number;
61
94
  not_applicable: number;
95
+ not_implemented: number;
96
+ severity_breakdown: SeverityBreakdown;
97
+ critical_failures: number;
98
+ max_possible_score: number;
62
99
  evaluated_at: string;
63
100
  }
101
+ export interface AuditImpact {
102
+ total_deduction: number;
103
+ critical_findings: number;
104
+ high_findings: number;
105
+ medium_findings: number;
106
+ low_findings: number;
107
+ }
64
108
  export interface ScoreFile {
65
109
  overall: number;
110
+ overall_grade: ComplianceGrade;
66
111
  frameworks: Record<string, ComplianceScore>;
112
+ audit_impact?: AuditImpact;
67
113
  evaluated_at: string;
68
114
  }
69
115
  export interface AuditEntry {
@@ -103,3 +149,8 @@ export interface ReportOptions {
103
149
  include_compliance: boolean;
104
150
  include_security: boolean;
105
151
  }
152
+ export interface ControlOverride {
153
+ control_id: string;
154
+ status: ControlStatus;
155
+ reason: string;
156
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greenarmor/ges-core",
3
- "version": "0.3.5",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "GESF Core - Types, schemas, and constants",
6
6
  "main": "./dist/index.js",