@mitre/hdf-schema 3.0.0 → 3.1.0-rc.1
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.
- package/LICENSE.md +55 -0
- package/README.md +96 -41
- package/dist/go/hdf.go +148 -104
- package/dist/helpers.js +4 -44
- package/dist/index.d.ts +26 -1
- package/dist/index.js +26 -1
- package/dist/schemas/hdf-amendments.schema.json +178 -53
- package/dist/schemas/hdf-baseline.schema.json +181 -56
- package/dist/schemas/hdf-comparison.schema.json +523 -108
- package/dist/schemas/hdf-evidence-package.schema.json +175 -50
- package/dist/schemas/hdf-plan.schema.json +181 -56
- package/dist/schemas/hdf-results.schema.json +502 -87
- package/dist/schemas/hdf-system.schema.json +190 -65
- package/dist/ts/hdf-amendments.d.ts +43 -15
- package/dist/ts/hdf-amendments.js +18 -7
- package/dist/ts/hdf-amendments.ts +44 -15
- package/dist/ts/hdf-results.d.ts +91 -37
- package/dist/ts/hdf-results.js +40 -20
- package/dist/ts/hdf-results.ts +91 -36
- package/package.json +44 -44
- package/dist/python/hdf_amendments.py +0 -695
- package/dist/python/hdf_baseline.py +0 -782
- package/dist/python/hdf_comparison.py +0 -1771
- package/dist/python/hdf_evidence_package.py +0 -593
- package/dist/python/hdf_plan.py +0 -363
- package/dist/python/hdf_results.py +0 -2163
- package/dist/python/hdf_system.py +0 -904
- package/src/schemas/hdf-amendments.schema.json +0 -97
- package/src/schemas/hdf-baseline.schema.json +0 -190
- package/src/schemas/hdf-comparison.schema.json +0 -107
- package/src/schemas/hdf-evidence-package.schema.json +0 -227
- package/src/schemas/hdf-plan.schema.json +0 -92
- package/src/schemas/hdf-results.schema.json +0 -304
- package/src/schemas/hdf-system.schema.json +0 -136
- package/src/schemas/primitives/amendments.schema.json +0 -155
- package/src/schemas/primitives/common.schema.json +0 -814
- package/src/schemas/primitives/comparison.schema.json +0 -809
- package/src/schemas/primitives/component.schema.json +0 -518
- package/src/schemas/primitives/data-flow.schema.json +0 -158
- package/src/schemas/primitives/extensions.schema.json +0 -342
- package/src/schemas/primitives/parameter.schema.json +0 -128
- package/src/schemas/primitives/plan.schema.json +0 -128
- package/src/schemas/primitives/platform.schema.json +0 -32
- package/src/schemas/primitives/result.schema.json +0 -133
- package/src/schemas/primitives/runner.schema.json +0 -83
- package/src/schemas/primitives/statistics.schema.json +0 -71
- package/src/schemas/primitives/system.schema.json +0 -132
- package/src/schemas/primitives/target.schema.json +0 -523
package/dist/ts/hdf-results.ts
CHANGED
|
@@ -422,8 +422,22 @@ export interface EvaluatedRequirement {
|
|
|
422
422
|
*/
|
|
423
423
|
descriptions: Description[];
|
|
424
424
|
/**
|
|
425
|
-
* The
|
|
426
|
-
*
|
|
425
|
+
* The type of the most recent non-expired override or POAM governing this requirement.
|
|
426
|
+
* Indicates why the requirement is in its current state (e.g., waiver, falsePositive,
|
|
427
|
+
* riskAdjustment) or what remediation is being tracked (poam). Absent when no overrides or
|
|
428
|
+
* POAMs apply.
|
|
429
|
+
*/
|
|
430
|
+
disposition?: OverrideType;
|
|
431
|
+
/**
|
|
432
|
+
* The current effective impact score (0.0–1.0) after applying the most recent non-expired
|
|
433
|
+
* override with an impact field. Absent when no impact overrides apply; consumers should
|
|
434
|
+
* use the requirement's impact field in that case.
|
|
435
|
+
*/
|
|
436
|
+
effectiveImpact?: number;
|
|
437
|
+
/**
|
|
438
|
+
* The current effective compliance status of this requirement after applying the most
|
|
439
|
+
* recent non-expired override with a status field, or computed from results (worst-wins) if
|
|
440
|
+
* no status-bearing overrides exist.
|
|
427
441
|
*/
|
|
428
442
|
effectiveStatus?: ResultStatus;
|
|
429
443
|
/**
|
|
@@ -451,9 +465,10 @@ export interface EvaluatedRequirement {
|
|
|
451
465
|
*/
|
|
452
466
|
sourceLocation?: SourceLocation;
|
|
453
467
|
/**
|
|
454
|
-
* Chronological history of all
|
|
455
|
-
*
|
|
456
|
-
* recent override should be first in array.
|
|
468
|
+
* Chronological history of all overrides applied to this requirement. Overrides are
|
|
469
|
+
* intentional changes to the compliance status and/or impact score (waivers, attestations,
|
|
470
|
+
* false positives, risk adjustments). Most recent override should be first in array.
|
|
471
|
+
* Preserves full audit trail.
|
|
457
472
|
*/
|
|
458
473
|
statusOverrides?: StatusOverride[];
|
|
459
474
|
/**
|
|
@@ -499,8 +514,42 @@ export interface Description {
|
|
|
499
514
|
}
|
|
500
515
|
|
|
501
516
|
/**
|
|
502
|
-
* The
|
|
503
|
-
*
|
|
517
|
+
* The type of the most recent non-expired override or POAM governing this requirement.
|
|
518
|
+
* Indicates why the requirement is in its current state (e.g., waiver, falsePositive,
|
|
519
|
+
* riskAdjustment) or what remediation is being tracked (poam). Absent when no overrides or
|
|
520
|
+
* POAMs apply.
|
|
521
|
+
*
|
|
522
|
+
* The type of amendment, aligned with FedRAMP deviation request categories. 'waiver': risk
|
|
523
|
+
* accepted by Authorizing Official. 'attestation': manually verified by assessor. 'poam':
|
|
524
|
+
* remediation tracked (no status change). 'inherited': control provided by another
|
|
525
|
+
* component or system. 'falsePositive': scanner incorrectly identified a finding — for
|
|
526
|
+
* compliance scans (STIG, CIS), the check actually passes, so status is typically set to
|
|
527
|
+
* 'passed'; for vulnerability scans (CVE, SCA), the flagged vulnerability does not apply to
|
|
528
|
+
* this system, so status is typically set to 'notApplicable'. The disposition field on the
|
|
529
|
+
* requirement distinguishes false positives from genuinely not-applicable findings.
|
|
530
|
+
* 'riskAdjustment': impact score adjusted based on environmental context (FedRAMP Risk
|
|
531
|
+
* Adjustment); does not change pass/fail status, only impact via the impact field.
|
|
532
|
+
* 'operationalRequirement': deviation required by operational constraints (FedRAMP
|
|
533
|
+
* Operational Requirement); the finding cannot be remediated because the system requires
|
|
534
|
+
* the affected functionality. Remains an open risk. Migration note: 'exception' was removed
|
|
535
|
+
* in v3.1.0 — use 'waiver' with status 'notApplicable' instead.
|
|
536
|
+
*
|
|
537
|
+
* The type of override applied to this requirement.
|
|
538
|
+
*/
|
|
539
|
+
export enum OverrideType {
|
|
540
|
+
Attestation = "attestation",
|
|
541
|
+
FalsePositive = "falsePositive",
|
|
542
|
+
Inherited = "inherited",
|
|
543
|
+
OperationalRequirement = "operationalRequirement",
|
|
544
|
+
Poam = "poam",
|
|
545
|
+
RiskAdjustment = "riskAdjustment",
|
|
546
|
+
Waiver = "waiver",
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* The current effective compliance status of this requirement after applying the most
|
|
551
|
+
* recent non-expired override with a status field, or computed from results (worst-wins) if
|
|
552
|
+
* no status-bearing overrides exist.
|
|
504
553
|
*
|
|
505
554
|
* The status of an individual test result. 'notApplicable' indicates the requirement does
|
|
506
555
|
* not apply to the target. 'notReviewed' indicates the requirement was not assessed (e.g.,
|
|
@@ -508,8 +557,8 @@ export interface Description {
|
|
|
508
557
|
*
|
|
509
558
|
* The status of this test within the requirement. Example: 'failed'.
|
|
510
559
|
*
|
|
511
|
-
* The new status this override sets for the requirement.
|
|
512
|
-
*
|
|
560
|
+
* The new status this override sets for the requirement. Optional when only impact is being
|
|
561
|
+
* overridden.
|
|
513
562
|
*/
|
|
514
563
|
export enum ResultStatus {
|
|
515
564
|
Error = "error",
|
|
@@ -573,8 +622,8 @@ export interface Evidence {
|
|
|
573
622
|
*
|
|
574
623
|
* The identity that created this signature.
|
|
575
624
|
*
|
|
576
|
-
* Identity of who applied this
|
|
577
|
-
*
|
|
625
|
+
* Identity of who applied this override. For simple cases, use type 'simple' with just an
|
|
626
|
+
* identifier.
|
|
578
627
|
*
|
|
579
628
|
* Identity of the person or system that approved this override.
|
|
580
629
|
*
|
|
@@ -674,6 +723,7 @@ export interface Poam {
|
|
|
674
723
|
/**
|
|
675
724
|
* The type of POA&M. 'remediation' fixes root cause. 'mitigation' reduces risk via
|
|
676
725
|
* compensating controls. 'riskAcceptance' documents decision to accept risk.
|
|
726
|
+
* 'vendorDependency' tracks a fix that depends on a vendor releasing a patch or update.
|
|
677
727
|
*/
|
|
678
728
|
type: PoamType;
|
|
679
729
|
[property: string]: any;
|
|
@@ -803,11 +853,13 @@ export interface VerificationMethod {
|
|
|
803
853
|
/**
|
|
804
854
|
* The type of POA&M. 'remediation' fixes root cause. 'mitigation' reduces risk via
|
|
805
855
|
* compensating controls. 'riskAcceptance' documents decision to accept risk.
|
|
856
|
+
* 'vendorDependency' tracks a fix that depends on a vendor releasing a patch or update.
|
|
806
857
|
*/
|
|
807
858
|
export enum PoamType {
|
|
808
859
|
Mitigation = "mitigation",
|
|
809
860
|
Remediation = "remediation",
|
|
810
861
|
RiskAcceptance = "riskAcceptance",
|
|
862
|
+
VendorDependency = "vendorDependency",
|
|
811
863
|
}
|
|
812
864
|
|
|
813
865
|
/**
|
|
@@ -903,30 +955,34 @@ export interface SourceLocation {
|
|
|
903
955
|
}
|
|
904
956
|
|
|
905
957
|
/**
|
|
906
|
-
* An intentional change to a requirement's compliance status
|
|
907
|
-
*
|
|
908
|
-
* have an expiration date to enforce periodic review.
|
|
958
|
+
* An intentional change to a requirement's compliance status and/or impact score. At least
|
|
959
|
+
* one of status or impact must be set. Overrides change the effectiveStatus or impact of
|
|
960
|
+
* the requirement. All overrides must have an expiration date to enforce periodic review.
|
|
909
961
|
*/
|
|
910
962
|
export interface StatusOverride {
|
|
911
963
|
/**
|
|
912
|
-
* Timestamp when this
|
|
964
|
+
* Timestamp when this override was applied. ISO 8601 format.
|
|
913
965
|
*/
|
|
914
966
|
appliedAt: Date;
|
|
915
967
|
/**
|
|
916
|
-
* Identity of who applied this
|
|
917
|
-
*
|
|
968
|
+
* Identity of who applied this override. For simple cases, use type 'simple' with just an
|
|
969
|
+
* identifier.
|
|
918
970
|
*/
|
|
919
971
|
appliedBy: Identity;
|
|
920
972
|
/**
|
|
921
|
-
* Supporting evidence for this
|
|
973
|
+
* Supporting evidence for this override, such as screenshots demonstrating manual
|
|
922
974
|
* verification for attestations.
|
|
923
975
|
*/
|
|
924
976
|
evidence?: Evidence[];
|
|
925
977
|
/**
|
|
926
|
-
* Timestamp when this
|
|
927
|
-
* permanent
|
|
978
|
+
* Timestamp when this override expires and must be reviewed/renewed. REQUIRED - no
|
|
979
|
+
* permanent overrides allowed. ISO 8601 format.
|
|
928
980
|
*/
|
|
929
981
|
expiresAt: Date;
|
|
982
|
+
/**
|
|
983
|
+
* Override to the requirement's impact score. At least one of status or impact must be set.
|
|
984
|
+
*/
|
|
985
|
+
impact?: ImpactOverride;
|
|
930
986
|
/**
|
|
931
987
|
* SHA-256 checksum of the previous amendment in chronological order. Creates a
|
|
932
988
|
* tamper-evident chain of amendments (similar to blockchain). Null for the first amendment
|
|
@@ -934,7 +990,7 @@ export interface StatusOverride {
|
|
|
934
990
|
*/
|
|
935
991
|
previousChecksum?: Checksum;
|
|
936
992
|
/**
|
|
937
|
-
* Explanation for why this
|
|
993
|
+
* Explanation for why this override was applied.
|
|
938
994
|
*/
|
|
939
995
|
reason: string;
|
|
940
996
|
/**
|
|
@@ -944,31 +1000,30 @@ export interface StatusOverride {
|
|
|
944
1000
|
*/
|
|
945
1001
|
signature?: Signature;
|
|
946
1002
|
/**
|
|
947
|
-
* The new status this override sets for the requirement.
|
|
948
|
-
*
|
|
1003
|
+
* The new status this override sets for the requirement. Optional when only impact is being
|
|
1004
|
+
* overridden.
|
|
949
1005
|
*/
|
|
950
|
-
status
|
|
1006
|
+
status?: ResultStatus;
|
|
951
1007
|
/**
|
|
952
|
-
* The type of
|
|
1008
|
+
* The type of override applied to this requirement.
|
|
953
1009
|
*/
|
|
954
1010
|
type: OverrideType;
|
|
955
1011
|
[property: string]: any;
|
|
956
1012
|
}
|
|
957
1013
|
|
|
958
1014
|
/**
|
|
959
|
-
*
|
|
1015
|
+
* Override to the requirement's impact score. At least one of status or impact must be
|
|
1016
|
+
* set.
|
|
960
1017
|
*
|
|
961
|
-
*
|
|
962
|
-
*
|
|
963
|
-
* (no status change). 'inherited': control provided by another component or system
|
|
964
|
-
* (overrides to notApplicable/passed).
|
|
1018
|
+
* An override to the requirement's impact score. The prior impact is the original result
|
|
1019
|
+
* value or the preceding override in the chain.
|
|
965
1020
|
*/
|
|
966
|
-
export
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1021
|
+
export interface ImpactOverride {
|
|
1022
|
+
/**
|
|
1023
|
+
* The overridden impact score (0.0–1.0).
|
|
1024
|
+
*/
|
|
1025
|
+
value: number;
|
|
1026
|
+
[property: string]: any;
|
|
972
1027
|
}
|
|
973
1028
|
|
|
974
1029
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mitre/hdf-schema",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.1.0-rc.1",
|
|
4
4
|
"description": "JSON schemas and multi-language type definitions for Heimdall Data Format (HDF)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -10,64 +10,45 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
15
|
},
|
|
16
16
|
"./helpers": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"types": "./dist/helpers.d.ts",
|
|
18
|
+
"import": "./dist/helpers.js"
|
|
19
19
|
},
|
|
20
20
|
"./hdf-results": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"types": "./dist/ts/hdf-results.d.ts",
|
|
22
|
+
"import": "./dist/ts/hdf-results.js"
|
|
23
23
|
},
|
|
24
24
|
"./hdf-baseline": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"types": "./dist/ts/hdf-baseline.d.ts",
|
|
26
|
+
"import": "./dist/ts/hdf-baseline.js"
|
|
27
27
|
},
|
|
28
28
|
"./hdf-comparison": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"types": "./dist/ts/hdf-comparison.d.ts",
|
|
30
|
+
"import": "./dist/ts/hdf-comparison.js"
|
|
31
31
|
},
|
|
32
32
|
"./hdf-system": {
|
|
33
|
-
"
|
|
34
|
-
"
|
|
33
|
+
"types": "./dist/ts/hdf-system.d.ts",
|
|
34
|
+
"import": "./dist/ts/hdf-system.js"
|
|
35
35
|
},
|
|
36
36
|
"./hdf-plan": {
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"types": "./dist/ts/hdf-plan.d.ts",
|
|
38
|
+
"import": "./dist/ts/hdf-plan.js"
|
|
39
39
|
},
|
|
40
40
|
"./hdf-amendments": {
|
|
41
|
-
"
|
|
42
|
-
"
|
|
41
|
+
"types": "./dist/ts/hdf-amendments.d.ts",
|
|
42
|
+
"import": "./dist/ts/hdf-amendments.js"
|
|
43
43
|
},
|
|
44
44
|
"./hdf-evidence-package": {
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
}
|
|
48
|
-
"./schemas/*": "./src/schemas/*"
|
|
45
|
+
"types": "./dist/ts/hdf-evidence-package.d.ts",
|
|
46
|
+
"import": "./dist/ts/hdf-evidence-package.js"
|
|
47
|
+
}
|
|
49
48
|
},
|
|
50
49
|
"files": [
|
|
51
|
-
"dist"
|
|
52
|
-
"src/schemas"
|
|
50
|
+
"dist"
|
|
53
51
|
],
|
|
54
|
-
"scripts": {
|
|
55
|
-
"build": "pnpm run clean && pnpm run build:schemas && pnpm run build:types && pnpm run build:index",
|
|
56
|
-
"build:schemas": "node --import tsx src/bundle-schemas.ts",
|
|
57
|
-
"build:types": "node --import tsx src/generate-types.ts",
|
|
58
|
-
"build:index": "node --import tsx src/create-index.ts",
|
|
59
|
-
"watch:schemas": "nodemon --watch src/schemas --ext json --exec 'tsx src/bundle-schemas.ts'",
|
|
60
|
-
"serve:schemas": "npx http-server dist/schemas -p 8081 --cors",
|
|
61
|
-
"dev:viewer": "pnpm run build:schemas && concurrently \"pnpm run watch:schemas\" \"pnpm run serve:schemas\"",
|
|
62
|
-
"clean": "rimraf dist",
|
|
63
|
-
"test": "pnpm run test:ts",
|
|
64
|
-
"test:ts": "vitest run",
|
|
65
|
-
"test:go": "echo 'No Go tests in hdf-schema'",
|
|
66
|
-
"test:watch": "vitest",
|
|
67
|
-
"test:coverage": "vitest run --coverage",
|
|
68
|
-
"lint": "eslint src test",
|
|
69
|
-
"lint:fix": "eslint src test --fix"
|
|
70
|
-
},
|
|
71
52
|
"repository": {
|
|
72
53
|
"type": "git",
|
|
73
54
|
"url": "https://github.com/mitre/hdf-libs.git",
|
|
@@ -77,7 +58,8 @@
|
|
|
77
58
|
"license": "Apache-2.0",
|
|
78
59
|
"dependencies": {
|
|
79
60
|
"ajv": "^8.17.0",
|
|
80
|
-
"ajv-formats": "^3.0.0"
|
|
61
|
+
"ajv-formats": "^3.0.0",
|
|
62
|
+
"@mitre/hdf-utilities": "^3.1.0-rc.1"
|
|
81
63
|
},
|
|
82
64
|
"devDependencies": {
|
|
83
65
|
"@hyperjump/json-schema": "^1.17.2",
|
|
@@ -88,7 +70,7 @@
|
|
|
88
70
|
"tsx": "^4.20.6"
|
|
89
71
|
},
|
|
90
72
|
"engines": {
|
|
91
|
-
"node": ">=
|
|
73
|
+
"node": ">=22.0.0"
|
|
92
74
|
},
|
|
93
75
|
"keywords": [
|
|
94
76
|
"hdf",
|
|
@@ -98,5 +80,23 @@
|
|
|
98
80
|
"inspec",
|
|
99
81
|
"stig",
|
|
100
82
|
"compliance"
|
|
101
|
-
]
|
|
102
|
-
|
|
83
|
+
],
|
|
84
|
+
"scripts": {
|
|
85
|
+
"build": "pnpm run clean && pnpm run build:schemas && pnpm run build:types && pnpm run build:index",
|
|
86
|
+
"build:schemas": "node --import tsx src/bundle-schemas.ts",
|
|
87
|
+
"build:types": "node --import tsx src/generate-types.ts",
|
|
88
|
+
"build:index": "node --import tsx src/create-index.ts",
|
|
89
|
+
"watch:schemas": "nodemon --watch src/schemas --ext json --exec 'tsx src/bundle-schemas.ts'",
|
|
90
|
+
"serve:schemas": "npx http-server dist/schemas -p 8081 --cors",
|
|
91
|
+
"dev:viewer": "pnpm run build:schemas && concurrently \"pnpm run watch:schemas\" \"pnpm run serve:schemas\"",
|
|
92
|
+
"clean": "rimraf dist",
|
|
93
|
+
"test": "pnpm run test:ts",
|
|
94
|
+
"test:ts": "vitest run",
|
|
95
|
+
"test:go": "echo 'No Go tests in hdf-schema'",
|
|
96
|
+
"test:watch": "vitest",
|
|
97
|
+
"test:coverage": "vitest run --coverage",
|
|
98
|
+
"type-check": "tsc --noEmit",
|
|
99
|
+
"lint": "eslint src test",
|
|
100
|
+
"lint:fix": "eslint src test --fix"
|
|
101
|
+
}
|
|
102
|
+
}
|