@greenarmor/ges-scoring-engine
Compliance scoring across frameworks for the Green Engineering Standard Framework (GESF).
Calculates per-framework and overall compliance scores based on evaluated controls. Produces structured score files for display and reporting.
Install
npm install @greenarmor/ges-scoring-engine
Exports
scoreControls(controls) | Calculate a 0–100 score from evaluated controls |
scoreByFramework(controls, frameworks) | Score controls grouped by framework |
computeOverallScore(frameworkScores) | Weighted overall compliance score |
generateScoreFile(controls, frameworks) | Generate a complete ScoreFile structure |
formatScoreOutput(score) | Format score file as a human-readable string |
Usage
import { generateScoreFile, formatScoreOutput } from '@greenarmor/ges-scoring-engine';
import { createGDPRControls } from '@greenarmor/ges-compliance-engine';
const controls = createGDPRControls();
const score = generateScoreFile(controls, ['GDPR', 'OWASP', 'NIST', 'CIS']);
console.log(formatScoreOutput(score));
Score Output
Scores are stored in .ges/score.json and include:
- Per-framework percentages
- Pass/fail/warning counts per framework
- Weighted overall score
- Timestamp
Related Packages
@greenarmor/ges-core — Types and constants
@greenarmor/ges-compliance-engine — Control evaluation
@greenarmor/ges-report-generator — Report generation from scores
License
MIT