@mitre/hdf-schema 3.7.2 → 3.8.0-next.42533588944.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
@@ -19,10 +19,10 @@ export interface HDFResults {
19
19
  */
20
20
  derivation?: Derivation;
21
21
  /**
22
- * Reserved for tool-specific data not defined in the HDF standard. Use this to preserve
23
- * original tool output, auxiliary data, or custom metadata.
22
+ * Producer data outside the HDF model, and the pre-converted source artifact(s) these
23
+ * results were converted from.
24
24
  */
25
- extensions?: { [key: string]: any };
25
+ extensions?: Extensions;
26
26
  /**
27
27
  * Optional references to external artifacts (CTI/STIX, BOMs, advisories, runbooks, or any
28
28
  * URI-addressable artifact) relevant to this assessment as a whole. Inert context; see
@@ -97,13 +97,10 @@ export interface EvaluatedBaseline {
97
97
  */
98
98
  depends?: Dependency[];
99
99
  /**
100
- * The description - should be more detailed than the summary.
100
+ * Producer data outside the HDF model that belongs to this baseline rather than to the
101
+ * document, and the pre-converted source artifact(s) this baseline was built from.
101
102
  */
102
- description?: string;
103
- /**
104
- * Reserved for tool-specific baseline metadata not defined in the HDF standard.
105
- */
106
- extensions?: { [key: string]: any };
103
+ extensions?: Extensions;
107
104
  /**
108
105
  * A set of descriptions for the requirement groups.
109
106
  */
@@ -135,8 +132,10 @@ export interface EvaluatedBaseline {
135
132
  requirements: EvaluatedRequirement[];
136
133
  /**
137
134
  * SHA-256 checksum of the raw results before any amendments (statusOverrides or POAMs).
138
- * Used to detect tampering with test results. Compare with currentChecksum to verify
139
- * amendment integrity.
135
+ * Used to detect tampering with test results. Amendment integrity is checked against the
136
+ * document-level preAmendmentChecksum at the root, not this per-baseline value: hdf amend
137
+ * apply writes it as the hash of the raw document bytes immediately before the most recent
138
+ * amendment application, one step back only.
140
139
  */
141
140
  resultsChecksum?: Checksum;
142
141
  /**
@@ -156,6 +155,11 @@ export interface EvaluatedBaseline {
156
155
  * The email address or other contact information of the copyright holder(s).
157
156
  */
158
157
  copyrightEmail?: string;
158
+ /**
159
+ * Prose description of the baseline, more detailed than summary. Carried verbatim, like
160
+ * every HDF prose field.
161
+ */
162
+ description?: string;
159
163
  /**
160
164
  * Optional references to external artifacts relevant to this baseline (CTI/STIX,
161
165
  * advisories, source catalogs, or any URI-addressable artifact). Travels with the baseline
@@ -242,6 +246,52 @@ export interface Dependency {
242
246
  [property: string]: any;
243
247
  }
244
248
 
249
+ /**
250
+ * Carrier for data outside the HDF model: `passthrough` for producer data HDF does not model,
251
+ * `rawSourceArtifacts` for the pre-converted input(s). CLOSED: these two members are the whole of
252
+ * it. A key HDF does not define goes inside `passthrough` — that is what `passthrough` is for — so
253
+ * `extensions` never becomes a second, unnamed schema that consumers must reverse-engineer from the
254
+ * producers that happen to write it. Closed with `additionalProperties` rather than the house
255
+ * `unevaluatedProperties` because this definition composes nothing, and the shipped Go validator is
256
+ * a draft-07 engine that does not implement `unevaluatedProperties` — a closure only one of the two
257
+ * validators enforces is not a closure. Declared on every HDF document type that carries a producer
258
+ * envelope (`generator` / `integrity`), and on `Evaluated_Baseline`, so one rule governs both
259
+ * sites.
260
+ */
261
+ export interface Extensions {
262
+ /**
263
+ * Catch-all for producer data that HDF does not model — the role heimdall2's
264
+ * `passthrough.auxiliary_data` played: fields a converter deliberately carried but had no
265
+ * home for.
266
+ *
267
+ * Deliberately permissive: unenumerated properties are accepted by design, with no shape
268
+ * imposed on them. HDF neither reads nor interprets what is here. It is the ONLY permissive
269
+ * surface in `extensions` — everything HDF does not define belongs here rather than beside
270
+ * it.
271
+ *
272
+ * This is NOT where the pre-converted source artifact goes. v2 put it here only because
273
+ * nothing else had room; `rawSourceArtifacts` is its home now, and it gives the bytes a
274
+ * checksum, a media type and a reference contract that an untyped object cannot.
275
+ *
276
+ * For data that belongs to one requirement rather than to the document, use that object's
277
+ * own fields — a document-level bag cannot say which requirement it describes.
278
+ */
279
+ passthrough?: { [key: string]: any };
280
+ /**
281
+ * The input(s) this document was converted from, verbatim.
282
+ *
283
+ * An array because a conversion can consume more than one artifact — the OSCAL profile path
284
+ * takes a profile and a catalog. Every other converter takes one input, and an array of one
285
+ * costs nothing.
286
+ *
287
+ * Populating this is required of ingest converters by policy, enforced by the converter
288
+ * contract and test harness rather than by a schema `required`: a tool that emits HDF
289
+ * natively has no source artifact, and requiring the field would make valid native HDF
290
+ * invalid.
291
+ */
292
+ rawSourceArtifacts?: ExternalReference[];
293
+ }
294
+
245
295
  /**
246
296
  * A generalized reference to any external artifact by identity and/or location, modeled on the STIX
247
297
  * 2.1 `external_references` common property. Purpose-agnostic: cite a CVE, an ATT&CK technique, a
@@ -249,8 +299,11 @@ export interface Dependency {
249
299
  * HDF reference category. `sourceName` names the system; `externalId` cites by id within that
250
300
  * system; `href` locates it. `sourceName` + `externalId` is equivalently a URN
251
301
  * (`urn:<sourceName>:<externalId>`, RFC 8141), so the by-identity and by-location forms stay
252
- * interconvertible. A reference is inert context: it overrides nothing, so it carries only
253
- * lightweight optional `addedBy`/`addedAt` attribution, never override machinery.
302
+ * interconvertible. An entry may also carry the artifact itself rather than point at it: `document`
303
+ * for a JSON object, `content` + `encoding` for anything else. Embedding satisfies the at-least-one
304
+ * rule on its own, so an artifact with no meaningful public location needs no synthetic `href`. A
305
+ * reference is inert context: it overrides nothing, so it carries only lightweight optional
306
+ * `addedBy`/`addedAt` attribution, never override machinery.
254
307
  */
255
308
  export interface ExternalReference {
256
309
  /**
@@ -263,18 +316,36 @@ export interface ExternalReference {
263
316
  */
264
317
  addedBy?: Identity;
265
318
  /**
266
- * Integrity hash of the referenced artifact. Reuses the HDF `Checksum` primitive (not STIX
267
- * `hashes`). Meaningful only with a retrievable `href`.
319
+ * Integrity hash of the artifact. Reuses the HDF `Checksum` primitive (not STIX `hashes`).
320
+ * Applies both to an artifact retrievable at `href` and to one embedded here in `content`
321
+ * or `document` — beside embedded bytes it is what makes the copy verifiable rather than
322
+ * merely present.
268
323
  */
269
324
  checksum?: Checksum;
325
+ /**
326
+ * Optional lossless embedded copy of the artifact's bytes as a string, for artifacts
327
+ * `document` cannot hold: XML, CSV, NDJSON, plain text, a JSON array, or bytes that are not
328
+ * valid UTF-8 text at all.
329
+ *
330
+ * `encoding` states how to read it back and is required alongside it. Set `mediaType` so a
331
+ * consumer knows what the bytes are, and `checksum` so the copy can be verified against the
332
+ * source.
333
+ *
334
+ * Carried verbatim — never reformatted, re-indented, or re-serialized.
335
+ */
336
+ content?: string;
270
337
  /**
271
338
  * Human-readable description of what is referenced. Satisfies the at-least-one rule on its
272
339
  * own when neither id nor href is available.
273
340
  */
274
341
  description?: string;
275
342
  /**
276
- * Optional lossless embedded copy of the referenced artifact — the raw STIX object, EPSS
277
- * record, advisory, or annotation payload — preserved verbatim.
343
+ * Optional lossless embedded copy of the referenced artifact as a JSON object — the raw
344
+ * STIX object, EPSS record, advisory, or annotation payload — preserved verbatim.
345
+ *
346
+ * JSON objects only. An artifact that is not a JSON object (XML, CSV, NDJSON, plain text, a
347
+ * JSON array, or bytes that are not text at all) embeds through `content` + `encoding`
348
+ * instead.
278
349
  *
279
350
  * Composes with `href`/`externalId` (which point at the artifact) and `checksum` (which
280
351
  * ties the copy to the source): a single entry can both point and embed.
@@ -283,6 +354,15 @@ export interface ExternalReference {
283
354
  * fields — so this does not duplicate the source ontology (e.g. STIX rides here unchanged).
284
355
  */
285
356
  document?: { [key: string]: any };
357
+ /**
358
+ * How to read `content` back into the artifact's bytes. 'utf-8' for text (XML, CSV, NDJSON,
359
+ * plain text, JavaScript-wrapped JSON); 'base64' for anything that is not valid UTF-8
360
+ * text.
361
+ *
362
+ * Required whenever `content` is present, and meaningless without it — an embedded copy
363
+ * whose encoding a consumer has to guess is not lossless.
364
+ */
365
+ encoding?: ExternalReferenceEncoding;
286
366
  /**
287
367
  * Identifier of the artifact within `sourceName` (e.g., 'CVE-2021-44228' for source 'cve',
288
368
  * 'T1059' for 'mitre-att&ck'). Cite by id without needing a URL. Together with `sourceName`
@@ -291,8 +371,8 @@ export interface ExternalReference {
291
371
  externalId?: string;
292
372
  /**
293
373
  * Location of the artifact. `uri-reference` (not `uri`) so a bare internal
294
- * `#fragment`/`#uuid` reference is expressible alongside absolute URLs.
295
- * `checksum`/`mediaType` apply only to a retrievable `href`.
374
+ * `#fragment`/`#uuid` reference is expressible alongside absolute URLs. Set it only when
375
+ * the location is meaningful to a reader — never a producer's local filesystem path.
296
376
  */
297
377
  href?: string;
298
378
  /**
@@ -309,8 +389,9 @@ export interface ExternalReference {
309
389
  */
310
390
  kind?: string;
311
391
  /**
312
- * IANA media type of the referenced artifact when retrievable (RFC 6838), e.g.,
313
- * 'application/json'. Meaningful only with `href`.
392
+ * IANA media type of the artifact (RFC 6838), e.g., 'application/json', 'application/xml',
393
+ * 'text/csv'. Applies both to an artifact retrievable at `href` and to one embedded here in
394
+ * `content` or `document`.
314
395
  */
315
396
  mediaType?: string;
316
397
  /**
@@ -393,8 +474,14 @@ export interface Checksum {
393
474
  }
394
475
 
395
476
  /**
396
- * Supported cryptographic hash algorithms for checksums and integrity verification. blake3 covers
397
- * container-image and other artifact digests that use it.
477
+ * Cryptographic hash algorithms a checksum or integrity record may name. blake3 covers
478
+ * container-image and other artifact digests that use it. HDF tooling verifies every algorithm in
479
+ * this enum, so any of them may be recorded where the checksum needs to be verifiable. md5 and sha1
480
+ * are excluded deliberately: a checksum or integrity record exists to detect tampering, and both
481
+ * are collision-broken, so a digest in either would look verifiable while proving nothing. A source
482
+ * tool digest in an excluded algorithm is not recorded as a checksum. Admitting weak hashes as an
483
+ * application-level accept/reject decision was considered and rejected; widening this enum is a
484
+ * schema decision, not an oversight.
398
485
  */
399
486
  export enum HashAlgorithm {
400
487
  Blake3 = "blake3",
@@ -403,6 +490,15 @@ export enum HashAlgorithm {
403
490
  Sha512 = "sha512",
404
491
  }
405
492
 
493
+ /**
494
+ * How an embedded copy's bytes are read back: 'utf-8' for text, 'base64' for anything that is not
495
+ * valid UTF-8 text.
496
+ */
497
+ export enum ExternalReferenceEncoding {
498
+ Base64 = "base64",
499
+ UTF8 = "utf-8",
500
+ }
501
+
406
502
  /**
407
503
  * Describes a group of requirements, such as those defined in a single file.
408
504
  */
@@ -471,7 +567,9 @@ export interface Input {
471
567
  */
472
568
  export interface InputConstraints {
473
569
  /**
474
- * Enumeration of permitted values.
570
+ * Enumeration of permitted values. Each entry may be any JSON value, the same freedom
571
+ * Input.value has: an Array or Hash input enumerates container values, so no element type
572
+ * is imposed.
475
573
  */
476
574
  allowedValues?: any[];
477
575
  /**
@@ -651,7 +749,11 @@ export interface EvaluatedRequirement {
651
749
  */
652
750
  statusOverrides?: StatusOverride[];
653
751
  /**
654
- * The requirement identifier. Example: 'SV-238196'.
752
+ * The requirement identifier, naming the requirement itself rather than one finding of it.
753
+ * Example: 'SV-238196'. Several entries in one baseline may legitimately carry the same id
754
+ * (one scanner reporting one CVE against several packages, or an overlay restating what it
755
+ * inherits), so an id is not an instance key: index requirements as id to list, never id to
756
+ * one, and an amendment addressing an id applies to every entry carrying it.
655
757
  */
656
758
  id: string;
657
759
  /**
@@ -967,10 +1069,11 @@ export interface Description {
967
1069
  * to 'notApplicable'. The disposition field on the requirement distinguishes false positives from
968
1070
  * genuinely not-applicable findings. - 'riskAdjustment': impact score adjusted based on
969
1071
  * environmental context (FedRAMP Risk Adjustment); does not change pass/fail status, only impact
970
- * via the impact field. - 'operationalRequirement': deviation required by operational constraints
971
- * (FedRAMP Operational Requirement); the finding cannot be remediated because the system requires
972
- * the affected functionality. Remains an open risk. Migration note: 'exception' was removed in
973
- * v3.1.0 — use 'waiver' with status 'notApplicable' instead.
1072
+ * via the impact field; a status on it is rejected by validation. - 'operationalRequirement':
1073
+ * deviation required by operational constraints (FedRAMP Operational Requirement); the finding
1074
+ * cannot be remediated because the system requires the affected functionality. Remains an open
1075
+ * risk. Migration note: 'exception' was removed in v3.1.0 — use 'waiver' with status
1076
+ * 'notApplicable' instead.
974
1077
  */
975
1078
  export enum OverrideType {
976
1079
  Attestation = "attestation",
@@ -1325,6 +1428,13 @@ export interface RequirementResult {
1325
1428
  * explain why a test was not applicable or not reviewed.
1326
1429
  */
1327
1430
  message?: string;
1431
+ /**
1432
+ * The source tool's own record for this result, carrying every field the record had.
1433
+ * Complete, not necessarily byte-exact: see Raw_Source_Record.content for the producer and
1434
+ * consumer obligations, and extensions.rawSourceArtifacts[] when byte-exact carriage is
1435
+ * required.
1436
+ */
1437
+ rawSourceRecord?: RawSourceRecord;
1328
1438
  /**
1329
1439
  * The resource used in the test. Example: 'file', 'command', 'service'.
1330
1440
  */
@@ -1348,6 +1458,67 @@ export interface RequirementResult {
1348
1458
  [property: string]: any;
1349
1459
  }
1350
1460
 
1461
+ /**
1462
+ * The source tool's own record for this result — the one entry in the converter's input that
1463
+ * produced it, complete though not necessarily byte-for-byte (see `content`). SCOPED TO THE RESULT
1464
+ * DELIBERATELY. For a vulnerability scanner the native record is one (vulnerability, package) pair,
1465
+ * which is exactly one result: a CVE reported against two packages yields two entries whose records
1466
+ * differ only in the package they matched. Held on the requirement instead, those two records would
1467
+ * collide, and merging entries that share an id would have to discard one — so the result is not
1468
+ * merely an available home but the correct one. Distinct from `extensions.rawSourceArtifacts[]`,
1469
+ * which carries whole input artifacts: this carries the one record inside one of them, and
1470
+ * `pointer` ties the two together. A consumer that wants the whole input reads the artifact; one
1471
+ * that wants provenance for a single finding reads this. Distinct from `code`, which means the code
1472
+ * that ran to evaluate the requirement — an InSpec control's source, or a check reference. A
1473
+ * serialized finding is not code, and putting one there overloaded a field whose meaning came from
1474
+ * InSpec. CLOSED, and deliberately not a passthrough bag: three required members and an optional
1475
+ * pointer are the whole of it. Producer data that HDF does not model belongs in
1476
+ * `extensions.passthrough`, which is document-scoped and permissive by design; this field is
1477
+ * neither. Closed with `additionalProperties` rather than the house `unevaluatedProperties` because
1478
+ * this definition composes nothing, and the shipped Go validator is a draft-07 engine that does not
1479
+ * implement `unevaluatedProperties` — a closure only one of the two validators enforces is not a
1480
+ * closure.
1481
+ */
1482
+ export interface RawSourceRecord {
1483
+ /**
1484
+ * The source tool's own record for this result, carrying every field the record had.
1485
+ *
1486
+ * COMPLETE, NOT NECESSARILY BYTE-EXACT. A producer SHOULD write the record's bytes
1487
+ * unchanged where it can. A producer that cannot — notably one implemented in two languages
1488
+ * whose JSON serializers disagree on key order, HTML escaping and number rendering, and
1489
+ * which therefore MUST canonicalize to stay byte-identical with its twin — MAY write a
1490
+ * canonically serialized form instead. Such a form preserves every field and value but not
1491
+ * the original key order, insignificant whitespace, or duplicate keys. A consumer MUST
1492
+ * therefore compare records by parsing them, not by comparing bytes, and MUST NOT checksum
1493
+ * this field and expect the result to match a checksum of the input.
1494
+ *
1495
+ * For carriage that IS byte-exact, use `extensions.rawSourceArtifacts[]`, which forbids a
1496
+ * parsed `document` precisely so the bytes and their checksum survive; `pointer` ties this
1497
+ * record to its position within that artifact.
1498
+ */
1499
+ content: string;
1500
+ /**
1501
+ * How to read `content`: 'utf-8' for text, 'base64' for bytes that are not valid UTF-8 text.
1502
+ */
1503
+ encoding: ExternalReferenceEncoding;
1504
+ /**
1505
+ * The record's IANA media type — the type of this record, which for a fragment of a larger
1506
+ * artifact may be narrower than the artifact's own. Example: 'application/json' for one
1507
+ * match object out of a JSON report.
1508
+ */
1509
+ mediaType: string;
1510
+ /**
1511
+ * Where this record sits inside the artifact it came from, as a JSON Pointer (RFC 6901) for
1512
+ * JSON sources or an XPath for XML ones. Example: '/matches/3'.
1513
+ *
1514
+ * Optional, and the link that makes carriage verifiable rather than merely present: with it
1515
+ * a consumer can confirm the record really is the subtree of
1516
+ * `extensions.rawSourceArtifacts[]` it claims to be. Omit it when the source's shape gives
1517
+ * a record no addressable location.
1518
+ */
1519
+ pointer?: string;
1520
+ }
1521
+
1351
1522
  /**
1352
1523
  * Severity rating for a requirement. Typically derived from the numeric impact score.
1353
1524
  */
@@ -1375,9 +1546,14 @@ export interface SourceLocation {
1375
1546
  }
1376
1547
 
1377
1548
  /**
1378
- * An intentional change to a requirement's compliance status and/or impact score. At least one of
1379
- * status or impact must be set. Overrides change the effectiveStatus or impact of the requirement.
1380
- * All overrides must have an expiration date to enforce periodic review.
1549
+ * An intentional change to a requirement's compliance status and/or impact score, as it sits on the
1550
+ * requirement once applied. The same type-conditional rule as Standalone_Override: when type is
1551
+ * 'operationalRequirement', neither status nor impact may be set, because the override records an
1552
+ * accepted deviation without adjudicating the finding; it still governs disposition, and
1553
+ * effectiveStatus stays what the results decided. When type is 'riskAdjustment', status may not be
1554
+ * set: it re-rates the risk through impact and never changes pass/fail. For every other type, at
1555
+ * least one of status or impact must be set. All overrides must have an expiration date to enforce
1556
+ * periodic review.
1381
1557
  */
1382
1558
  export interface StatusOverride {
1383
1559
  /**
@@ -1413,7 +1589,8 @@ export interface StatusOverride {
1413
1589
  */
1414
1590
  externalReferences?: ExternalReference[];
1415
1591
  /**
1416
- * Override to the requirement's impact score. At least one of status or impact must be set.
1592
+ * Override to the requirement's impact score. For every type except operationalRequirement,
1593
+ * at least one of status or impact must be set; an operationalRequirement carries neither.
1417
1594
  */
1418
1595
  impact?: ImpactOverride;
1419
1596
  /**
@@ -1445,7 +1622,8 @@ export interface StatusOverride {
1445
1622
  signature?: Signature;
1446
1623
  /**
1447
1624
  * The new status this override sets for the requirement. Optional when only impact is being
1448
- * overridden.
1625
+ * overridden; forbidden on an operationalRequirement, which adjudicates nothing, and on a
1626
+ * riskAdjustment, which re-rates impact only.
1449
1627
  */
1450
1628
  status?: ResultStatus;
1451
1629
  /**
@@ -2372,6 +2550,11 @@ export interface HDFBaseline {
2372
2550
  * The set of dependencies this baseline depends on.
2373
2551
  */
2374
2552
  depends?: Dependency[];
2553
+ /**
2554
+ * Producer data outside the HDF model, and the pre-converted source artifact(s) this
2555
+ * baseline was converted from.
2556
+ */
2557
+ extensions?: Extensions;
2375
2558
  /**
2376
2559
  * The tool that generated this file.
2377
2560
  */
@@ -2410,6 +2593,11 @@ export interface HDFBaseline {
2410
2593
  * The email address or other contact information of the copyright holder(s).
2411
2594
  */
2412
2595
  copyrightEmail?: string;
2596
+ /**
2597
+ * Prose description of the baseline, more detailed than summary. Carried verbatim, like
2598
+ * every HDF prose field.
2599
+ */
2600
+ description?: string;
2413
2601
  /**
2414
2602
  * Optional references to external artifacts relevant to this baseline (CTI/STIX,
2415
2603
  * advisories, source catalogs, or any URI-addressable artifact). Travels with the baseline
@@ -2468,7 +2656,11 @@ export interface BaselineRequirement {
2468
2656
  */
2469
2657
  severity?: Severity;
2470
2658
  /**
2471
- * The requirement identifier. Example: 'SV-238196'.
2659
+ * The requirement identifier, naming the requirement itself rather than one finding of it.
2660
+ * Example: 'SV-238196'. Several entries in one baseline may legitimately carry the same id
2661
+ * (one scanner reporting one CVE against several packages, or an overlay restating what it
2662
+ * inherits), so an id is not an instance key: index requirements as id to list, never id to
2663
+ * one, and an amendment addressing an id applies to every entry carrying it.
2472
2664
  */
2473
2665
  id: string;
2474
2666
  /**
@@ -2576,9 +2768,10 @@ export interface HDFComparison {
2576
2768
  */
2577
2769
  drift?: RequirementDiff[];
2578
2770
  /**
2579
- * Reserved for tool-specific data not defined in the HDF standard.
2771
+ * Producer data outside the HDF model, and the pre-converted source artifact(s) this
2772
+ * comparison was derived from.
2580
2773
  */
2581
- extensions?: { [key: string]: any };
2774
+ extensions?: Extensions;
2582
2775
  /**
2583
2776
  * Optional references to external artifacts relevant to this comparison (CTI/STIX,
2584
2777
  * advisories, or any URI-addressable artifact). Inert context; see External_Reference.
@@ -2693,9 +2886,8 @@ export interface BaselineDiff {
2693
2886
  }
2694
2887
 
2695
2888
  /**
2696
- * The state of this baseline in the comparison.
2697
- *
2698
- * The state of this component in the comparison.
2889
+ * How a baseline or component fared across the compared documents: new (only in the newer), absent
2890
+ * (only in the older), unchanged, or updated (present in both with a changed version).
2699
2891
  */
2700
2892
  export enum BaselineDiffState {
2701
2893
  Absent = "absent",
@@ -2796,6 +2988,12 @@ export interface RequirementDiff {
2796
2988
  * IDs of annotations attached to this requirement diff.
2797
2989
  */
2798
2990
  annotationIds?: string[];
2991
+ /**
2992
+ * Name of the baseline the requirement belongs to, so a consumer can group diffs the way
2993
+ * hdf diff --group-by baseline does. '(multiple)' when the id appears in more than one
2994
+ * baseline of the same document.
2995
+ */
2996
+ baseline?: string;
2799
2997
  /**
2800
2998
  * The requirement as it appeared in the old/reference source. Null when state is 'new'.
2801
2999
  */
@@ -3192,7 +3390,8 @@ export interface ComparisonSummary {
3192
3390
  */
3193
3391
  regressed?: number;
3194
3392
  /**
3195
- * Total number of unique requirements across all sources.
3393
+ * Total number of distinct requirement ids across all sources; an id carried by several
3394
+ * entries counts once.
3196
3395
  */
3197
3396
  total: number;
3198
3397
  /**
@@ -3365,6 +3564,11 @@ export interface HDFSystem {
3365
3564
  * Description of the system's purpose and mission.
3366
3565
  */
3367
3566
  description?: string;
3567
+ /**
3568
+ * Producer data outside the HDF model, and the pre-converted source artifact(s) this system
3569
+ * document was converted from.
3570
+ */
3571
+ extensions?: Extensions;
3368
3572
  /**
3369
3573
  * Optional references to external artifacts describing this system's threat environment or
3370
3574
  * context (CTI/STIX, BOMs, advisories, or any URI-addressable artifact). Inert context; see
@@ -3553,6 +3757,11 @@ export interface HDFPlan {
3553
3757
  * Description of the plan's purpose and scope.
3554
3758
  */
3555
3759
  description?: string;
3760
+ /**
3761
+ * Producer data outside the HDF model, and the pre-converted source artifact(s) this plan
3762
+ * was converted from.
3763
+ */
3764
+ extensions?: Extensions;
3556
3765
  /**
3557
3766
  * Optional references to external artifacts relevant to this assessment plan (CTI/STIX,
3558
3767
  * advisories, methodology docs, or any URI-addressable artifact). Inert context; see
@@ -3713,6 +3922,12 @@ export interface HDFAmendments {
3713
3922
  * Description of the amendments' purpose and scope.
3714
3923
  */
3715
3924
  description?: string;
3925
+ /**
3926
+ * Producer data outside the HDF model, and the pre-converted source artifact(s) these
3927
+ * amendments were converted from — the VEX family and oscal-poam-to-hdf all emit this
3928
+ * document type.
3929
+ */
3930
+ extensions?: Extensions;
3716
3931
  /**
3717
3932
  * Information about the tool that generated this document.
3718
3933
  */
@@ -3750,11 +3965,13 @@ export interface HDFAmendments {
3750
3965
  }
3751
3966
 
3752
3967
  /**
3753
- * A standalone override to a requirement's compliance status or risk impact. Validation has two
3754
- * branches gated on 'type': when type is 'operationalRequirement', neither 'status' nor 'impact'
3755
- * may be set — the override records accepted risk without changing the finding
3756
- * (documentation-only). For all other types, at least one of 'status' or 'impact' must be set. This
3757
- * rule aligns with: - OSCAL Assessment Results — finding.target.status and
3968
+ * A standalone override to a requirement's compliance status or risk impact. Validation is gated on
3969
+ * 'type': when type is 'operationalRequirement', neither 'status' nor 'impact' may be set — the
3970
+ * override records accepted risk without changing the finding (documentation-only). When type is
3971
+ * 'riskAdjustment', 'status' may not be set — it re-rates the risk through 'impact' and never
3972
+ * changes the finding's pass/fail; an override that must change status is a waiver or
3973
+ * falsePositive. For all other types, at least one of 'status' or 'impact' must be set. This rule
3974
+ * aligns with: - OSCAL Assessment Results — finding.target.status and
3758
3975
  * finding.associated-risk[].facet[] are separate axes
3759
3976
  * (https://pages.nist.gov/OSCAL/learn/concepts/layer/assessment/assessment-results/) - FedRAMP
3760
3977
  * deviation request types — Risk Adjustment changes impact only, Operational Requirement documents
@@ -3854,8 +4071,9 @@ export interface StandaloneOverride {
3854
4071
  */
3855
4072
  reason: string;
3856
4073
  /**
3857
- * The ID of the requirement being amended. Must match a requirement ID in the referenced
3858
- * baseline.
4074
+ * The id of the requirement being amended. An id names the requirement, not one finding, so
4075
+ * the override applies to every requirement entry carrying that id in the baseline(s) it
4076
+ * targets.
3859
4077
  */
3860
4078
  requirementId: string;
3861
4079
  /**
@@ -3863,7 +4081,9 @@ export interface StandaloneOverride {
3863
4081
  */
3864
4082
  signature?: Signature;
3865
4083
  /**
3866
- * The new status this amendment sets. Optional when only impact is being overridden.
4084
+ * The new status this override sets for the requirement. Optional when only impact is being
4085
+ * overridden; forbidden on an operationalRequirement, which adjudicates nothing, and on a
4086
+ * riskAdjustment, which re-rates impact only.
3867
4087
  */
3868
4088
  status?: ResultStatus;
3869
4089
  /**
@@ -3890,6 +4110,11 @@ export interface HDFEvidencePackage {
3890
4110
  * Description of the evidence package's purpose and scope.
3891
4111
  */
3892
4112
  description?: string;
4113
+ /**
4114
+ * Producer data outside the HDF model, and the pre-converted source artifact(s) this
4115
+ * package was assembled from.
4116
+ */
4117
+ extensions?: Extensions;
3893
4118
  /**
3894
4119
  * References to external native-format evidence (log/telemetry corpora and other artifacts)
3895
4120
  * carried by URI + integrity hash + format discriminator, without recreating the data
@@ -4024,7 +4249,17 @@ export interface ContentReference {
4024
4249
  */
4025
4250
  type: ContentType;
4026
4251
  /**
4027
- * URI to the document. Can be a relative path or absolute URL.
4252
+ * A uri-reference whose DECODED form is a path relative to the package document's own
4253
+ * directory — that is what the reference MEANS, independently of any one consumer.
4254
+ * Percent-escapes are part of the encoding, not the name: `my%20scans/q4.json` and `my
4255
+ * scans/q4.json` name the same file, and the escaped spelling is the one this field's
4256
+ * format admits. A consumer decodes before it resolves, never after, because decoding can
4257
+ * produce a parent traversal that containment must then see. It is never fetched: there is
4258
+ * no network retrieval anywhere in evidence handling. `uri-reference` admits shapes other
4259
+ * than a relative path and they stay schema-valid; how a consumer resolves one, and what it
4260
+ * does when it cannot, is that consumer's own contract. An artifact deliberately held
4261
+ * elsewhere belongs in externalEvidence[], which references it by URI and checksum without
4262
+ * retrieving it.
4028
4263
  */
4029
4264
  uri: string;
4030
4265
  [property: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mitre/hdf-schema",
3
- "version": "3.7.2",
3
+ "version": "3.8.0-next.42533588944.1",
4
4
  "description": "JSON schemas and multi-language type definitions for Heimdall Data Format (HDF)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -63,9 +63,9 @@
63
63
  "author": "MITRE Corporation",
64
64
  "license": "Apache-2.0",
65
65
  "dependencies": {
66
+ "@mitre/hdf-utilities": "3.8.0-next.42533588944.1",
66
67
  "ajv": "^8.17.0",
67
- "ajv-formats": "^3.0.0",
68
- "@mitre/hdf-utilities": "^3.7.2"
68
+ "ajv-formats": "^3.0.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@hyperjump/json-schema": "^1.17.2",