@greenarmor/ges-scoring-engine 0.3.0 → 0.3.2

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/README.md +57 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # @greenarmor/ges-scoring-engine
2
+
3
+ Compliance scoring across frameworks for the [Green Engineering Standard Framework (GESF)](https://github.com/greenarmor/gesf).
4
+
5
+ Calculates per-framework and overall compliance scores based on evaluated controls. Produces structured score files for display and reporting.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @greenarmor/ges-scoring-engine
11
+ ```
12
+
13
+ ## Exports
14
+
15
+ | Function | Description |
16
+ |----------|-------------|
17
+ | `scoreControls(controls)` | Calculate a 0–100 score from evaluated controls |
18
+ | `scoreByFramework(controls, frameworks)` | Score controls grouped by framework |
19
+ | `computeOverallScore(frameworkScores)` | Weighted overall compliance score |
20
+ | `generateScoreFile(controls, frameworks)` | Generate a complete `ScoreFile` structure |
21
+ | `formatScoreOutput(score)` | Format score file as a human-readable string |
22
+
23
+ ## Usage
24
+
25
+ ```typescript
26
+ import { generateScoreFile, formatScoreOutput } from '@greenarmor/ges-scoring-engine';
27
+ import { createGDPRControls } from '@greenarmor/ges-compliance-engine';
28
+
29
+ const controls = createGDPRControls();
30
+ const score = generateScoreFile(controls, ['GDPR', 'OWASP', 'NIST', 'CIS']);
31
+
32
+ console.log(formatScoreOutput(score));
33
+ // GDPR ............. 94%
34
+ // OWASP ............ 91%
35
+ // NIST ............. 89%
36
+ // CIS .............. 92%
37
+ // Overall .......... 92%
38
+ ```
39
+
40
+ ## Score Output
41
+
42
+ Scores are stored in `.ges/score.json` and include:
43
+
44
+ - Per-framework percentages
45
+ - Pass/fail/warning counts per framework
46
+ - Weighted overall score
47
+ - Timestamp
48
+
49
+ ## Related Packages
50
+
51
+ - [`@greenarmor/ges-core`](https://www.npmjs.com/package/@greenarmor/ges-core) — Types and constants
52
+ - [`@greenarmor/ges-compliance-engine`](https://www.npmjs.com/package/@greenarmor/ges-compliance-engine) — Control evaluation
53
+ - [`@greenarmor/ges-report-generator`](https://www.npmjs.com/package/@greenarmor/ges-report-generator) — Report generation from scores
54
+
55
+ ## License
56
+
57
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greenarmor/ges-scoring-engine",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "GESF Scoring Engine - Compliance scoring across frameworks",
6
6
  "main": "./dist/index.js",
@@ -12,7 +12,7 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@greenarmor/ges-core": "0.3.0"
15
+ "@greenarmor/ges-core": "0.3.2"
16
16
  },
17
17
  "devDependencies": {
18
18
  "typescript": "^6.0.0",