@mitre/hdf-schema 3.4.3 → 3.5.0

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.d.ts CHANGED
@@ -12,6 +12,12 @@ 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.
@@ -19,6 +25,12 @@ export interface HDFResults {
19
25
  extensions?: {
20
26
  [key: string]: any;
21
27
  };
28
+ /**
29
+ * Optional references to external artifacts (CTI/STIX, BOMs, advisories, runbooks, or any
30
+ * URI-addressable artifact) relevant to this assessment as a whole. Inert context; see
31
+ * External_Reference.
32
+ */
33
+ externalReferences?: ExternalReference[];
22
34
  /**
23
35
  * Information about the tool that generated this file.
24
36
  */
@@ -135,6 +147,12 @@ export interface EvaluatedBaseline {
135
147
  * The email address or other contact information of the copyright holder(s).
136
148
  */
137
149
  copyrightEmail?: string;
150
+ /**
151
+ * Optional references to external artifacts relevant to this baseline (CTI/STIX,
152
+ * advisories, source catalogs, or any URI-addressable artifact). Travels with the baseline
153
+ * definition. Inert context; see External_Reference.
154
+ */
155
+ externalReferences?: ExternalReference[];
138
156
  /**
139
157
  * Optional key-value labels for flexible grouping. Well-known keys: system, component,
140
158
  * environment, region, team. Values must be strings.
@@ -215,6 +233,155 @@ export interface Dependency {
215
233
  url?: string;
216
234
  [property: string]: any;
217
235
  }
236
+ /**
237
+ * A generalized reference to any external artifact by identity and/or location, modeled on the STIX
238
+ * 2.1 `external_references` common property. Purpose-agnostic: cite a CVE, an ATT&CK technique, a
239
+ * STIX bundle/object, a BOM, a runbook, or any vendor artifact — including kinds with no dedicated
240
+ * HDF reference category. `sourceName` names the system; `externalId` cites by id within that
241
+ * system; `href` locates it. `sourceName` + `externalId` is equivalently a URN
242
+ * (`urn:<sourceName>:<externalId>`, RFC 8141), so the by-identity and by-location forms stay
243
+ * interconvertible. A reference is inert context: it overrides nothing, so it carries only
244
+ * lightweight optional `addedBy`/`addedAt` attribution, never override machinery.
245
+ */
246
+ export interface ExternalReference {
247
+ /**
248
+ * When this reference was attached (RFC 3339 / trimmed-UTC per HDF timestamp convention).
249
+ */
250
+ addedAt?: Date;
251
+ /**
252
+ * Who attached this reference. Lightweight, flat attribution — a reference overrides
253
+ * nothing, so it has no chaining/superseding/disposition.
254
+ */
255
+ addedBy?: Identity;
256
+ /**
257
+ * Integrity hash of the referenced artifact. Reuses the HDF `Checksum` primitive (not STIX
258
+ * `hashes`). Meaningful only with a retrievable `href`.
259
+ */
260
+ checksum?: Checksum;
261
+ /**
262
+ * Human-readable description of what is referenced. Satisfies the at-least-one rule on its
263
+ * own when neither id nor href is available.
264
+ */
265
+ description?: string;
266
+ /**
267
+ * Optional lossless embedded copy of the referenced artifact — the raw STIX object, EPSS
268
+ * record, advisory, or annotation payload — preserved verbatim. Composes with
269
+ * `href`/`externalId` (which point at the artifact) and `checksum` (which ties the copy to
270
+ * the source): a single entry can both point and embed. HDF stays payload-agnostic — the
271
+ * content is carried untouched, never normalized into HDF fields — so this does not
272
+ * duplicate the source ontology (e.g. STIX rides here unchanged).
273
+ */
274
+ document?: {
275
+ [key: string]: any;
276
+ };
277
+ /**
278
+ * Identifier of the artifact within `sourceName` (e.g., 'CVE-2021-44228' for source 'cve',
279
+ * 'T1059' for 'mitre-att&ck'). Cite by id without needing a URL. Together with `sourceName`
280
+ * this is a URN.
281
+ */
282
+ externalId?: string;
283
+ /**
284
+ * Location of the artifact. `uri-reference` (not `uri`) so a bare internal
285
+ * `#fragment`/`#uuid` reference is expressible alongside absolute URLs.
286
+ * `checksum`/`mediaType` apply only to a retrievable `href`.
287
+ */
288
+ href?: string;
289
+ /**
290
+ * Open token classifying the referenced/embedded payload, turning a bare reference into an
291
+ * enrichment envelope. Deliberately open (like `sourceName`/`rel`), not a closed enum.
292
+ * Documented starter vocabulary: 'threat-intel' (STIX/CTI object), 'annotation' (human
293
+ * triage note), 'exploitation' (EPSS/KEV signal carried as context), 'advisory'
294
+ * (vendor/security advisory). Use the `x-` prefix for custom kinds.
295
+ */
296
+ kind?: string;
297
+ /**
298
+ * IANA media type of the referenced artifact when retrievable (RFC 6838), e.g.,
299
+ * 'application/json'. Meaningful only with `href`.
300
+ */
301
+ mediaType?: string;
302
+ /**
303
+ * Open relationship token describing how this reference relates to the referencing object.
304
+ * Deliberately open (cf. OSCAL `rel` allow-other, RFC 8288 extension relations). Documented
305
+ * starter vocabulary: 'reference' (generic), 'definition' (defines the concept), 'evidence'
306
+ * (supporting evidence), 'investigate' (a live pivot to investigate), 'canonical' (the
307
+ * authoritative source).
308
+ */
309
+ rel?: string;
310
+ /**
311
+ * Name of the external system/source being referenced (e.g., 'cve', 'mitre-att&ck', 'stix',
312
+ * 'taxii', or any vendor label). Open string — not a closed enum. Use the `x-` prefix
313
+ * convention for custom/experimental sources, mirroring `bomType`.
314
+ */
315
+ sourceName: string;
316
+ [property: string]: any;
317
+ }
318
+ /**
319
+ * Represents an identity that performed an action, such as capturing evidence or applying an
320
+ * override.
321
+ */
322
+ export interface Identity {
323
+ /**
324
+ * Optional description of the identity or identity system, particularly useful when type is
325
+ * 'other'.
326
+ */
327
+ description?: string;
328
+ /**
329
+ * The identifier value. Example: 'user@example.com', 'jdoe', 'automated-scanner-01'.
330
+ */
331
+ identifier: string;
332
+ /**
333
+ * The type of identifier. Use 'email' for email addresses, 'username' for user accounts,
334
+ * 'system' for deterministic non-interactive automation (CI jobs, cron, scanners), 'agent'
335
+ * for an AI/LLM agent acting with autonomy — kept distinct from 'system' so auditors can
336
+ * apply AI-specific scrutiny (e.g. 'an LLM proposed this' vs a deterministic job) and
337
+ * satisfy AI-source disclosure under frameworks like the EU AI Act and NIST AI RMF,
338
+ * 'simple' for basic string identifiers without additional classification, or 'other' for
339
+ * custom identity systems.
340
+ */
341
+ type: IdentityType;
342
+ [property: string]: any;
343
+ }
344
+ /**
345
+ * The type of identifier. Use 'email' for email addresses, 'username' for user accounts,
346
+ * 'system' for deterministic non-interactive automation (CI jobs, cron, scanners), 'agent'
347
+ * for an AI/LLM agent acting with autonomy — kept distinct from 'system' so auditors can
348
+ * apply AI-specific scrutiny (e.g. 'an LLM proposed this' vs a deterministic job) and
349
+ * satisfy AI-source disclosure under frameworks like the EU AI Act and NIST AI RMF,
350
+ * 'simple' for basic string identifiers without additional classification, or 'other' for
351
+ * custom identity systems.
352
+ */
353
+ export declare enum IdentityType {
354
+ Agent = "agent",
355
+ Email = "email",
356
+ Other = "other",
357
+ Simple = "simple",
358
+ System = "system",
359
+ Username = "username"
360
+ }
361
+ /**
362
+ * Cryptographic checksum for baseline integrity verification.
363
+ */
364
+ export interface Checksum {
365
+ /**
366
+ * The hash algorithm used for the checksum.
367
+ */
368
+ algorithm: HashAlgorithm;
369
+ /**
370
+ * The checksum value.
371
+ */
372
+ value: string;
373
+ [property: string]: any;
374
+ }
375
+ /**
376
+ * Supported cryptographic hash algorithms for checksums and integrity verification. blake3 covers
377
+ * container-image and other artifact digests that use it.
378
+ */
379
+ export declare enum HashAlgorithm {
380
+ Blake3 = "blake3",
381
+ Sha256 = "sha256",
382
+ Sha384 = "sha384",
383
+ Sha512 = "sha512"
384
+ }
218
385
  /**
219
386
  * Describes a group of requirements, such as those defined in a single file.
220
387
  */
@@ -348,30 +515,6 @@ export interface Integrity {
348
515
  signedBy?: string;
349
516
  [property: string]: any;
350
517
  }
351
- /**
352
- * Supported cryptographic hash algorithms for checksums and integrity verification. blake3 covers
353
- * container-image and other artifact digests that use it.
354
- */
355
- export declare enum HashAlgorithm {
356
- Blake3 = "blake3",
357
- Sha256 = "sha256",
358
- Sha384 = "sha384",
359
- Sha512 = "sha512"
360
- }
361
- /**
362
- * Cryptographic checksum for baseline integrity verification.
363
- */
364
- export interface Checksum {
365
- /**
366
- * The hash algorithm used for the checksum.
367
- */
368
- algorithm: HashAlgorithm;
369
- /**
370
- * The checksum value.
371
- */
372
- value: string;
373
- [property: string]: any;
374
- }
375
518
  /**
376
519
  * A requirement that has been evaluated, including any findings.
377
520
  */
@@ -408,6 +551,16 @@ export interface EvaluatedRequirement {
408
551
  * POAMs apply.
409
552
  */
410
553
  disposition?: OverrideType;
554
+ /**
555
+ * Checksum of this requirement's resolved effective posture, for per-control change
556
+ * detection in continuous monitoring. sha256 over the canonical JSON object with keys
557
+ * status, impact, disposition (in that order), holding the resolved effective status,
558
+ * resolved effective impact, and governing override type (null when nothing governs), with
559
+ * override expiry anchored to the document timestamp. Flips exactly when the operative
560
+ * status, impact, or disposition changes; stable under all other churn (result details,
561
+ * timestamps, tags). Optional; stamped by tooling (hdf convert, hdf amend apply).
562
+ */
563
+ effectiveChecksum?: Checksum;
411
564
  /**
412
565
  * The current effective impact score (0.0–1.0) after applying the most recent non-expired
413
566
  * override with an impact field. Absent when no impact overrides apply; consumers should
@@ -501,6 +654,13 @@ export interface EvaluatedRequirement {
501
654
  * family/id but should not assume a default.
502
655
  */
503
656
  controlType?: ControlType;
657
+ /**
658
+ * Optional references to external artifacts relevant to this requirement (CTI/STIX
659
+ * correlation, advisories, control/definition sources, or any URI-addressable artifact).
660
+ * Applies to both baseline requirement definitions and evaluated requirements. Inert
661
+ * context; see External_Reference.
662
+ */
663
+ externalReferences?: ExternalReference[];
504
664
  /**
505
665
  * The set of references to external documents.
506
666
  */
@@ -825,49 +985,6 @@ export interface Evidence {
825
985
  type: EvidenceType;
826
986
  [property: string]: any;
827
987
  }
828
- /**
829
- * Represents an identity that performed an action, such as capturing evidence or applying an
830
- * override.
831
- */
832
- export interface Identity {
833
- /**
834
- * Optional description of the identity or identity system, particularly useful when type is
835
- * 'other'.
836
- */
837
- description?: string;
838
- /**
839
- * The identifier value. Example: 'user@example.com', 'jdoe', 'automated-scanner-01'.
840
- */
841
- identifier: string;
842
- /**
843
- * The type of identifier. Use 'email' for email addresses, 'username' for user accounts,
844
- * 'system' for deterministic non-interactive automation (CI jobs, cron, scanners), 'agent'
845
- * for an AI/LLM agent acting with autonomy — kept distinct from 'system' so auditors can
846
- * apply AI-specific scrutiny (e.g. 'an LLM proposed this' vs a deterministic job) and
847
- * satisfy AI-source disclosure under frameworks like the EU AI Act and NIST AI RMF,
848
- * 'simple' for basic string identifiers without additional classification, or 'other' for
849
- * custom identity systems.
850
- */
851
- type: IdentityType;
852
- [property: string]: any;
853
- }
854
- /**
855
- * The type of identifier. Use 'email' for email addresses, 'username' for user accounts,
856
- * 'system' for deterministic non-interactive automation (CI jobs, cron, scanners), 'agent'
857
- * for an AI/LLM agent acting with autonomy — kept distinct from 'system' so auditors can
858
- * apply AI-specific scrutiny (e.g. 'an LLM proposed this' vs a deterministic job) and
859
- * satisfy AI-source disclosure under frameworks like the EU AI Act and NIST AI RMF,
860
- * 'simple' for basic string identifiers without additional classification, or 'other' for
861
- * custom identity systems.
862
- */
863
- export declare enum IdentityType {
864
- Agent = "agent",
865
- Email = "email",
866
- Other = "other",
867
- Simple = "simple",
868
- System = "system",
869
- Username = "username"
870
- }
871
988
  /**
872
989
  * The type of evidence being provided.
873
990
  */
@@ -927,9 +1044,12 @@ export interface Poam {
927
1044
  */
928
1045
  evidence?: Evidence[];
929
1046
  /**
930
- * Optional expiration date for this POA&M requiring review/renewal. ISO 8601 format.
1047
+ * Required deadline for this POA&M. A POA&M is a time-boxed acceptance of an open finding;
1048
+ * without a deadline it lets a failing requirement duck remediation indefinitely. Source a
1049
+ * real date (e.g. a remediation target or vendor-fix date) — never a wall-clock default.
1050
+ * ISO 8601 format.
931
1051
  */
932
- expiresAt?: Date;
1052
+ expiresAt: Date;
933
1053
  /**
934
1054
  * Detailed explanation of the plan, including what actions will be taken.
935
1055
  */
@@ -1188,6 +1308,13 @@ export interface StatusOverride {
1188
1308
  * permanent overrides allowed. ISO 8601 format.
1189
1309
  */
1190
1310
  expiresAt: Date;
1311
+ /**
1312
+ * Optional references to the external artifacts behind this override (e.g. the STIX
1313
+ * bundle/object or CTI feed motivating an E:A riskAdjustment). Inert context distinct from
1314
+ * `evidence`; see External_Reference. Symmetric with Standalone_Override.externalReferences
1315
+ * for the inline (results-embedded) override carrier.
1316
+ */
1317
+ externalReferences?: ExternalReference[];
1191
1318
  /**
1192
1319
  * Override to the requirement's impact score. At least one of status or impact must be set.
1193
1320
  */
@@ -1898,6 +2025,55 @@ export declare enum TargetType {
1898
2025
  Network = "network",
1899
2026
  Repository = "repository"
1900
2027
  }
2028
+ /**
2029
+ * Derived-document lineage for a reconciled result set (an hdf-results produced by
2030
+ * applyChangeEvents rather than a scanner). Records exactly which seed and event horizon the
2031
+ * document represents so it can never masquerade as primary scan evidence. Conceptually PROV
2032
+ * qualified derivation: derived entity, used entity (seed), activity (event application),
2033
+ * generation time (asOf).
2034
+ */
2035
+ export interface Derivation {
2036
+ /**
2037
+ * The posture-as-of time of this reconciled view (RFC 3339, trimmed UTC) — the analog of
2038
+ * PROV's generatedAtTime.
2039
+ */
2040
+ asOf: Date;
2041
+ /**
2042
+ * Number of change events applied to the seed to produce this document.
2043
+ */
2044
+ eventsApplied: number;
2045
+ /**
2046
+ * The authoritative snapshot this document was reassembled from, pinned by content.
2047
+ */
2048
+ seed: Seed;
2049
+ /**
2050
+ * URI of the event-stream producer context whose events were applied (matches the events'
2051
+ * envelope source).
2052
+ */
2053
+ source: string;
2054
+ /**
2055
+ * The event watermark: the highest per-key sequence number applied. Downstream precedence
2056
+ * rule: a full-scan document supersedes the reconciled view as of its scan time; between
2057
+ * scans, the reconciled document with the highest throughSequence is the current posture.
2058
+ */
2059
+ throughSequence: number;
2060
+ [property: string]: any;
2061
+ }
2062
+ /**
2063
+ * The authoritative snapshot this document was reassembled from, pinned by content.
2064
+ */
2065
+ export interface Seed {
2066
+ /**
2067
+ * Checksum of the seed snapshot, REQUIRED: the derivation pins an immutable snapshot by
2068
+ * content, not just location.
2069
+ */
2070
+ checksum: Checksum;
2071
+ /**
2072
+ * URI to the seed snapshot document (relative path or absolute URL).
2073
+ */
2074
+ uri: string;
2075
+ [property: string]: any;
2076
+ }
1901
2077
  /**
1902
2078
  * Information about the tool that generated this HDF file.
1903
2079
  */
@@ -2040,9 +2216,13 @@ export interface StatisticBlock {
2040
2216
  */
2041
2217
  export interface Tool {
2042
2218
  /**
2043
- * The file format, if it is a recognized named format shared by multiple tools. Examples:
2044
- * 'SARIF', 'XCCDF'. Omit for tool-specific formats where the tool name already implies the
2045
- * format (Nessus XML, gosec JSON).
2219
+ * The named format of the source data, when it follows a recognized format specification
2220
+ * with its own identity: an interchange format emitted by many tools ('SARIF', 'XCCDF',
2221
+ * 'OSCAL') or one of several named output formats a single tool produces ('FVDL',
2222
+ * 'exec-json', 'FPF'). Never a serialization structure — 'JSON', 'XML', and 'CSV' are
2223
+ * encodings, not formats. Omit for a tool's native output: an absent format means the
2224
+ * tool's own shape, and data arriving as a named format is converted by that format's
2225
+ * converter, which sets this field alongside the producing tool's name.
2046
2226
  */
2047
2227
  format?: string;
2048
2228
  /**
@@ -2103,6 +2283,12 @@ export interface HDFBaseline {
2103
2283
  * The email address or other contact information of the copyright holder(s).
2104
2284
  */
2105
2285
  copyrightEmail?: string;
2286
+ /**
2287
+ * Optional references to external artifacts relevant to this baseline (CTI/STIX,
2288
+ * advisories, source catalogs, or any URI-addressable artifact). Travels with the baseline
2289
+ * definition. Inert context; see External_Reference.
2290
+ */
2291
+ externalReferences?: ExternalReference[];
2106
2292
  /**
2107
2293
  * Optional key-value labels for flexible grouping. Well-known keys: system, component,
2108
2294
  * environment, region, team. Values must be strings.
@@ -2194,6 +2380,13 @@ export interface BaselineRequirement {
2194
2380
  * family/id but should not assume a default.
2195
2381
  */
2196
2382
  controlType?: ControlType;
2383
+ /**
2384
+ * Optional references to external artifacts relevant to this requirement (CTI/STIX
2385
+ * correlation, advisories, control/definition sources, or any URI-addressable artifact).
2386
+ * Applies to both baseline requirement definitions and evaluated requirements. Inert
2387
+ * context; see External_Reference.
2388
+ */
2389
+ externalReferences?: ExternalReference[];
2197
2390
  /**
2198
2391
  * The set of references to external documents.
2199
2392
  */
@@ -2252,6 +2445,11 @@ export interface HDFComparison {
2252
2445
  extensions?: {
2253
2446
  [key: string]: any;
2254
2447
  };
2448
+ /**
2449
+ * Optional references to external artifacts relevant to this comparison (CTI/STIX,
2450
+ * advisories, or any URI-addressable artifact). Inert context; see External_Reference.
2451
+ */
2452
+ externalReferences?: ExternalReference[];
2255
2453
  /**
2256
2454
  * Schema version for this comparison format.
2257
2455
  */
@@ -2535,12 +2733,17 @@ export interface RequirementDiff {
2535
2733
  [property: string]: any;
2536
2734
  }
2537
2735
  /**
2538
- * The reason a requirement's state changed between sources.
2736
+ * The reason a requirement's state changed between sources. 'dispositionChanged' = the governing
2737
+ * override type differs between the sources (e.g. a waiver replaced a riskAdjustment);
2738
+ * 'effectiveImpactChanged' = the post-override impact score differs while the base impact may be
2739
+ * unchanged.
2539
2740
  */
2540
2741
  export declare enum ChangeReason {
2541
2742
  BaselineUpgraded = "baselineUpgraded",
2542
2743
  ConfigChanged = "configChanged",
2543
2744
  ControlMapped = "controlMapped",
2745
+ DispositionChanged = "dispositionChanged",
2746
+ EffectiveImpactChanged = "effectiveImpactChanged",
2544
2747
  ImpactChanged = "impactChanged",
2545
2748
  MetadataChanged = "metadataChanged",
2546
2749
  OverrideAdded = "overrideAdded",
@@ -3004,6 +3207,12 @@ export interface HDFSystem {
3004
3207
  * Description of the system's purpose and mission.
3005
3208
  */
3006
3209
  description?: string;
3210
+ /**
3211
+ * Optional references to external artifacts describing this system's threat environment or
3212
+ * context (CTI/STIX, BOMs, advisories, or any URI-addressable artifact). Inert context; see
3213
+ * External_Reference.
3214
+ */
3215
+ externalReferences?: ExternalReference[];
3007
3216
  /**
3008
3217
  * Information about the tool that generated this system document.
3009
3218
  */
@@ -3181,6 +3390,12 @@ export interface HDFPlan {
3181
3390
  * Description of the plan's purpose and scope.
3182
3391
  */
3183
3392
  description?: string;
3393
+ /**
3394
+ * Optional references to external artifacts relevant to this assessment plan (CTI/STIX,
3395
+ * advisories, methodology docs, or any URI-addressable artifact). Inert context; see
3396
+ * External_Reference.
3397
+ */
3398
+ externalReferences?: ExternalReference[];
3184
3399
  /**
3185
3400
  * Information about the tool that generated this plan.
3186
3401
  */
@@ -3431,6 +3646,12 @@ export interface StandaloneOverride {
3431
3646
  * format.
3432
3647
  */
3433
3648
  expiresAt: Date;
3649
+ /**
3650
+ * Optional references to the external artifacts behind this override (e.g. the STIX
3651
+ * bundle/object, advisory, or CTI feed that motivated it). Inert context distinct from
3652
+ * `evidence`; see External_Reference.
3653
+ */
3654
+ externalReferences?: ExternalReference[];
3434
3655
  /**
3435
3656
  * Override to the requirement's impact score. At least one of status or impact must be set.
3436
3657
  */
@@ -3505,6 +3726,12 @@ export interface HDFEvidencePackage {
3505
3726
  * here rather than transcoding them.
3506
3727
  */
3507
3728
  externalEvidence?: ExternalEvidenceReference[];
3729
+ /**
3730
+ * Optional references to external artifacts relevant to this evidence package (CTI/STIX,
3731
+ * BOMs, advisories, or any URI-addressable artifact) beyond the document references it
3732
+ * already carries. Inert context; see External_Reference.
3733
+ */
3734
+ externalReferences?: ExternalReference[];
3508
3735
  /**
3509
3736
  * Information about the tool that generated this document.
3510
3737
  */
@@ -3720,3 +3947,123 @@ export interface ExternalEvidenceTimeRange {
3720
3947
  start?: Date;
3721
3948
  [property: string]: any;
3722
3949
  }
3950
+ /**
3951
+ * A single continuous-monitoring wire event: one requirement's effective posture changed on one
3952
+ * system component. The streaming increment of a systemDrift hdf-comparison — events fold into
3953
+ * comparisons and reassemble into hdf-results, they never mutate documents in place. One event per
3954
+ * wire document (NDJSON-friendly). The envelope (identity, ordering, hash chain) is the shared
3955
+ * Change_Event_Envelope primitive; the payload carries the producer-computable change state, a thin
3956
+ * before projection, and the full after requirement (the evidence a responder opens the event for).
3957
+ * Design: ADR-0005.
3958
+ */
3959
+ export interface HDFRequirementChangeEvent {
3960
+ /**
3961
+ * The full requirement as evaluated after the change — required and non-null for every
3962
+ * state except absent (null there: the requirement left the assessment scope). Full content
3963
+ * is load-bearing twice over: reassembly parity (applyChangeEvents cannot reproduce changed
3964
+ * result content from a projection) and triage (the failing results[] ARE the 'why' a
3965
+ * responder opens the event for).
3966
+ */
3967
+ after: any;
3968
+ /**
3969
+ * Thin projection of the prior effective posture, for at-a-glance alerting without a
3970
+ * state-store lookup. Null exactly when state is new (no prior posture exists). The full
3971
+ * prior state is recoverable from the consumer's materialized state; the envelope's
3972
+ * priorChecksum covers the integrity of that recovery.
3973
+ */
3974
+ before: any;
3975
+ /**
3976
+ * Why the state changed. An overrideExpired flip is a different triage than resultChanged:
3977
+ * the control did not get worse, a waiver lapsed.
3978
+ */
3979
+ changeReasons?: EventChangeReason[];
3980
+ /**
3981
+ * Canonical requirement identifier — the same identity as Requirement_Diff.id and the
3982
+ * requirement's id in hdf-results. Together with the envelope's (systemRef, componentId)
3983
+ * this forms the durable entity key. A requirement renumbering is emitted as absent + new
3984
+ * under the two keys, never an in-place key change; batch comparison reconciles renames via
3985
+ * its oldId/newId matching.
3986
+ */
3987
+ requirementId: string;
3988
+ /**
3989
+ * The producer-computable subset of Requirement_State: new | absent | updated | fixed |
3990
+ * regressed. fixed and regressed carry the direction SARIF's baselineState lacks; project
3991
+ * down to SARIF's closed 4 values for external interop.
3992
+ */
3993
+ state: EventRequirementState;
3994
+ /**
3995
+ * componentId of the system component this event concerns.
3996
+ */
3997
+ componentId: string;
3998
+ /**
3999
+ * Identity of this event occurrence, unique per source. (source, eventId) is the
4000
+ * deduplication key: consumers may treat events with identical source and eventId as
4001
+ * duplicates. UUIDv7 (time-ordered) is recommended but not required.
4002
+ */
4003
+ eventId: string;
4004
+ /**
4005
+ * The effectiveChecksum of the entity state this event supersedes, forming a per-key hash
4006
+ * chain: a mismatch or gap against stored state is detectable, letting a consumer mark the
4007
+ * key unverified instead of serving stale posture. Null at chain start (no prior state,
4008
+ * e.g. a new entity or the first event after a seed). The chain provides tamper/gap
4009
+ * evidence given a trusted head; completeness is anchored out-of-band by periodic
4010
+ * re-centering rescans.
4011
+ */
4012
+ priorChecksum: any;
4013
+ /**
4014
+ * The versioned schema $id this event validates against, so events self-describe on
4015
+ * heterogeneous streams. Recommended on every wire event.
4016
+ */
4017
+ schemaRef?: string;
4018
+ /**
4019
+ * Monotonically increasing sequence number per entity key. The ONLY ordering authority for
4020
+ * folding: consumers keep the greatest sequence per key regardless of arrival order or
4021
+ * timestamp. Deliberately per-entity-key (event-sourcing aggregate-version practice) rather
4022
+ * than per-source.
4023
+ */
4024
+ sequence: number;
4025
+ /**
4026
+ * URI identifying the producer context that emitted this event (for example, a scanner
4027
+ * instance and profile). eventId uniqueness and sequence numbering are scoped per source.
4028
+ */
4029
+ source: string;
4030
+ /**
4031
+ * URI to the hdf-system document (authorization boundary) this event applies to. Resolves
4032
+ * to the latest version of the evolving system document.
4033
+ */
4034
+ systemRef: string;
4035
+ /**
4036
+ * Occurrence time of the observed change (RFC 3339, trimmed UTC). Display and audit
4037
+ * metadata only — NEVER an ordering key; ordering is sequence's job.
4038
+ */
4039
+ timestamp: Date;
4040
+ [property: string]: any;
4041
+ }
4042
+ /**
4043
+ * The producer-computable subset of the comparison vocabulary's Change_Reason, value-identical with
4044
+ * the parent enum (test-enforced). Batch-only reasons (baselineUpgraded, controlMapped,
4045
+ * scannerChanged, targetChanged, metadataChanged) require cross-corpus context and are excluded.
4046
+ */
4047
+ export declare enum EventChangeReason {
4048
+ ConfigChanged = "configChanged",
4049
+ ImpactChanged = "impactChanged",
4050
+ OverrideAdded = "overrideAdded",
4051
+ OverrideExpired = "overrideExpired",
4052
+ OverrideModified = "overrideModified",
4053
+ OverrideRemoved = "overrideRemoved",
4054
+ ResultChanged = "resultChanged"
4055
+ }
4056
+ /**
4057
+ * The producer-computable subset of the comparison vocabulary's Requirement_State. Kept
4058
+ * value-identical with the parent enum (test-enforced): the batch-only states (moved, split,
4059
+ * merged) are outputs of cross-document identity resolution a per-key producer cannot compute.
4060
+ * Declared as a distinct named type (rather than a $ref intersection) so generated Go/TS types keep
4061
+ * stable, distinct enum names.
4062
+ */
4063
+ export declare enum EventRequirementState {
4064
+ Absent = "absent",
4065
+ Fixed = "fixed",
4066
+ New = "new",
4067
+ Regressed = "regressed",
4068
+ Updated = "updated"
4069
+ }