@mitre/hdf-schema 3.5.0 → 3.6.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/dist/ts/hdf.ts CHANGED
@@ -262,11 +262,13 @@ export interface ExternalReference {
262
262
  description?: string;
263
263
  /**
264
264
  * Optional lossless embedded copy of the referenced artifact — the raw STIX object, EPSS
265
- * record, advisory, or annotation payload — preserved verbatim. Composes with
266
- * `href`/`externalId` (which point at the artifact) and `checksum` (which ties the copy to
267
- * the source): a single entry can both point and embed. HDF stays payload-agnostic — the
268
- * content is carried untouched, never normalized into HDF fields — so this does not
269
- * duplicate the source ontology (e.g. STIX rides here unchanged).
265
+ * record, advisory, or annotation payload — preserved verbatim.
266
+ *
267
+ * Composes with `href`/`externalId` (which point at the artifact) and `checksum` (which
268
+ * ties the copy to the source): a single entry can both point and embed.
269
+ *
270
+ * HDF stays payload-agnostic — the content is carried untouched, never normalized into HDF
271
+ * fields — so this does not duplicate the source ontology (e.g. STIX rides here unchanged).
270
272
  */
271
273
  document?: { [key: string]: any };
272
274
  /**
@@ -283,10 +285,15 @@ export interface ExternalReference {
283
285
  href?: string;
284
286
  /**
285
287
  * Open token classifying the referenced/embedded payload, turning a bare reference into an
286
- * enrichment envelope. Deliberately open (like `sourceName`/`rel`), not a closed enum.
288
+ * enrichment envelope.
289
+ *
290
+ * Deliberately open (like `sourceName`/`rel`), not a closed enum.
291
+ *
287
292
  * Documented starter vocabulary: 'threat-intel' (STIX/CTI object), 'annotation' (human
288
293
  * triage note), 'exploitation' (EPSS/KEV signal carried as context), 'advisory'
289
- * (vendor/security advisory). Use the `x-` prefix for custom kinds.
294
+ * (vendor/security advisory).
295
+ *
296
+ * Use the `x-` prefix for custom kinds.
290
297
  */
291
298
  kind?: string;
292
299
  /**
@@ -326,26 +333,28 @@ export interface Identity {
326
333
  */
327
334
  identifier: string;
328
335
  /**
329
- * The type of identifier. Use 'email' for email addresses, 'username' for user accounts,
330
- * 'system' for deterministic non-interactive automation (CI jobs, cron, scanners), 'agent'
331
- * for an AI/LLM agent acting with autonomy — kept distinct from 'system' so auditors can
332
- * apply AI-specific scrutiny (e.g. 'an LLM proposed this' vs a deterministic job) and
333
- * satisfy AI-source disclosure under frameworks like the EU AI Act and NIST AI RMF,
334
- * 'simple' for basic string identifiers without additional classification, or 'other' for
335
- * custom identity systems.
336
+ * The type of identifier.
337
+ *
338
+ * Use 'email' for email addresses, 'username' for user accounts, 'system' for deterministic
339
+ * non-interactive automation (CI jobs, cron, scanners), 'agent' for an AI/LLM agent acting
340
+ * with autonomy — kept distinct from 'system' so auditors can apply AI-specific scrutiny
341
+ * (e.g. 'an LLM proposed this' vs a deterministic job) and satisfy AI-source disclosure
342
+ * under frameworks like the EU AI Act and NIST AI RMF, 'simple' for basic string
343
+ * identifiers without additional classification, or 'other' for custom identity systems.
336
344
  */
337
345
  type: IdentityType;
338
346
  [property: string]: any;
339
347
  }
340
348
 
341
349
  /**
342
- * The type of identifier. Use 'email' for email addresses, 'username' for user accounts,
343
- * 'system' for deterministic non-interactive automation (CI jobs, cron, scanners), 'agent'
344
- * for an AI/LLM agent acting with autonomy — kept distinct from 'system' so auditors can
345
- * apply AI-specific scrutiny (e.g. 'an LLM proposed this' vs a deterministic job) and
346
- * satisfy AI-source disclosure under frameworks like the EU AI Act and NIST AI RMF,
347
- * 'simple' for basic string identifiers without additional classification, or 'other' for
348
- * custom identity systems.
350
+ * The type of identifier.
351
+ *
352
+ * Use 'email' for email addresses, 'username' for user accounts, 'system' for deterministic
353
+ * non-interactive automation (CI jobs, cron, scanners), 'agent' for an AI/LLM agent acting
354
+ * with autonomy — kept distinct from 'system' so auditors can apply AI-specific scrutiny
355
+ * (e.g. 'an LLM proposed this' vs a deterministic job) and satisfy AI-source disclosure
356
+ * under frameworks like the EU AI Act and NIST AI RMF, 'simple' for basic string
357
+ * identifiers without additional classification, or 'other' for custom identity systems.
349
358
  */
350
359
  export enum IdentityType {
351
360
  Agent = "agent",
@@ -559,12 +568,17 @@ export interface EvaluatedRequirement {
559
568
  disposition?: OverrideType;
560
569
  /**
561
570
  * Checksum of this requirement's resolved effective posture, for per-control change
562
- * detection in continuous monitoring. sha256 over the canonical JSON object with keys
563
- * status, impact, disposition (in that order), holding the resolved effective status,
564
- * resolved effective impact, and governing override type (null when nothing governs), with
565
- * override expiry anchored to the document timestamp. Flips exactly when the operative
566
- * status, impact, or disposition changes; stable under all other churn (result details,
567
- * timestamps, tags). Optional; stamped by tooling (hdf convert, hdf amend apply).
571
+ * detection in continuous monitoring.
572
+ *
573
+ * sha256 over the canonical JSON object with keys status, impact, disposition (in that
574
+ * order), holding the resolved effective status, resolved effective impact, and governing
575
+ * override type (null when nothing governs), with override expiry anchored to the document
576
+ * timestamp.
577
+ *
578
+ * Flips exactly when the operative status, impact, or disposition changes; stable under all
579
+ * other churn (result details, timestamps, tags).
580
+ *
581
+ * Optional; stamped by tooling (hdf convert, hdf amend apply).
568
582
  */
569
583
  effectiveChecksum?: Checksum;
570
584
  /**
@@ -634,10 +648,14 @@ export interface EvaluatedRequirement {
634
648
  */
635
649
  tags: { [key: string]: any };
636
650
  /**
637
- * Whether the requirement is mandatory within its baseline. Distinct from severity (risk
638
- * weight) and status (lifecycle state). Maps cleanly onto: FedRAMP rev5 OSCAL 'CORE' prop,
639
- * FedRAMP 20x inline 'Optional:' markers, CMMC sublevel rows, and CIS Implementation Group
640
- * memberships (IG1/IG2/IG3 may carry richer semantics; layer those onto props[]/tags{}).
651
+ * Whether the requirement is mandatory within its baseline.
652
+ *
653
+ * Distinct from severity (risk weight) and status (lifecycle state).
654
+ *
655
+ * Maps cleanly onto: FedRAMP rev5 OSCAL 'CORE' prop, FedRAMP 20x inline 'Optional:'
656
+ * markers, CMMC sublevel rows, and CIS Implementation Group memberships (IG1/IG2/IG3 may
657
+ * carry richer semantics; layer those onto props[]/tags{}).
658
+ *
641
659
  * Optional: when omitted, consumers should treat the requirement as 'required' by
642
660
  * convention.
643
661
  */
@@ -651,11 +669,15 @@ export interface EvaluatedRequirement {
651
669
  code?: string;
652
670
  /**
653
671
  * Classification of the control's nature, aligning with NIST SP 800-53 / SP 800-53A
654
- * categories. 'policy' = an authored governance statement; 'procedure' = a documented
655
- * process; 'technical' = an enforced technical configuration; 'management' = a
672
+ * categories.
673
+ *
674
+ * 'policy' = an authored governance statement; 'procedure' = a documented process;
675
+ * 'technical' = an enforced technical configuration; 'management' = a
656
676
  * programmatic/management activity; 'operational' = a recurring operational activity (e.g.
657
- * AT, IR, MA families). Optional: when omitted, consumers may infer heuristically from
658
- * family/id but should not assume a default.
677
+ * AT, IR, MA families).
678
+ *
679
+ * Optional: when omitted, consumers may infer heuristically from family/id but should not
680
+ * assume a default.
659
681
  */
660
682
  controlType?: ControlType;
661
683
  /**
@@ -674,12 +696,17 @@ export interface EvaluatedRequirement {
674
696
  */
675
697
  title?: string;
676
698
  /**
677
- * How this requirement is intended to be verified. Disambiguates the two cases that null
678
- * 'code' overloads: 'manual-by-design' (the requirement is statement-form and not amenable
679
- * to automation, e.g. FedRAMP 20x KSIs); 'manual-pending-automation' (automation could
680
- * exist but does not yet, e.g. a STIG rule lacking a fix). 'automated' = a check exists and
681
- * runs without operator action; 'hybrid' = part automated, part manual. Optional: when
682
- * omitted, consumers should not infer a default.
699
+ * How this requirement is intended to be verified.
700
+ *
701
+ * Disambiguates the two cases that null 'code' overloads: 'manual-by-design' (the
702
+ * requirement is statement-form and not amenable to automation, e.g. FedRAMP 20x KSIs);
703
+ * 'manual-pending-automation' (automation could exist but does not yet, e.g. a STIG rule
704
+ * lacking a fix).
705
+ *
706
+ * 'automated' = a check exists and runs without operator action; 'hybrid' = part automated,
707
+ * part manual.
708
+ *
709
+ * Optional: when omitted, consumers should not infer a default.
683
710
  */
684
711
  verificationMethod?: VerificationMethodEnum;
685
712
  [property: string]: any;
@@ -700,7 +727,7 @@ export interface AffectedPackage {
700
727
  * Optional CPE 2.3 URI identifying the affected product. Validated leniently: only the
701
728
  * 'cpe:2.3:' prefix and the part-type letter ('a' application, 'h' hardware, 'o' operating
702
729
  * system) are enforced here. Use `hdf-utilities.parseCpe` for full-grammar parsing.
703
- * Example: 'cpe:2.3:a:openssl:openssl:1.1.1k:*:*:*:*:*:*:*'.
730
+ * Example: `cpe:2.3:a:openssl:openssl:1.1.1k:*:*:*:*:*:*:*`.
704
731
  */
705
732
  cpe?: string;
706
733
  /**
@@ -720,11 +747,16 @@ export interface AffectedPackage {
720
747
  */
721
748
  name?: string;
722
749
  /**
723
- * Optional Package URL (PURL) identifying the affected package. Validated leniently: only
724
- * the 'pkg:TYPE/' scheme prefix is enforced here, where TYPE follows the PURL grammar (a
725
- * letter followed by letters, digits, '.', '+', or '-') and is matched case-insensitively
726
- * to mirror `hdf-utilities.parsePurl`'s accept-and-warn behavior. Use `parsePurl` for full
727
- * PURL parsing. Example: 'pkg:rpm/redhat/openssl@1.1.1k-7.el8_4?arch=x86_64'.
750
+ * Optional Package URL (PURL) identifying the affected package.
751
+ *
752
+ * Validated leniently: only the 'pkg:TYPE/' scheme prefix is enforced here, where TYPE
753
+ * follows the PURL grammar (a letter followed by letters, digits, '.', '+', or '-') and is
754
+ * matched case-insensitively to mirror `hdf-utilities.parsePurl`'s accept-and-warn
755
+ * behavior.
756
+ *
757
+ * Use `parsePurl` for full PURL parsing.
758
+ *
759
+ * Example: 'pkg:rpm/redhat/openssl@1.1.1k-7.el8_4?arch=x86_64'.
728
760
  */
729
761
  purl?: string;
730
762
  /**
@@ -754,10 +786,14 @@ export enum Ecosystem {
754
786
  }
755
787
 
756
788
  /**
757
- * Whether the requirement is mandatory within its baseline. Distinct from severity (risk
758
- * weight) and status (lifecycle state). Maps cleanly onto: FedRAMP rev5 OSCAL 'CORE' prop,
759
- * FedRAMP 20x inline 'Optional:' markers, CMMC sublevel rows, and CIS Implementation Group
760
- * memberships (IG1/IG2/IG3 may carry richer semantics; layer those onto props[]/tags{}).
789
+ * Whether the requirement is mandatory within its baseline.
790
+ *
791
+ * Distinct from severity (risk weight) and status (lifecycle state).
792
+ *
793
+ * Maps cleanly onto: FedRAMP rev5 OSCAL 'CORE' prop, FedRAMP 20x inline 'Optional:'
794
+ * markers, CMMC sublevel rows, and CIS Implementation Group memberships (IG1/IG2/IG3 may
795
+ * carry richer semantics; layer those onto props[]/tags{}).
796
+ *
761
797
  * Optional: when omitted, consumers should treat the requirement as 'required' by
762
798
  * convention.
763
799
  */
@@ -769,11 +805,15 @@ export enum Applicability {
769
805
 
770
806
  /**
771
807
  * Classification of the control's nature, aligning with NIST SP 800-53 / SP 800-53A
772
- * categories. 'policy' = an authored governance statement; 'procedure' = a documented
773
- * process; 'technical' = an enforced technical configuration; 'management' = a
808
+ * categories.
809
+ *
810
+ * 'policy' = an authored governance statement; 'procedure' = a documented process;
811
+ * 'technical' = an enforced technical configuration; 'management' = a
774
812
  * programmatic/management activity; 'operational' = a recurring operational activity (e.g.
775
- * AT, IR, MA families). Optional: when omitted, consumers may infer heuristically from
776
- * family/id but should not assume a default.
813
+ * AT, IR, MA families).
814
+ *
815
+ * Optional: when omitted, consumers may infer heuristically from family/id but should not
816
+ * assume a default.
777
817
  */
778
818
  export enum ControlType {
779
819
  Management = "management",
@@ -804,11 +844,15 @@ export interface Cvss {
804
844
  baseSeverity?: CVSSSeverity;
805
845
  /**
806
846
  * Optional Base metric group vector string as emitted by the source (e.g.,
807
- * 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'). For CVSS 2.0 the version prefix is
808
- * omitted. Some vendor tools emit a final baseScore without the vector — in that case this
809
- * field is absent and the score cannot be recomputed or decomposed. The pattern accepts any
810
- * version-prefixed or prefix-less metric token sequence; semantic validity of individual
811
- * metrics is checked by hdf-utilities, not by the schema.
847
+ * 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H').
848
+ *
849
+ * For CVSS 2.0 the version prefix is omitted.
850
+ *
851
+ * Some vendor tools emit a final baseScore without the vector — in that case this field is
852
+ * absent and the score cannot be recomputed or decomposed.
853
+ *
854
+ * The pattern accepts any version-prefixed or prefix-less metric token sequence; semantic
855
+ * validity of individual metrics is checked by hdf-utilities, not by the schema.
812
856
  */
813
857
  baseVector?: string;
814
858
  /**
@@ -899,19 +943,19 @@ export interface Description {
899
943
  }
900
944
 
901
945
  /**
902
- * The type of amendment, aligned with FedRAMP deviation request categories. 'waiver': risk accepted
903
- * by Authorizing Official. 'attestation': manually verified by assessor. 'poam': remediation
904
- * tracked (no status change). 'inherited': control provided by another component or system.
905
- * 'falsePositive': scanner incorrectly identified a finding — for compliance scans (STIG, CIS), the
906
- * check actually passes, so status is typically set to 'passed'; for vulnerability scans (CVE,
907
- * SCA), the flagged vulnerability does not apply to this system, so status is typically set to
908
- * 'notApplicable'. The disposition field on the requirement distinguishes false positives from
909
- * genuinely not-applicable findings. 'riskAdjustment': impact score adjusted based on environmental
910
- * context (FedRAMP Risk Adjustment); does not change pass/fail status, only impact via the impact
911
- * field. 'operationalRequirement': deviation required by operational constraints (FedRAMP
912
- * Operational Requirement); the finding cannot be remediated because the system requires the
913
- * affected functionality. Remains an open risk. Migration note: 'exception' was removed in v3.1.0 —
914
- * use 'waiver' with status 'notApplicable' instead.
946
+ * The type of amendment, aligned with FedRAMP deviation request categories. - 'waiver': risk
947
+ * accepted by Authorizing Official. - 'attestation': manually verified by assessor. - 'poam':
948
+ * remediation tracked (no status change). - 'inherited': control provided by another component or
949
+ * system. - 'falsePositive': scanner incorrectly identified a finding — for compliance scans (STIG,
950
+ * CIS), the check actually passes, so status is typically set to 'passed'; for vulnerability scans
951
+ * (CVE, SCA), the flagged vulnerability does not apply to this system, so status is typically set
952
+ * to 'notApplicable'. The disposition field on the requirement distinguishes false positives from
953
+ * genuinely not-applicable findings. - 'riskAdjustment': impact score adjusted based on
954
+ * environmental context (FedRAMP Risk Adjustment); does not change pass/fail status, only impact
955
+ * via the impact field. - 'operationalRequirement': deviation required by operational constraints
956
+ * (FedRAMP Operational Requirement); the finding cannot be remediated because the system requires
957
+ * the affected functionality. Remains an open risk. Migration note: 'exception' was removed in
958
+ * v3.1.0 — use 'waiver' with status 'notApplicable' instead.
915
959
  */
916
960
  export enum OverrideType {
917
961
  Attestation = "attestation",
@@ -1498,11 +1542,16 @@ export interface Component {
1498
1542
  inputOverrides?: InputOverride[];
1499
1543
  /**
1500
1544
  * Cryptographic integrity of this component's underlying artifact — model weights or
1501
- * shards, dataset archive, container image, or package bytes. An array supports
1502
- * multi-file/sharded artifacts. This is the single, generic home for artifact/subject
1503
- * integrity across all component types (it replaced the former per-type Container_Image
1504
- * digest and Artifact checksum fields). Distinct from BOM-document integrity (Bom.hashes[])
1505
- * and from the document tamper-evidence Integrity type.
1545
+ * shards, dataset archive, container image, or package bytes.
1546
+ *
1547
+ * An array supports multi-file/sharded artifacts.
1548
+ *
1549
+ * This is the single, generic home for artifact/subject integrity across all component
1550
+ * types (it replaced the former per-type Container_Image digest and Artifact checksum
1551
+ * fields).
1552
+ *
1553
+ * Distinct from BOM-document integrity (Bom.hashes[]) and from the document tamper-evidence
1554
+ * Integrity type.
1506
1555
  */
1507
1556
  integrity?: Checksum[];
1508
1557
  /**
@@ -2262,10 +2311,13 @@ export interface Tool {
2262
2311
  * The named format of the source data, when it follows a recognized format specification
2263
2312
  * with its own identity: an interchange format emitted by many tools ('SARIF', 'XCCDF',
2264
2313
  * 'OSCAL') or one of several named output formats a single tool produces ('FVDL',
2265
- * 'exec-json', 'FPF'). Never a serialization structure — 'JSON', 'XML', and 'CSV' are
2266
- * encodings, not formats. Omit for a tool's native output: an absent format means the
2267
- * tool's own shape, and data arriving as a named format is converted by that format's
2268
- * converter, which sets this field alongside the producing tool's name.
2314
+ * 'exec-json', 'FPF').
2315
+ *
2316
+ * Never a serialization structure — 'JSON', 'XML', and 'CSV' are encodings, not formats.
2317
+ *
2318
+ * Omit for a tool's native output: an absent format means the tool's own shape, and data
2319
+ * arriving as a named format is converted by that format's converter, which sets this field
2320
+ * alongside the producing tool's name.
2269
2321
  */
2270
2322
  format?: string;
2271
2323
  /**
@@ -2397,10 +2449,14 @@ export interface BaselineRequirement {
2397
2449
  */
2398
2450
  tags: { [key: string]: any };
2399
2451
  /**
2400
- * Whether the requirement is mandatory within its baseline. Distinct from severity (risk
2401
- * weight) and status (lifecycle state). Maps cleanly onto: FedRAMP rev5 OSCAL 'CORE' prop,
2402
- * FedRAMP 20x inline 'Optional:' markers, CMMC sublevel rows, and CIS Implementation Group
2403
- * memberships (IG1/IG2/IG3 may carry richer semantics; layer those onto props[]/tags{}).
2452
+ * Whether the requirement is mandatory within its baseline.
2453
+ *
2454
+ * Distinct from severity (risk weight) and status (lifecycle state).
2455
+ *
2456
+ * Maps cleanly onto: FedRAMP rev5 OSCAL 'CORE' prop, FedRAMP 20x inline 'Optional:'
2457
+ * markers, CMMC sublevel rows, and CIS Implementation Group memberships (IG1/IG2/IG3 may
2458
+ * carry richer semantics; layer those onto props[]/tags{}).
2459
+ *
2404
2460
  * Optional: when omitted, consumers should treat the requirement as 'required' by
2405
2461
  * convention.
2406
2462
  */
@@ -2414,11 +2470,15 @@ export interface BaselineRequirement {
2414
2470
  code?: string;
2415
2471
  /**
2416
2472
  * Classification of the control's nature, aligning with NIST SP 800-53 / SP 800-53A
2417
- * categories. 'policy' = an authored governance statement; 'procedure' = a documented
2418
- * process; 'technical' = an enforced technical configuration; 'management' = a
2473
+ * categories.
2474
+ *
2475
+ * 'policy' = an authored governance statement; 'procedure' = a documented process;
2476
+ * 'technical' = an enforced technical configuration; 'management' = a
2419
2477
  * programmatic/management activity; 'operational' = a recurring operational activity (e.g.
2420
- * AT, IR, MA families). Optional: when omitted, consumers may infer heuristically from
2421
- * family/id but should not assume a default.
2478
+ * AT, IR, MA families).
2479
+ *
2480
+ * Optional: when omitted, consumers may infer heuristically from family/id but should not
2481
+ * assume a default.
2422
2482
  */
2423
2483
  controlType?: ControlType;
2424
2484
  /**
@@ -2441,12 +2501,17 @@ export interface BaselineRequirement {
2441
2501
  */
2442
2502
  title?: string;
2443
2503
  /**
2444
- * How this requirement is intended to be verified. Disambiguates the two cases that null
2445
- * 'code' overloads: 'manual-by-design' (the requirement is statement-form and not amenable
2446
- * to automation, e.g. FedRAMP 20x KSIs); 'manual-pending-automation' (automation could
2447
- * exist but does not yet, e.g. a STIG rule lacking a fix). 'automated' = a check exists and
2448
- * runs without operator action; 'hybrid' = part automated, part manual. Optional: when
2449
- * omitted, consumers should not infer a default.
2504
+ * How this requirement is intended to be verified.
2505
+ *
2506
+ * Disambiguates the two cases that null 'code' overloads: 'manual-by-design' (the
2507
+ * requirement is statement-form and not amenable to automation, e.g. FedRAMP 20x KSIs);
2508
+ * 'manual-pending-automation' (automation could exist but does not yet, e.g. a STIG rule
2509
+ * lacking a fix).
2510
+ *
2511
+ * 'automated' = a check exists and runs without operator action; 'hybrid' = part automated,
2512
+ * part manual.
2513
+ *
2514
+ * Optional: when omitted, consumers should not infer a default.
2450
2515
  */
2451
2516
  verificationMethod?: VerificationMethodEnum;
2452
2517
  [property: string]: any;
@@ -3658,24 +3723,29 @@ export interface HDFAmendments {
3658
3723
  * branches gated on 'type': when type is 'operationalRequirement', neither 'status' nor 'impact'
3659
3724
  * may be set — the override records accepted risk without changing the finding
3660
3725
  * (documentation-only). For all other types, at least one of 'status' or 'impact' must be set. This
3661
- * rule aligns with: (1) OSCAL Assessment Results — finding.target.status and
3726
+ * rule aligns with: - OSCAL Assessment Results — finding.target.status and
3662
3727
  * finding.associated-risk[].facet[] are separate axes
3663
- * (https://pages.nist.gov/OSCAL/learn/concepts/layer/assessment/assessment-results/); (2) FedRAMP
3728
+ * (https://pages.nist.gov/OSCAL/learn/concepts/layer/assessment/assessment-results/) - FedRAMP
3664
3729
  * deviation request types — Risk Adjustment changes impact only, Operational Requirement documents
3665
3730
  * acceptance only, False Positive changes status
3666
- * (https://www.ignyteplatform.com/blog/fedramp/fedramp-deviation-requests-submit/); (3) NIST SP
3667
- * 800-37 RMF — risk response (accept/mitigate/transfer) is a separate step from control assessment
3668
- * status (https://csrc.nist.gov/pubs/sp/800/37/r2/final).
3731
+ * (https://www.ignyteplatform.com/blog/fedramp/fedramp-deviation-requests-submit/) - NIST SP 800-37
3732
+ * RMF — risk response (accept/mitigate/transfer) is a separate step from control assessment status
3733
+ * (https://csrc.nist.gov/pubs/sp/800/37/r2/final).
3669
3734
  */
3670
3735
  export interface StandaloneOverride {
3671
3736
  /**
3672
3737
  * Software packages this amendment is scoped to, distinct from componentRef (which scopes
3673
- * to an HDF-internal Component by UUID). Use when the source amendment format references
3674
- * packages by purl/cpe/name+version — e.g., VEX `affects[]` / `products[]`, OSCAL POA&M
3675
- * `subjects[]`, FedRAMP component-aware amendments. Symmetric with
3676
- * Evaluated_Requirement.affectedPackages, which scopes findings to the same package
3677
- * vocabulary. When omitted, the amendment applies system-wide (or only to componentRef when
3678
- * that is set).
3738
+ * to an HDF-internal Component by UUID).
3739
+ *
3740
+ * Use when the source amendment format references packages by purl/cpe/name+version — e.g.,
3741
+ * VEX `affects[]` / `products[]`, OSCAL POA&M `subjects[]`, FedRAMP component-aware
3742
+ * amendments.
3743
+ *
3744
+ * Symmetric with Evaluated_Requirement.affectedPackages, which scopes findings to the same
3745
+ * package vocabulary.
3746
+ *
3747
+ * When omitted, the amendment applies system-wide (or only to componentRef when that is
3748
+ * set).
3679
3749
  */
3680
3750
  affectedPackages?: AffectedPackage[];
3681
3751
  /**
@@ -4076,10 +4146,12 @@ export interface HDFRequirementChangeEvent {
4076
4146
  /**
4077
4147
  * The effectiveChecksum of the entity state this event supersedes, forming a per-key hash
4078
4148
  * chain: a mismatch or gap against stored state is detectable, letting a consumer mark the
4079
- * key unverified instead of serving stale posture. Null at chain start (no prior state,
4080
- * e.g. a new entity or the first event after a seed). The chain provides tamper/gap
4081
- * evidence given a trusted head; completeness is anchored out-of-band by periodic
4082
- * re-centering rescans.
4149
+ * key unverified instead of serving stale posture.
4150
+ *
4151
+ * Null at chain start (no prior state, e.g. a new entity or the first event after a seed).
4152
+ *
4153
+ * The chain provides tamper/gap evidence given a trusted head; completeness is anchored
4154
+ * out-of-band by periodic re-centering rescans.
4083
4155
  */
4084
4156
  priorChecksum: any;
4085
4157
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mitre/hdf-schema",
3
- "version": "3.5.0",
3
+ "version": "3.6.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"
@@ -17,6 +17,10 @@
17
17
  "types": "./dist/helpers.d.ts",
18
18
  "import": "./dist/helpers.js"
19
19
  },
20
+ "./testhdf": {
21
+ "types": "./testhdf/index.d.ts",
22
+ "import": "./testhdf/index.js"
23
+ },
20
24
  "./hdf-results": {
21
25
  "types": "./dist/ts/hdf.d.ts",
22
26
  "import": "./dist/ts/hdf.js"
@@ -47,7 +51,9 @@
47
51
  }
48
52
  },
49
53
  "files": [
50
- "dist"
54
+ "dist",
55
+ "testhdf/index.js",
56
+ "testhdf/index.d.ts"
51
57
  ],
52
58
  "repository": {
53
59
  "type": "git",
@@ -59,7 +65,7 @@
59
65
  "dependencies": {
60
66
  "ajv": "^8.17.0",
61
67
  "ajv-formats": "^3.0.0",
62
- "@mitre/hdf-utilities": "^3.5.0"
68
+ "@mitre/hdf-utilities": "^3.6.0-rc.1"
63
69
  },
64
70
  "devDependencies": {
65
71
  "@hyperjump/json-schema": "^1.17.2",
@@ -93,7 +99,7 @@
93
99
  "clean": "rimraf dist",
94
100
  "test": "pnpm run test:ts",
95
101
  "test:ts": "vitest run",
96
- "test:go": "echo 'No Go tests in hdf-schema'",
102
+ "test:go": "cd testhdf/go && go test ./...",
97
103
  "test:watch": "vitest",
98
104
  "test:coverage": "vitest run --coverage",
99
105
  "type-check": "tsc --noEmit",
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Type definitions for the test-only HDF builders (index.js).
3
+ */
4
+ import type {
5
+ HDFResults,
6
+ EvaluatedBaseline,
7
+ EvaluatedRequirement,
8
+ RequirementResult,
9
+ } from '../dist/ts/hdf.js';
10
+
11
+ export interface ReqOptions {
12
+ severity?: string;
13
+ impact?: number;
14
+ status?: string;
15
+ tags?: Record<string, unknown>;
16
+ code?: string;
17
+ cwe?: string[];
18
+ title?: string;
19
+ /** codeDesc of the (default) result. */
20
+ codeDesc?: string;
21
+ /** startTime (ISO string) of the (default) result. */
22
+ startTime?: string;
23
+ /** Data for the default description. */
24
+ desc?: string;
25
+ /** Extra [label, data] descriptions appended after the default. */
26
+ addDesc?: Array<[string, string]>;
27
+ /** Replace the requirement's results wholesale. */
28
+ results?: RequirementResult[];
29
+ }
30
+
31
+ export function req(id: string, opts?: ReqOptions): EvaluatedRequirement;
32
+ export function baseline(name: string, ...reqs: EvaluatedRequirement[]): EvaluatedBaseline;
33
+ export function doc(...baselines: EvaluatedBaseline[]): HDFResults;
34
+ export function results(...reqs: EvaluatedRequirement[]): HDFResults;
35
+
36
+ import type {
37
+ HDFBaseline,
38
+ BaselineRequirement,
39
+ HDFAmendments,
40
+ StandaloneOverride,
41
+ HDFSystem,
42
+ Component,
43
+ HDFPlan,
44
+ Assessment,
45
+ HDFEvidencePackage,
46
+ ContentReference,
47
+ HDFRequirementChangeEvent,
48
+ HDFComparison,
49
+ } from '../dist/ts/hdf.js';
50
+
51
+ export interface BaselineReqOptions {
52
+ impact?: number;
53
+ tags?: Record<string, unknown>;
54
+ desc?: string;
55
+ }
56
+ export function baselineReq(id: string, opts?: BaselineReqOptions): BaselineRequirement;
57
+ export function baselineDoc(name: string, ...reqs: BaselineRequirement[]): HDFBaseline;
58
+
59
+ export interface OverrideOptions {
60
+ status?: string;
61
+ reason?: string;
62
+ appliedBy?: { type: string; identifier: string };
63
+ milestones?: unknown[];
64
+ }
65
+ export function override(type: string, reqId: string, opts?: OverrideOptions): StandaloneOverride;
66
+ export function amendments(name: string, ...overrides: StandaloneOverride[]): HDFAmendments;
67
+
68
+ export function component(name: string, type: string, opts?: Record<string, unknown>): Component;
69
+ export function system(name: string, ...components: Component[]): HDFSystem;
70
+
71
+ export function assessment(baselineRef: string): Assessment;
72
+ export function plan(name: string, ...assessments: Assessment[]): HDFPlan;
73
+
74
+ export function content(uri: string, type: string): ContentReference;
75
+ export function evidencePackage(name: string, ...contents: ContentReference[]): HDFEvidencePackage;
76
+
77
+ export interface ChangeEventOptions {
78
+ state?: string;
79
+ before?: unknown;
80
+ after?: unknown;
81
+ priorChecksum?: unknown;
82
+ }
83
+ export function changeEvent(reqId: string, opts?: ChangeEventOptions): HDFRequirementChangeEvent;
84
+
85
+ export function comparison(mode: string): HDFComparison;