@mitre/hdf-schema 3.4.4 → 3.5.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/README.md +15 -2
- package/dist/go/hdf.go +535 -271
- package/dist/helpers.d.ts +56 -1
- package/dist/helpers.js +98 -38
- package/dist/index.d.ts +2 -0
- package/dist/index.js +28 -26
- package/dist/schemas/hdf-amendments.schema.json +235 -48
- package/dist/schemas/hdf-baseline.schema.json +240 -53
- package/dist/schemas/hdf-comparison.schema.json +1948 -1504
- package/dist/schemas/hdf-evidence-package.schema.json +242 -48
- package/dist/schemas/hdf-plan.schema.json +692 -498
- package/dist/schemas/hdf-requirement-change-event.schema.json +5290 -0
- package/dist/schemas/hdf-results.schema.json +1650 -1215
- package/dist/schemas/hdf-system.schema.json +262 -68
- package/dist/ts/hdf.d.ts +420 -73
- package/dist/ts/hdf.js +65 -30
- package/dist/ts/hdf.ts +428 -77
- package/package.json +2 -2
package/dist/ts/hdf.ts
CHANGED
|
@@ -12,11 +12,23 @@ export interface HDFResults {
|
|
|
12
12
|
* references.
|
|
13
13
|
*/
|
|
14
14
|
components?: Component[];
|
|
15
|
+
/**
|
|
16
|
+
* Present ONLY on reconciled result sets: lineage recording the seed snapshot and event
|
|
17
|
+
* watermark this document was reassembled from (ADR-0005). Documents produced directly by a
|
|
18
|
+
* scan omit this field. When present, generator names the reconciling tool.
|
|
19
|
+
*/
|
|
20
|
+
derivation?: Derivation;
|
|
15
21
|
/**
|
|
16
22
|
* Reserved for tool-specific data not defined in the HDF standard. Use this to preserve
|
|
17
23
|
* original tool output, auxiliary data, or custom metadata.
|
|
18
24
|
*/
|
|
19
25
|
extensions?: { [key: string]: any };
|
|
26
|
+
/**
|
|
27
|
+
* Optional references to external artifacts (CTI/STIX, BOMs, advisories, runbooks, or any
|
|
28
|
+
* URI-addressable artifact) relevant to this assessment as a whole. Inert context; see
|
|
29
|
+
* External_Reference.
|
|
30
|
+
*/
|
|
31
|
+
externalReferences?: ExternalReference[];
|
|
20
32
|
/**
|
|
21
33
|
* Information about the tool that generated this file.
|
|
22
34
|
*/
|
|
@@ -132,6 +144,12 @@ export interface EvaluatedBaseline {
|
|
|
132
144
|
* The email address or other contact information of the copyright holder(s).
|
|
133
145
|
*/
|
|
134
146
|
copyrightEmail?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Optional references to external artifacts relevant to this baseline (CTI/STIX,
|
|
149
|
+
* advisories, source catalogs, or any URI-addressable artifact). Travels with the baseline
|
|
150
|
+
* definition. Inert context; see External_Reference.
|
|
151
|
+
*/
|
|
152
|
+
externalReferences?: ExternalReference[];
|
|
135
153
|
/**
|
|
136
154
|
* Optional key-value labels for flexible grouping. Well-known keys: system, component,
|
|
137
155
|
* environment, region, team. Values must be strings.
|
|
@@ -212,6 +230,158 @@ export interface Dependency {
|
|
|
212
230
|
[property: string]: any;
|
|
213
231
|
}
|
|
214
232
|
|
|
233
|
+
/**
|
|
234
|
+
* A generalized reference to any external artifact by identity and/or location, modeled on the STIX
|
|
235
|
+
* 2.1 `external_references` common property. Purpose-agnostic: cite a CVE, an ATT&CK technique, a
|
|
236
|
+
* STIX bundle/object, a BOM, a runbook, or any vendor artifact — including kinds with no dedicated
|
|
237
|
+
* HDF reference category. `sourceName` names the system; `externalId` cites by id within that
|
|
238
|
+
* system; `href` locates it. `sourceName` + `externalId` is equivalently a URN
|
|
239
|
+
* (`urn:<sourceName>:<externalId>`, RFC 8141), so the by-identity and by-location forms stay
|
|
240
|
+
* interconvertible. A reference is inert context: it overrides nothing, so it carries only
|
|
241
|
+
* lightweight optional `addedBy`/`addedAt` attribution, never override machinery.
|
|
242
|
+
*/
|
|
243
|
+
export interface ExternalReference {
|
|
244
|
+
/**
|
|
245
|
+
* When this reference was attached (RFC 3339 / trimmed-UTC per HDF timestamp convention).
|
|
246
|
+
*/
|
|
247
|
+
addedAt?: Date;
|
|
248
|
+
/**
|
|
249
|
+
* Who attached this reference. Lightweight, flat attribution — a reference overrides
|
|
250
|
+
* nothing, so it has no chaining/superseding/disposition.
|
|
251
|
+
*/
|
|
252
|
+
addedBy?: Identity;
|
|
253
|
+
/**
|
|
254
|
+
* Integrity hash of the referenced artifact. Reuses the HDF `Checksum` primitive (not STIX
|
|
255
|
+
* `hashes`). Meaningful only with a retrievable `href`.
|
|
256
|
+
*/
|
|
257
|
+
checksum?: Checksum;
|
|
258
|
+
/**
|
|
259
|
+
* Human-readable description of what is referenced. Satisfies the at-least-one rule on its
|
|
260
|
+
* own when neither id nor href is available.
|
|
261
|
+
*/
|
|
262
|
+
description?: string;
|
|
263
|
+
/**
|
|
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).
|
|
270
|
+
*/
|
|
271
|
+
document?: { [key: string]: any };
|
|
272
|
+
/**
|
|
273
|
+
* Identifier of the artifact within `sourceName` (e.g., 'CVE-2021-44228' for source 'cve',
|
|
274
|
+
* 'T1059' for 'mitre-att&ck'). Cite by id without needing a URL. Together with `sourceName`
|
|
275
|
+
* this is a URN.
|
|
276
|
+
*/
|
|
277
|
+
externalId?: string;
|
|
278
|
+
/**
|
|
279
|
+
* Location of the artifact. `uri-reference` (not `uri`) so a bare internal
|
|
280
|
+
* `#fragment`/`#uuid` reference is expressible alongside absolute URLs.
|
|
281
|
+
* `checksum`/`mediaType` apply only to a retrievable `href`.
|
|
282
|
+
*/
|
|
283
|
+
href?: string;
|
|
284
|
+
/**
|
|
285
|
+
* 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.
|
|
287
|
+
* Documented starter vocabulary: 'threat-intel' (STIX/CTI object), 'annotation' (human
|
|
288
|
+
* triage note), 'exploitation' (EPSS/KEV signal carried as context), 'advisory'
|
|
289
|
+
* (vendor/security advisory). Use the `x-` prefix for custom kinds.
|
|
290
|
+
*/
|
|
291
|
+
kind?: string;
|
|
292
|
+
/**
|
|
293
|
+
* IANA media type of the referenced artifact when retrievable (RFC 6838), e.g.,
|
|
294
|
+
* 'application/json'. Meaningful only with `href`.
|
|
295
|
+
*/
|
|
296
|
+
mediaType?: string;
|
|
297
|
+
/**
|
|
298
|
+
* Open relationship token describing how this reference relates to the referencing object.
|
|
299
|
+
* Deliberately open (cf. OSCAL `rel` allow-other, RFC 8288 extension relations). Documented
|
|
300
|
+
* starter vocabulary: 'reference' (generic), 'definition' (defines the concept), 'evidence'
|
|
301
|
+
* (supporting evidence), 'investigate' (a live pivot to investigate), 'canonical' (the
|
|
302
|
+
* authoritative source).
|
|
303
|
+
*/
|
|
304
|
+
rel?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Name of the external system/source being referenced (e.g., 'cve', 'mitre-att&ck', 'stix',
|
|
307
|
+
* 'taxii', or any vendor label). Open string — not a closed enum. Use the `x-` prefix
|
|
308
|
+
* convention for custom/experimental sources, mirroring `bomType`.
|
|
309
|
+
*/
|
|
310
|
+
sourceName: string;
|
|
311
|
+
[property: string]: any;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Represents an identity that performed an action, such as capturing evidence or applying an
|
|
316
|
+
* override.
|
|
317
|
+
*/
|
|
318
|
+
export interface Identity {
|
|
319
|
+
/**
|
|
320
|
+
* Optional description of the identity or identity system, particularly useful when type is
|
|
321
|
+
* 'other'.
|
|
322
|
+
*/
|
|
323
|
+
description?: string;
|
|
324
|
+
/**
|
|
325
|
+
* The identifier value. Example: 'user@example.com', 'jdoe', 'automated-scanner-01'.
|
|
326
|
+
*/
|
|
327
|
+
identifier: string;
|
|
328
|
+
/**
|
|
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
|
+
*/
|
|
337
|
+
type: IdentityType;
|
|
338
|
+
[property: string]: any;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
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.
|
|
349
|
+
*/
|
|
350
|
+
export enum IdentityType {
|
|
351
|
+
Agent = "agent",
|
|
352
|
+
Email = "email",
|
|
353
|
+
Other = "other",
|
|
354
|
+
Simple = "simple",
|
|
355
|
+
System = "system",
|
|
356
|
+
Username = "username",
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Cryptographic checksum for baseline integrity verification.
|
|
361
|
+
*/
|
|
362
|
+
export interface Checksum {
|
|
363
|
+
/**
|
|
364
|
+
* The hash algorithm used for the checksum.
|
|
365
|
+
*/
|
|
366
|
+
algorithm: HashAlgorithm;
|
|
367
|
+
/**
|
|
368
|
+
* The checksum value.
|
|
369
|
+
*/
|
|
370
|
+
value: string;
|
|
371
|
+
[property: string]: any;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Supported cryptographic hash algorithms for checksums and integrity verification. blake3 covers
|
|
376
|
+
* container-image and other artifact digests that use it.
|
|
377
|
+
*/
|
|
378
|
+
export enum HashAlgorithm {
|
|
379
|
+
Blake3 = "blake3",
|
|
380
|
+
Sha256 = "sha256",
|
|
381
|
+
Sha384 = "sha384",
|
|
382
|
+
Sha512 = "sha512",
|
|
383
|
+
}
|
|
384
|
+
|
|
215
385
|
/**
|
|
216
386
|
* Describes a group of requirements, such as those defined in a single file.
|
|
217
387
|
*/
|
|
@@ -351,32 +521,6 @@ export interface Integrity {
|
|
|
351
521
|
[property: string]: any;
|
|
352
522
|
}
|
|
353
523
|
|
|
354
|
-
/**
|
|
355
|
-
* Supported cryptographic hash algorithms for checksums and integrity verification. blake3 covers
|
|
356
|
-
* container-image and other artifact digests that use it.
|
|
357
|
-
*/
|
|
358
|
-
export enum HashAlgorithm {
|
|
359
|
-
Blake3 = "blake3",
|
|
360
|
-
Sha256 = "sha256",
|
|
361
|
-
Sha384 = "sha384",
|
|
362
|
-
Sha512 = "sha512",
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Cryptographic checksum for baseline integrity verification.
|
|
367
|
-
*/
|
|
368
|
-
export interface Checksum {
|
|
369
|
-
/**
|
|
370
|
-
* The hash algorithm used for the checksum.
|
|
371
|
-
*/
|
|
372
|
-
algorithm: HashAlgorithm;
|
|
373
|
-
/**
|
|
374
|
-
* The checksum value.
|
|
375
|
-
*/
|
|
376
|
-
value: string;
|
|
377
|
-
[property: string]: any;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
524
|
/**
|
|
381
525
|
* A requirement that has been evaluated, including any findings.
|
|
382
526
|
*/
|
|
@@ -413,6 +557,16 @@ export interface EvaluatedRequirement {
|
|
|
413
557
|
* POAMs apply.
|
|
414
558
|
*/
|
|
415
559
|
disposition?: OverrideType;
|
|
560
|
+
/**
|
|
561
|
+
* 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).
|
|
568
|
+
*/
|
|
569
|
+
effectiveChecksum?: Checksum;
|
|
416
570
|
/**
|
|
417
571
|
* The current effective impact score (0.0–1.0) after applying the most recent non-expired
|
|
418
572
|
* override with an impact field. Absent when no impact overrides apply; consumers should
|
|
@@ -504,6 +658,13 @@ export interface EvaluatedRequirement {
|
|
|
504
658
|
* family/id but should not assume a default.
|
|
505
659
|
*/
|
|
506
660
|
controlType?: ControlType;
|
|
661
|
+
/**
|
|
662
|
+
* Optional references to external artifacts relevant to this requirement (CTI/STIX
|
|
663
|
+
* correlation, advisories, control/definition sources, or any URI-addressable artifact).
|
|
664
|
+
* Applies to both baseline requirement definitions and evaluated requirements. Inert
|
|
665
|
+
* context; see External_Reference.
|
|
666
|
+
*/
|
|
667
|
+
externalReferences?: ExternalReference[];
|
|
507
668
|
/**
|
|
508
669
|
* The set of references to external documents.
|
|
509
670
|
*/
|
|
@@ -841,51 +1002,6 @@ export interface Evidence {
|
|
|
841
1002
|
[property: string]: any;
|
|
842
1003
|
}
|
|
843
1004
|
|
|
844
|
-
/**
|
|
845
|
-
* Represents an identity that performed an action, such as capturing evidence or applying an
|
|
846
|
-
* override.
|
|
847
|
-
*/
|
|
848
|
-
export interface Identity {
|
|
849
|
-
/**
|
|
850
|
-
* Optional description of the identity or identity system, particularly useful when type is
|
|
851
|
-
* 'other'.
|
|
852
|
-
*/
|
|
853
|
-
description?: string;
|
|
854
|
-
/**
|
|
855
|
-
* The identifier value. Example: 'user@example.com', 'jdoe', 'automated-scanner-01'.
|
|
856
|
-
*/
|
|
857
|
-
identifier: string;
|
|
858
|
-
/**
|
|
859
|
-
* The type of identifier. Use 'email' for email addresses, 'username' for user accounts,
|
|
860
|
-
* 'system' for deterministic non-interactive automation (CI jobs, cron, scanners), 'agent'
|
|
861
|
-
* for an AI/LLM agent acting with autonomy — kept distinct from 'system' so auditors can
|
|
862
|
-
* apply AI-specific scrutiny (e.g. 'an LLM proposed this' vs a deterministic job) and
|
|
863
|
-
* satisfy AI-source disclosure under frameworks like the EU AI Act and NIST AI RMF,
|
|
864
|
-
* 'simple' for basic string identifiers without additional classification, or 'other' for
|
|
865
|
-
* custom identity systems.
|
|
866
|
-
*/
|
|
867
|
-
type: IdentityType;
|
|
868
|
-
[property: string]: any;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
/**
|
|
872
|
-
* The type of identifier. Use 'email' for email addresses, 'username' for user accounts,
|
|
873
|
-
* 'system' for deterministic non-interactive automation (CI jobs, cron, scanners), 'agent'
|
|
874
|
-
* for an AI/LLM agent acting with autonomy — kept distinct from 'system' so auditors can
|
|
875
|
-
* apply AI-specific scrutiny (e.g. 'an LLM proposed this' vs a deterministic job) and
|
|
876
|
-
* satisfy AI-source disclosure under frameworks like the EU AI Act and NIST AI RMF,
|
|
877
|
-
* 'simple' for basic string identifiers without additional classification, or 'other' for
|
|
878
|
-
* custom identity systems.
|
|
879
|
-
*/
|
|
880
|
-
export enum IdentityType {
|
|
881
|
-
Agent = "agent",
|
|
882
|
-
Email = "email",
|
|
883
|
-
Other = "other",
|
|
884
|
-
Simple = "simple",
|
|
885
|
-
System = "system",
|
|
886
|
-
Username = "username",
|
|
887
|
-
}
|
|
888
|
-
|
|
889
1005
|
/**
|
|
890
1006
|
* The type of evidence being provided.
|
|
891
1007
|
*/
|
|
@@ -947,9 +1063,12 @@ export interface Poam {
|
|
|
947
1063
|
*/
|
|
948
1064
|
evidence?: Evidence[];
|
|
949
1065
|
/**
|
|
950
|
-
*
|
|
1066
|
+
* Required deadline for this POA&M. A POA&M is a time-boxed acceptance of an open finding;
|
|
1067
|
+
* without a deadline it lets a failing requirement duck remediation indefinitely. Source a
|
|
1068
|
+
* real date (e.g. a remediation target or vendor-fix date) — never a wall-clock default.
|
|
1069
|
+
* ISO 8601 format.
|
|
951
1070
|
*/
|
|
952
|
-
expiresAt
|
|
1071
|
+
expiresAt: Date;
|
|
953
1072
|
/**
|
|
954
1073
|
* Detailed explanation of the plan, including what actions will be taken.
|
|
955
1074
|
*/
|
|
@@ -1214,6 +1333,13 @@ export interface StatusOverride {
|
|
|
1214
1333
|
* permanent overrides allowed. ISO 8601 format.
|
|
1215
1334
|
*/
|
|
1216
1335
|
expiresAt: Date;
|
|
1336
|
+
/**
|
|
1337
|
+
* Optional references to the external artifacts behind this override (e.g. the STIX
|
|
1338
|
+
* bundle/object or CTI feed motivating an E:A riskAdjustment). Inert context distinct from
|
|
1339
|
+
* `evidence`; see External_Reference. Symmetric with Standalone_Override.externalReferences
|
|
1340
|
+
* for the inline (results-embedded) override carrier.
|
|
1341
|
+
*/
|
|
1342
|
+
externalReferences?: ExternalReference[];
|
|
1217
1343
|
/**
|
|
1218
1344
|
* Override to the requirement's impact score. At least one of status or impact must be set.
|
|
1219
1345
|
*/
|
|
@@ -1934,6 +2060,57 @@ export enum TargetType {
|
|
|
1934
2060
|
Repository = "repository",
|
|
1935
2061
|
}
|
|
1936
2062
|
|
|
2063
|
+
/**
|
|
2064
|
+
* Derived-document lineage for a reconciled result set (an hdf-results produced by
|
|
2065
|
+
* applyChangeEvents rather than a scanner). Records exactly which seed and event horizon the
|
|
2066
|
+
* document represents so it can never masquerade as primary scan evidence. Conceptually PROV
|
|
2067
|
+
* qualified derivation: derived entity, used entity (seed), activity (event application),
|
|
2068
|
+
* generation time (asOf).
|
|
2069
|
+
*/
|
|
2070
|
+
export interface Derivation {
|
|
2071
|
+
/**
|
|
2072
|
+
* The posture-as-of time of this reconciled view (RFC 3339, trimmed UTC) — the analog of
|
|
2073
|
+
* PROV's generatedAtTime.
|
|
2074
|
+
*/
|
|
2075
|
+
asOf: Date;
|
|
2076
|
+
/**
|
|
2077
|
+
* Number of change events applied to the seed to produce this document.
|
|
2078
|
+
*/
|
|
2079
|
+
eventsApplied: number;
|
|
2080
|
+
/**
|
|
2081
|
+
* The authoritative snapshot this document was reassembled from, pinned by content.
|
|
2082
|
+
*/
|
|
2083
|
+
seed: Seed;
|
|
2084
|
+
/**
|
|
2085
|
+
* URI of the event-stream producer context whose events were applied (matches the events'
|
|
2086
|
+
* envelope source).
|
|
2087
|
+
*/
|
|
2088
|
+
source: string;
|
|
2089
|
+
/**
|
|
2090
|
+
* The event watermark: the highest per-key sequence number applied. Downstream precedence
|
|
2091
|
+
* rule: a full-scan document supersedes the reconciled view as of its scan time; between
|
|
2092
|
+
* scans, the reconciled document with the highest throughSequence is the current posture.
|
|
2093
|
+
*/
|
|
2094
|
+
throughSequence: number;
|
|
2095
|
+
[property: string]: any;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* The authoritative snapshot this document was reassembled from, pinned by content.
|
|
2100
|
+
*/
|
|
2101
|
+
export interface Seed {
|
|
2102
|
+
/**
|
|
2103
|
+
* Checksum of the seed snapshot, REQUIRED: the derivation pins an immutable snapshot by
|
|
2104
|
+
* content, not just location.
|
|
2105
|
+
*/
|
|
2106
|
+
checksum: Checksum;
|
|
2107
|
+
/**
|
|
2108
|
+
* URI to the seed snapshot document (relative path or absolute URL).
|
|
2109
|
+
*/
|
|
2110
|
+
uri: string;
|
|
2111
|
+
[property: string]: any;
|
|
2112
|
+
}
|
|
2113
|
+
|
|
1937
2114
|
/**
|
|
1938
2115
|
* Information about the tool that generated this HDF file.
|
|
1939
2116
|
*/
|
|
@@ -2082,9 +2259,13 @@ export interface StatisticBlock {
|
|
|
2082
2259
|
*/
|
|
2083
2260
|
export interface Tool {
|
|
2084
2261
|
/**
|
|
2085
|
-
* The
|
|
2086
|
-
*
|
|
2087
|
-
*
|
|
2262
|
+
* The named format of the source data, when it follows a recognized format specification
|
|
2263
|
+
* with its own identity: an interchange format emitted by many tools ('SARIF', 'XCCDF',
|
|
2264
|
+
* '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.
|
|
2088
2269
|
*/
|
|
2089
2270
|
format?: string;
|
|
2090
2271
|
/**
|
|
@@ -2146,6 +2327,12 @@ export interface HDFBaseline {
|
|
|
2146
2327
|
* The email address or other contact information of the copyright holder(s).
|
|
2147
2328
|
*/
|
|
2148
2329
|
copyrightEmail?: string;
|
|
2330
|
+
/**
|
|
2331
|
+
* Optional references to external artifacts relevant to this baseline (CTI/STIX,
|
|
2332
|
+
* advisories, source catalogs, or any URI-addressable artifact). Travels with the baseline
|
|
2333
|
+
* definition. Inert context; see External_Reference.
|
|
2334
|
+
*/
|
|
2335
|
+
externalReferences?: ExternalReference[];
|
|
2149
2336
|
/**
|
|
2150
2337
|
* Optional key-value labels for flexible grouping. Well-known keys: system, component,
|
|
2151
2338
|
* environment, region, team. Values must be strings.
|
|
@@ -2234,6 +2421,13 @@ export interface BaselineRequirement {
|
|
|
2234
2421
|
* family/id but should not assume a default.
|
|
2235
2422
|
*/
|
|
2236
2423
|
controlType?: ControlType;
|
|
2424
|
+
/**
|
|
2425
|
+
* Optional references to external artifacts relevant to this requirement (CTI/STIX
|
|
2426
|
+
* correlation, advisories, control/definition sources, or any URI-addressable artifact).
|
|
2427
|
+
* Applies to both baseline requirement definitions and evaluated requirements. Inert
|
|
2428
|
+
* context; see External_Reference.
|
|
2429
|
+
*/
|
|
2430
|
+
externalReferences?: ExternalReference[];
|
|
2237
2431
|
/**
|
|
2238
2432
|
* The set of references to external documents.
|
|
2239
2433
|
*/
|
|
@@ -2289,6 +2483,11 @@ export interface HDFComparison {
|
|
|
2289
2483
|
* Reserved for tool-specific data not defined in the HDF standard.
|
|
2290
2484
|
*/
|
|
2291
2485
|
extensions?: { [key: string]: any };
|
|
2486
|
+
/**
|
|
2487
|
+
* Optional references to external artifacts relevant to this comparison (CTI/STIX,
|
|
2488
|
+
* advisories, or any URI-addressable artifact). Inert context; see External_Reference.
|
|
2489
|
+
*/
|
|
2490
|
+
externalReferences?: ExternalReference[];
|
|
2292
2491
|
/**
|
|
2293
2492
|
* Schema version for this comparison format.
|
|
2294
2493
|
*/
|
|
@@ -2578,12 +2777,17 @@ export interface RequirementDiff {
|
|
|
2578
2777
|
}
|
|
2579
2778
|
|
|
2580
2779
|
/**
|
|
2581
|
-
* The reason a requirement's state changed between sources.
|
|
2780
|
+
* The reason a requirement's state changed between sources. 'dispositionChanged' = the governing
|
|
2781
|
+
* override type differs between the sources (e.g. a waiver replaced a riskAdjustment);
|
|
2782
|
+
* 'effectiveImpactChanged' = the post-override impact score differs while the base impact may be
|
|
2783
|
+
* unchanged.
|
|
2582
2784
|
*/
|
|
2583
2785
|
export enum ChangeReason {
|
|
2584
2786
|
BaselineUpgraded = "baselineUpgraded",
|
|
2585
2787
|
ConfigChanged = "configChanged",
|
|
2586
2788
|
ControlMapped = "controlMapped",
|
|
2789
|
+
DispositionChanged = "dispositionChanged",
|
|
2790
|
+
EffectiveImpactChanged = "effectiveImpactChanged",
|
|
2587
2791
|
ImpactChanged = "impactChanged",
|
|
2588
2792
|
MetadataChanged = "metadataChanged",
|
|
2589
2793
|
OverrideAdded = "overrideAdded",
|
|
@@ -3065,6 +3269,12 @@ export interface HDFSystem {
|
|
|
3065
3269
|
* Description of the system's purpose and mission.
|
|
3066
3270
|
*/
|
|
3067
3271
|
description?: string;
|
|
3272
|
+
/**
|
|
3273
|
+
* Optional references to external artifacts describing this system's threat environment or
|
|
3274
|
+
* context (CTI/STIX, BOMs, advisories, or any URI-addressable artifact). Inert context; see
|
|
3275
|
+
* External_Reference.
|
|
3276
|
+
*/
|
|
3277
|
+
externalReferences?: ExternalReference[];
|
|
3068
3278
|
/**
|
|
3069
3279
|
* Information about the tool that generated this system document.
|
|
3070
3280
|
*/
|
|
@@ -3247,6 +3457,12 @@ export interface HDFPlan {
|
|
|
3247
3457
|
* Description of the plan's purpose and scope.
|
|
3248
3458
|
*/
|
|
3249
3459
|
description?: string;
|
|
3460
|
+
/**
|
|
3461
|
+
* Optional references to external artifacts relevant to this assessment plan (CTI/STIX,
|
|
3462
|
+
* advisories, methodology docs, or any URI-addressable artifact). Inert context; see
|
|
3463
|
+
* External_Reference.
|
|
3464
|
+
*/
|
|
3465
|
+
externalReferences?: ExternalReference[];
|
|
3250
3466
|
/**
|
|
3251
3467
|
* Information about the tool that generated this plan.
|
|
3252
3468
|
*/
|
|
@@ -3495,6 +3711,12 @@ export interface StandaloneOverride {
|
|
|
3495
3711
|
* format.
|
|
3496
3712
|
*/
|
|
3497
3713
|
expiresAt: Date;
|
|
3714
|
+
/**
|
|
3715
|
+
* Optional references to the external artifacts behind this override (e.g. the STIX
|
|
3716
|
+
* bundle/object, advisory, or CTI feed that motivated it). Inert context distinct from
|
|
3717
|
+
* `evidence`; see External_Reference.
|
|
3718
|
+
*/
|
|
3719
|
+
externalReferences?: ExternalReference[];
|
|
3498
3720
|
/**
|
|
3499
3721
|
* Override to the requirement's impact score. At least one of status or impact must be set.
|
|
3500
3722
|
*/
|
|
@@ -3570,6 +3792,12 @@ export interface HDFEvidencePackage {
|
|
|
3570
3792
|
* here rather than transcoding them.
|
|
3571
3793
|
*/
|
|
3572
3794
|
externalEvidence?: ExternalEvidenceReference[];
|
|
3795
|
+
/**
|
|
3796
|
+
* Optional references to external artifacts relevant to this evidence package (CTI/STIX,
|
|
3797
|
+
* BOMs, advisories, or any URI-addressable artifact) beyond the document references it
|
|
3798
|
+
* already carries. Inert context; see External_Reference.
|
|
3799
|
+
*/
|
|
3800
|
+
externalReferences?: ExternalReference[];
|
|
3573
3801
|
/**
|
|
3574
3802
|
* Information about the tool that generated this document.
|
|
3575
3803
|
*/
|
|
@@ -3790,3 +4018,126 @@ export interface ExternalEvidenceTimeRange {
|
|
|
3790
4018
|
start?: Date;
|
|
3791
4019
|
[property: string]: any;
|
|
3792
4020
|
}
|
|
4021
|
+
|
|
4022
|
+
/**
|
|
4023
|
+
* A single continuous-monitoring wire event: one requirement's effective posture changed on one
|
|
4024
|
+
* system component. The streaming increment of a systemDrift hdf-comparison — events fold into
|
|
4025
|
+
* comparisons and reassemble into hdf-results, they never mutate documents in place. One event per
|
|
4026
|
+
* wire document (NDJSON-friendly). The envelope (identity, ordering, hash chain) is the shared
|
|
4027
|
+
* Change_Event_Envelope primitive; the payload carries the producer-computable change state, a thin
|
|
4028
|
+
* before projection, and the full after requirement (the evidence a responder opens the event for).
|
|
4029
|
+
* Design: ADR-0005.
|
|
4030
|
+
*/
|
|
4031
|
+
export interface HDFRequirementChangeEvent {
|
|
4032
|
+
/**
|
|
4033
|
+
* The full requirement as evaluated after the change — required and non-null for every
|
|
4034
|
+
* state except absent (null there: the requirement left the assessment scope). Full content
|
|
4035
|
+
* is load-bearing twice over: reassembly parity (applyChangeEvents cannot reproduce changed
|
|
4036
|
+
* result content from a projection) and triage (the failing results[] ARE the 'why' a
|
|
4037
|
+
* responder opens the event for).
|
|
4038
|
+
*/
|
|
4039
|
+
after: any;
|
|
4040
|
+
/**
|
|
4041
|
+
* Thin projection of the prior effective posture, for at-a-glance alerting without a
|
|
4042
|
+
* state-store lookup. Null exactly when state is new (no prior posture exists). The full
|
|
4043
|
+
* prior state is recoverable from the consumer's materialized state; the envelope's
|
|
4044
|
+
* priorChecksum covers the integrity of that recovery.
|
|
4045
|
+
*/
|
|
4046
|
+
before: any;
|
|
4047
|
+
/**
|
|
4048
|
+
* Why the state changed. An overrideExpired flip is a different triage than resultChanged:
|
|
4049
|
+
* the control did not get worse, a waiver lapsed.
|
|
4050
|
+
*/
|
|
4051
|
+
changeReasons?: EventChangeReason[];
|
|
4052
|
+
/**
|
|
4053
|
+
* Canonical requirement identifier — the same identity as Requirement_Diff.id and the
|
|
4054
|
+
* requirement's id in hdf-results. Together with the envelope's (systemRef, componentId)
|
|
4055
|
+
* this forms the durable entity key. A requirement renumbering is emitted as absent + new
|
|
4056
|
+
* under the two keys, never an in-place key change; batch comparison reconciles renames via
|
|
4057
|
+
* its oldId/newId matching.
|
|
4058
|
+
*/
|
|
4059
|
+
requirementId: string;
|
|
4060
|
+
/**
|
|
4061
|
+
* The producer-computable subset of Requirement_State: new | absent | updated | fixed |
|
|
4062
|
+
* regressed. fixed and regressed carry the direction SARIF's baselineState lacks; project
|
|
4063
|
+
* down to SARIF's closed 4 values for external interop.
|
|
4064
|
+
*/
|
|
4065
|
+
state: EventRequirementState;
|
|
4066
|
+
/**
|
|
4067
|
+
* componentId of the system component this event concerns.
|
|
4068
|
+
*/
|
|
4069
|
+
componentId: string;
|
|
4070
|
+
/**
|
|
4071
|
+
* Identity of this event occurrence, unique per source. (source, eventId) is the
|
|
4072
|
+
* deduplication key: consumers may treat events with identical source and eventId as
|
|
4073
|
+
* duplicates. UUIDv7 (time-ordered) is recommended but not required.
|
|
4074
|
+
*/
|
|
4075
|
+
eventId: string;
|
|
4076
|
+
/**
|
|
4077
|
+
* The effectiveChecksum of the entity state this event supersedes, forming a per-key hash
|
|
4078
|
+
* 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.
|
|
4083
|
+
*/
|
|
4084
|
+
priorChecksum: any;
|
|
4085
|
+
/**
|
|
4086
|
+
* The versioned schema $id this event validates against, so events self-describe on
|
|
4087
|
+
* heterogeneous streams. Recommended on every wire event.
|
|
4088
|
+
*/
|
|
4089
|
+
schemaRef?: string;
|
|
4090
|
+
/**
|
|
4091
|
+
* Monotonically increasing sequence number per entity key. The ONLY ordering authority for
|
|
4092
|
+
* folding: consumers keep the greatest sequence per key regardless of arrival order or
|
|
4093
|
+
* timestamp. Deliberately per-entity-key (event-sourcing aggregate-version practice) rather
|
|
4094
|
+
* than per-source.
|
|
4095
|
+
*/
|
|
4096
|
+
sequence: number;
|
|
4097
|
+
/**
|
|
4098
|
+
* URI identifying the producer context that emitted this event (for example, a scanner
|
|
4099
|
+
* instance and profile). eventId uniqueness and sequence numbering are scoped per source.
|
|
4100
|
+
*/
|
|
4101
|
+
source: string;
|
|
4102
|
+
/**
|
|
4103
|
+
* URI to the hdf-system document (authorization boundary) this event applies to. Resolves
|
|
4104
|
+
* to the latest version of the evolving system document.
|
|
4105
|
+
*/
|
|
4106
|
+
systemRef: string;
|
|
4107
|
+
/**
|
|
4108
|
+
* Occurrence time of the observed change (RFC 3339, trimmed UTC). Display and audit
|
|
4109
|
+
* metadata only — NEVER an ordering key; ordering is sequence's job.
|
|
4110
|
+
*/
|
|
4111
|
+
timestamp: Date;
|
|
4112
|
+
[property: string]: any;
|
|
4113
|
+
}
|
|
4114
|
+
|
|
4115
|
+
/**
|
|
4116
|
+
* The producer-computable subset of the comparison vocabulary's Change_Reason, value-identical with
|
|
4117
|
+
* the parent enum (test-enforced). Batch-only reasons (baselineUpgraded, controlMapped,
|
|
4118
|
+
* scannerChanged, targetChanged, metadataChanged) require cross-corpus context and are excluded.
|
|
4119
|
+
*/
|
|
4120
|
+
export enum EventChangeReason {
|
|
4121
|
+
ConfigChanged = "configChanged",
|
|
4122
|
+
ImpactChanged = "impactChanged",
|
|
4123
|
+
OverrideAdded = "overrideAdded",
|
|
4124
|
+
OverrideExpired = "overrideExpired",
|
|
4125
|
+
OverrideModified = "overrideModified",
|
|
4126
|
+
OverrideRemoved = "overrideRemoved",
|
|
4127
|
+
ResultChanged = "resultChanged",
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
/**
|
|
4131
|
+
* The producer-computable subset of the comparison vocabulary's Requirement_State. Kept
|
|
4132
|
+
* value-identical with the parent enum (test-enforced): the batch-only states (moved, split,
|
|
4133
|
+
* merged) are outputs of cross-document identity resolution a per-key producer cannot compute.
|
|
4134
|
+
* Declared as a distinct named type (rather than a $ref intersection) so generated Go/TS types keep
|
|
4135
|
+
* stable, distinct enum names.
|
|
4136
|
+
*/
|
|
4137
|
+
export enum EventRequirementState {
|
|
4138
|
+
Absent = "absent",
|
|
4139
|
+
Fixed = "fixed",
|
|
4140
|
+
New = "new",
|
|
4141
|
+
Regressed = "regressed",
|
|
4142
|
+
Updated = "updated",
|
|
4143
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mitre/hdf-schema",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "JSON schemas and multi-language type definitions for Heimdall Data Format (HDF)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"ajv": "^8.17.0",
|
|
61
61
|
"ajv-formats": "^3.0.0",
|
|
62
|
-
"@mitre/hdf-utilities": "^3.
|
|
62
|
+
"@mitre/hdf-utilities": "^3.5.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@hyperjump/json-schema": "^1.17.2",
|