@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/README.md +9 -0
- package/dist/go/hdf.go +1470 -1276
- package/dist/helpers.d.ts +7 -5
- package/dist/helpers.js +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +28 -28
- package/dist/schemas/hdf-amendments.schema.json +562 -112
- package/dist/schemas/hdf-baseline.schema.json +570 -118
- package/dist/schemas/hdf-comparison.schema.json +997 -242
- package/dist/schemas/hdf-evidence-package.schema.json +566 -115
- package/dist/schemas/hdf-plan.schema.json +568 -118
- package/dist/schemas/hdf-requirement-change-event.schema.json +658 -211
- package/dist/schemas/hdf-results.schema.json +644 -197
- package/dist/schemas/hdf-system.schema.json +604 -147
- package/dist/ts/hdf.d.ts +284 -56
- package/dist/ts/hdf.js +24 -9
- package/dist/ts/hdf.ts +285 -50
- package/package.json +3 -3
package/dist/ts/hdf.d.ts
CHANGED
|
@@ -19,12 +19,10 @@ export interface HDFResults {
|
|
|
19
19
|
*/
|
|
20
20
|
derivation?: Derivation;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* Producer data outside the HDF model, and the pre-converted source artifact(s) these
|
|
23
|
+
* results were converted from.
|
|
24
24
|
*/
|
|
25
|
-
extensions?:
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
};
|
|
25
|
+
extensions?: Extensions;
|
|
28
26
|
/**
|
|
29
27
|
* Optional references to external artifacts (CTI/STIX, BOMs, advisories, runbooks, or any
|
|
30
28
|
* URI-addressable artifact) relevant to this assessment as a whole. Inert context; see
|
|
@@ -98,15 +96,10 @@ export interface EvaluatedBaseline {
|
|
|
98
96
|
*/
|
|
99
97
|
depends?: Dependency[];
|
|
100
98
|
/**
|
|
101
|
-
*
|
|
99
|
+
* Producer data outside the HDF model that belongs to this baseline rather than to the
|
|
100
|
+
* document, and the pre-converted source artifact(s) this baseline was built from.
|
|
102
101
|
*/
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Reserved for tool-specific baseline metadata not defined in the HDF standard.
|
|
106
|
-
*/
|
|
107
|
-
extensions?: {
|
|
108
|
-
[key: string]: any;
|
|
109
|
-
};
|
|
102
|
+
extensions?: Extensions;
|
|
110
103
|
/**
|
|
111
104
|
* A set of descriptions for the requirement groups.
|
|
112
105
|
*/
|
|
@@ -138,8 +131,10 @@ export interface EvaluatedBaseline {
|
|
|
138
131
|
requirements: EvaluatedRequirement[];
|
|
139
132
|
/**
|
|
140
133
|
* SHA-256 checksum of the raw results before any amendments (statusOverrides or POAMs).
|
|
141
|
-
* Used to detect tampering with test results.
|
|
142
|
-
*
|
|
134
|
+
* Used to detect tampering with test results. Amendment integrity is checked against the
|
|
135
|
+
* document-level preAmendmentChecksum at the root, not this per-baseline value: hdf amend
|
|
136
|
+
* apply writes it as the hash of the raw document bytes immediately before the most recent
|
|
137
|
+
* amendment application, one step back only.
|
|
143
138
|
*/
|
|
144
139
|
resultsChecksum?: Checksum;
|
|
145
140
|
/**
|
|
@@ -159,6 +154,11 @@ export interface EvaluatedBaseline {
|
|
|
159
154
|
* The email address or other contact information of the copyright holder(s).
|
|
160
155
|
*/
|
|
161
156
|
copyrightEmail?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Prose description of the baseline, more detailed than summary. Carried verbatim, like
|
|
159
|
+
* every HDF prose field.
|
|
160
|
+
*/
|
|
161
|
+
description?: string;
|
|
162
162
|
/**
|
|
163
163
|
* Optional references to external artifacts relevant to this baseline (CTI/STIX,
|
|
164
164
|
* advisories, source catalogs, or any URI-addressable artifact). Travels with the baseline
|
|
@@ -245,6 +245,53 @@ export interface Dependency {
|
|
|
245
245
|
url?: string;
|
|
246
246
|
[property: string]: any;
|
|
247
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Carrier for data outside the HDF model: `passthrough` for producer data HDF does not model,
|
|
250
|
+
* `rawSourceArtifacts` for the pre-converted input(s). CLOSED: these two members are the whole of
|
|
251
|
+
* it. A key HDF does not define goes inside `passthrough` — that is what `passthrough` is for — so
|
|
252
|
+
* `extensions` never becomes a second, unnamed schema that consumers must reverse-engineer from the
|
|
253
|
+
* producers that happen to write it. Closed with `additionalProperties` rather than the house
|
|
254
|
+
* `unevaluatedProperties` because this definition composes nothing, and the shipped Go validator is
|
|
255
|
+
* a draft-07 engine that does not implement `unevaluatedProperties` — a closure only one of the two
|
|
256
|
+
* validators enforces is not a closure. Declared on every HDF document type that carries a producer
|
|
257
|
+
* envelope (`generator` / `integrity`), and on `Evaluated_Baseline`, so one rule governs both
|
|
258
|
+
* sites.
|
|
259
|
+
*/
|
|
260
|
+
export interface Extensions {
|
|
261
|
+
/**
|
|
262
|
+
* Catch-all for producer data that HDF does not model — the role heimdall2's
|
|
263
|
+
* `passthrough.auxiliary_data` played: fields a converter deliberately carried but had no
|
|
264
|
+
* home for.
|
|
265
|
+
*
|
|
266
|
+
* Deliberately permissive: unenumerated properties are accepted by design, with no shape
|
|
267
|
+
* imposed on them. HDF neither reads nor interprets what is here. It is the ONLY permissive
|
|
268
|
+
* surface in `extensions` — everything HDF does not define belongs here rather than beside
|
|
269
|
+
* it.
|
|
270
|
+
*
|
|
271
|
+
* This is NOT where the pre-converted source artifact goes. v2 put it here only because
|
|
272
|
+
* nothing else had room; `rawSourceArtifacts` is its home now, and it gives the bytes a
|
|
273
|
+
* checksum, a media type and a reference contract that an untyped object cannot.
|
|
274
|
+
*
|
|
275
|
+
* For data that belongs to one requirement rather than to the document, use that object's
|
|
276
|
+
* own fields — a document-level bag cannot say which requirement it describes.
|
|
277
|
+
*/
|
|
278
|
+
passthrough?: {
|
|
279
|
+
[key: string]: any;
|
|
280
|
+
};
|
|
281
|
+
/**
|
|
282
|
+
* The input(s) this document was converted from, verbatim.
|
|
283
|
+
*
|
|
284
|
+
* An array because a conversion can consume more than one artifact — the OSCAL profile path
|
|
285
|
+
* takes a profile and a catalog. Every other converter takes one input, and an array of one
|
|
286
|
+
* costs nothing.
|
|
287
|
+
*
|
|
288
|
+
* Populating this is required of ingest converters by policy, enforced by the converter
|
|
289
|
+
* contract and test harness rather than by a schema `required`: a tool that emits HDF
|
|
290
|
+
* natively has no source artifact, and requiring the field would make valid native HDF
|
|
291
|
+
* invalid.
|
|
292
|
+
*/
|
|
293
|
+
rawSourceArtifacts?: ExternalReference[];
|
|
294
|
+
}
|
|
248
295
|
/**
|
|
249
296
|
* A generalized reference to any external artifact by identity and/or location, modeled on the STIX
|
|
250
297
|
* 2.1 `external_references` common property. Purpose-agnostic: cite a CVE, an ATT&CK technique, a
|
|
@@ -252,8 +299,11 @@ export interface Dependency {
|
|
|
252
299
|
* HDF reference category. `sourceName` names the system; `externalId` cites by id within that
|
|
253
300
|
* system; `href` locates it. `sourceName` + `externalId` is equivalently a URN
|
|
254
301
|
* (`urn:<sourceName>:<externalId>`, RFC 8141), so the by-identity and by-location forms stay
|
|
255
|
-
* interconvertible.
|
|
256
|
-
*
|
|
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.
|
|
257
307
|
*/
|
|
258
308
|
export interface ExternalReference {
|
|
259
309
|
/**
|
|
@@ -266,18 +316,36 @@ export interface ExternalReference {
|
|
|
266
316
|
*/
|
|
267
317
|
addedBy?: Identity;
|
|
268
318
|
/**
|
|
269
|
-
* Integrity hash of the
|
|
270
|
-
* `
|
|
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.
|
|
271
323
|
*/
|
|
272
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;
|
|
273
337
|
/**
|
|
274
338
|
* Human-readable description of what is referenced. Satisfies the at-least-one rule on its
|
|
275
339
|
* own when neither id nor href is available.
|
|
276
340
|
*/
|
|
277
341
|
description?: string;
|
|
278
342
|
/**
|
|
279
|
-
* Optional lossless embedded copy of the referenced artifact — the raw
|
|
280
|
-
* 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.
|
|
281
349
|
*
|
|
282
350
|
* Composes with `href`/`externalId` (which point at the artifact) and `checksum` (which
|
|
283
351
|
* ties the copy to the source): a single entry can both point and embed.
|
|
@@ -288,6 +356,15 @@ export interface ExternalReference {
|
|
|
288
356
|
document?: {
|
|
289
357
|
[key: string]: any;
|
|
290
358
|
};
|
|
359
|
+
/**
|
|
360
|
+
* How to read `content` back into the artifact's bytes. 'utf-8' for text (XML, CSV, NDJSON,
|
|
361
|
+
* plain text, JavaScript-wrapped JSON); 'base64' for anything that is not valid UTF-8
|
|
362
|
+
* text.
|
|
363
|
+
*
|
|
364
|
+
* Required whenever `content` is present, and meaningless without it — an embedded copy
|
|
365
|
+
* whose encoding a consumer has to guess is not lossless.
|
|
366
|
+
*/
|
|
367
|
+
encoding?: ExternalReferenceEncoding;
|
|
291
368
|
/**
|
|
292
369
|
* Identifier of the artifact within `sourceName` (e.g., 'CVE-2021-44228' for source 'cve',
|
|
293
370
|
* 'T1059' for 'mitre-att&ck'). Cite by id without needing a URL. Together with `sourceName`
|
|
@@ -296,8 +373,8 @@ export interface ExternalReference {
|
|
|
296
373
|
externalId?: string;
|
|
297
374
|
/**
|
|
298
375
|
* Location of the artifact. `uri-reference` (not `uri`) so a bare internal
|
|
299
|
-
* `#fragment`/`#uuid` reference is expressible alongside absolute URLs.
|
|
300
|
-
*
|
|
376
|
+
* `#fragment`/`#uuid` reference is expressible alongside absolute URLs. Set it only when
|
|
377
|
+
* the location is meaningful to a reader — never a producer's local filesystem path.
|
|
301
378
|
*/
|
|
302
379
|
href?: string;
|
|
303
380
|
/**
|
|
@@ -314,8 +391,9 @@ export interface ExternalReference {
|
|
|
314
391
|
*/
|
|
315
392
|
kind?: string;
|
|
316
393
|
/**
|
|
317
|
-
* IANA media type of the
|
|
318
|
-
* '
|
|
394
|
+
* IANA media type of the artifact (RFC 6838), e.g., 'application/json', 'application/xml',
|
|
395
|
+
* 'text/csv'. Applies both to an artifact retrievable at `href` and to one embedded here in
|
|
396
|
+
* `content` or `document`.
|
|
319
397
|
*/
|
|
320
398
|
mediaType?: string;
|
|
321
399
|
/**
|
|
@@ -394,8 +472,14 @@ export interface Checksum {
|
|
|
394
472
|
[property: string]: any;
|
|
395
473
|
}
|
|
396
474
|
/**
|
|
397
|
-
*
|
|
398
|
-
* container-image and other artifact digests that use it.
|
|
475
|
+
* Cryptographic hash algorithms a checksum or integrity record may name. blake3 covers
|
|
476
|
+
* container-image and other artifact digests that use it. HDF tooling verifies every algorithm in
|
|
477
|
+
* this enum, so any of them may be recorded where the checksum needs to be verifiable. md5 and sha1
|
|
478
|
+
* are excluded deliberately: a checksum or integrity record exists to detect tampering, and both
|
|
479
|
+
* are collision-broken, so a digest in either would look verifiable while proving nothing. A source
|
|
480
|
+
* tool digest in an excluded algorithm is not recorded as a checksum. Admitting weak hashes as an
|
|
481
|
+
* application-level accept/reject decision was considered and rejected; widening this enum is a
|
|
482
|
+
* schema decision, not an oversight.
|
|
399
483
|
*/
|
|
400
484
|
export declare enum HashAlgorithm {
|
|
401
485
|
Blake3 = "blake3",
|
|
@@ -403,6 +487,14 @@ export declare enum HashAlgorithm {
|
|
|
403
487
|
Sha384 = "sha384",
|
|
404
488
|
Sha512 = "sha512"
|
|
405
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* How an embedded copy's bytes are read back: 'utf-8' for text, 'base64' for anything that is not
|
|
492
|
+
* valid UTF-8 text.
|
|
493
|
+
*/
|
|
494
|
+
export declare enum ExternalReferenceEncoding {
|
|
495
|
+
Base64 = "base64",
|
|
496
|
+
UTF8 = "utf-8"
|
|
497
|
+
}
|
|
406
498
|
/**
|
|
407
499
|
* Describes a group of requirements, such as those defined in a single file.
|
|
408
500
|
*/
|
|
@@ -469,7 +561,9 @@ export interface Input {
|
|
|
469
561
|
*/
|
|
470
562
|
export interface InputConstraints {
|
|
471
563
|
/**
|
|
472
|
-
* Enumeration of permitted values.
|
|
564
|
+
* Enumeration of permitted values. Each entry may be any JSON value, the same freedom
|
|
565
|
+
* Input.value has: an Array or Hash input enumerates container values, so no element type
|
|
566
|
+
* is imposed.
|
|
473
567
|
*/
|
|
474
568
|
allowedValues?: any[];
|
|
475
569
|
/**
|
|
@@ -645,7 +739,11 @@ export interface EvaluatedRequirement {
|
|
|
645
739
|
*/
|
|
646
740
|
statusOverrides?: StatusOverride[];
|
|
647
741
|
/**
|
|
648
|
-
* The requirement identifier
|
|
742
|
+
* The requirement identifier, naming the requirement itself rather than one finding of it.
|
|
743
|
+
* Example: 'SV-238196'. Several entries in one baseline may legitimately carry the same id
|
|
744
|
+
* (one scanner reporting one CVE against several packages, or an overlay restating what it
|
|
745
|
+
* inherits), so an id is not an instance key: index requirements as id to list, never id to
|
|
746
|
+
* one, and an amendment addressing an id applies to every entry carrying it.
|
|
649
747
|
*/
|
|
650
748
|
id: string;
|
|
651
749
|
/**
|
|
@@ -954,10 +1052,11 @@ export interface Description {
|
|
|
954
1052
|
* to 'notApplicable'. The disposition field on the requirement distinguishes false positives from
|
|
955
1053
|
* genuinely not-applicable findings. - 'riskAdjustment': impact score adjusted based on
|
|
956
1054
|
* environmental context (FedRAMP Risk Adjustment); does not change pass/fail status, only impact
|
|
957
|
-
* via the impact field. - 'operationalRequirement':
|
|
958
|
-
* (FedRAMP Operational Requirement); the finding
|
|
959
|
-
* the affected functionality. Remains an open
|
|
960
|
-
* v3.1.0 — use 'waiver' with status
|
|
1055
|
+
* via the impact field; a status on it is rejected by validation. - 'operationalRequirement':
|
|
1056
|
+
* deviation required by operational constraints (FedRAMP Operational Requirement); the finding
|
|
1057
|
+
* cannot be remediated because the system requires the affected functionality. Remains an open
|
|
1058
|
+
* risk. Migration note: 'exception' was removed in v3.1.0 — use 'waiver' with status
|
|
1059
|
+
* 'notApplicable' instead.
|
|
961
1060
|
*/
|
|
962
1061
|
export declare enum OverrideType {
|
|
963
1062
|
Attestation = "attestation",
|
|
@@ -1303,6 +1402,13 @@ export interface RequirementResult {
|
|
|
1303
1402
|
* explain why a test was not applicable or not reviewed.
|
|
1304
1403
|
*/
|
|
1305
1404
|
message?: string;
|
|
1405
|
+
/**
|
|
1406
|
+
* The source tool's own record for this result, carrying every field the record had.
|
|
1407
|
+
* Complete, not necessarily byte-exact: see Raw_Source_Record.content for the producer and
|
|
1408
|
+
* consumer obligations, and extensions.rawSourceArtifacts[] when byte-exact carriage is
|
|
1409
|
+
* required.
|
|
1410
|
+
*/
|
|
1411
|
+
rawSourceRecord?: RawSourceRecord;
|
|
1306
1412
|
/**
|
|
1307
1413
|
* The resource used in the test. Example: 'file', 'command', 'service'.
|
|
1308
1414
|
*/
|
|
@@ -1325,6 +1431,66 @@ export interface RequirementResult {
|
|
|
1325
1431
|
status: ResultStatus;
|
|
1326
1432
|
[property: string]: any;
|
|
1327
1433
|
}
|
|
1434
|
+
/**
|
|
1435
|
+
* The source tool's own record for this result — the one entry in the converter's input that
|
|
1436
|
+
* produced it, complete though not necessarily byte-for-byte (see `content`). SCOPED TO THE RESULT
|
|
1437
|
+
* DELIBERATELY. For a vulnerability scanner the native record is one (vulnerability, package) pair,
|
|
1438
|
+
* which is exactly one result: a CVE reported against two packages yields two entries whose records
|
|
1439
|
+
* differ only in the package they matched. Held on the requirement instead, those two records would
|
|
1440
|
+
* collide, and merging entries that share an id would have to discard one — so the result is not
|
|
1441
|
+
* merely an available home but the correct one. Distinct from `extensions.rawSourceArtifacts[]`,
|
|
1442
|
+
* which carries whole input artifacts: this carries the one record inside one of them, and
|
|
1443
|
+
* `pointer` ties the two together. A consumer that wants the whole input reads the artifact; one
|
|
1444
|
+
* that wants provenance for a single finding reads this. Distinct from `code`, which means the code
|
|
1445
|
+
* that ran to evaluate the requirement — an InSpec control's source, or a check reference. A
|
|
1446
|
+
* serialized finding is not code, and putting one there overloaded a field whose meaning came from
|
|
1447
|
+
* InSpec. CLOSED, and deliberately not a passthrough bag: three required members and an optional
|
|
1448
|
+
* pointer are the whole of it. Producer data that HDF does not model belongs in
|
|
1449
|
+
* `extensions.passthrough`, which is document-scoped and permissive by design; this field is
|
|
1450
|
+
* neither. Closed with `additionalProperties` rather than the house `unevaluatedProperties` because
|
|
1451
|
+
* this definition composes nothing, and the shipped Go validator is a draft-07 engine that does not
|
|
1452
|
+
* implement `unevaluatedProperties` — a closure only one of the two validators enforces is not a
|
|
1453
|
+
* closure.
|
|
1454
|
+
*/
|
|
1455
|
+
export interface RawSourceRecord {
|
|
1456
|
+
/**
|
|
1457
|
+
* The source tool's own record for this result, carrying every field the record had.
|
|
1458
|
+
*
|
|
1459
|
+
* COMPLETE, NOT NECESSARILY BYTE-EXACT. A producer SHOULD write the record's bytes
|
|
1460
|
+
* unchanged where it can. A producer that cannot — notably one implemented in two languages
|
|
1461
|
+
* whose JSON serializers disagree on key order, HTML escaping and number rendering, and
|
|
1462
|
+
* which therefore MUST canonicalize to stay byte-identical with its twin — MAY write a
|
|
1463
|
+
* canonically serialized form instead. Such a form preserves every field and value but not
|
|
1464
|
+
* the original key order, insignificant whitespace, or duplicate keys. A consumer MUST
|
|
1465
|
+
* therefore compare records by parsing them, not by comparing bytes, and MUST NOT checksum
|
|
1466
|
+
* this field and expect the result to match a checksum of the input.
|
|
1467
|
+
*
|
|
1468
|
+
* For carriage that IS byte-exact, use `extensions.rawSourceArtifacts[]`, which forbids a
|
|
1469
|
+
* parsed `document` precisely so the bytes and their checksum survive; `pointer` ties this
|
|
1470
|
+
* record to its position within that artifact.
|
|
1471
|
+
*/
|
|
1472
|
+
content: string;
|
|
1473
|
+
/**
|
|
1474
|
+
* How to read `content`: 'utf-8' for text, 'base64' for bytes that are not valid UTF-8 text.
|
|
1475
|
+
*/
|
|
1476
|
+
encoding: ExternalReferenceEncoding;
|
|
1477
|
+
/**
|
|
1478
|
+
* The record's IANA media type — the type of this record, which for a fragment of a larger
|
|
1479
|
+
* artifact may be narrower than the artifact's own. Example: 'application/json' for one
|
|
1480
|
+
* match object out of a JSON report.
|
|
1481
|
+
*/
|
|
1482
|
+
mediaType: string;
|
|
1483
|
+
/**
|
|
1484
|
+
* Where this record sits inside the artifact it came from, as a JSON Pointer (RFC 6901) for
|
|
1485
|
+
* JSON sources or an XPath for XML ones. Example: '/matches/3'.
|
|
1486
|
+
*
|
|
1487
|
+
* Optional, and the link that makes carriage verifiable rather than merely present: with it
|
|
1488
|
+
* a consumer can confirm the record really is the subtree of
|
|
1489
|
+
* `extensions.rawSourceArtifacts[]` it claims to be. Omit it when the source's shape gives
|
|
1490
|
+
* a record no addressable location.
|
|
1491
|
+
*/
|
|
1492
|
+
pointer?: string;
|
|
1493
|
+
}
|
|
1328
1494
|
/**
|
|
1329
1495
|
* Severity rating for a requirement. Typically derived from the numeric impact score.
|
|
1330
1496
|
*/
|
|
@@ -1350,9 +1516,14 @@ export interface SourceLocation {
|
|
|
1350
1516
|
[property: string]: any;
|
|
1351
1517
|
}
|
|
1352
1518
|
/**
|
|
1353
|
-
* An intentional change to a requirement's compliance status and/or impact score
|
|
1354
|
-
*
|
|
1355
|
-
*
|
|
1519
|
+
* An intentional change to a requirement's compliance status and/or impact score, as it sits on the
|
|
1520
|
+
* requirement once applied. The same type-conditional rule as Standalone_Override: when type is
|
|
1521
|
+
* 'operationalRequirement', neither status nor impact may be set, because the override records an
|
|
1522
|
+
* accepted deviation without adjudicating the finding; it still governs disposition, and
|
|
1523
|
+
* effectiveStatus stays what the results decided. When type is 'riskAdjustment', status may not be
|
|
1524
|
+
* set: it re-rates the risk through impact and never changes pass/fail. For every other type, at
|
|
1525
|
+
* least one of status or impact must be set. All overrides must have an expiration date to enforce
|
|
1526
|
+
* periodic review.
|
|
1356
1527
|
*/
|
|
1357
1528
|
export interface StatusOverride {
|
|
1358
1529
|
/**
|
|
@@ -1388,7 +1559,8 @@ export interface StatusOverride {
|
|
|
1388
1559
|
*/
|
|
1389
1560
|
externalReferences?: ExternalReference[];
|
|
1390
1561
|
/**
|
|
1391
|
-
* Override to the requirement's impact score.
|
|
1562
|
+
* Override to the requirement's impact score. For every type except operationalRequirement,
|
|
1563
|
+
* at least one of status or impact must be set; an operationalRequirement carries neither.
|
|
1392
1564
|
*/
|
|
1393
1565
|
impact?: ImpactOverride;
|
|
1394
1566
|
/**
|
|
@@ -1420,7 +1592,8 @@ export interface StatusOverride {
|
|
|
1420
1592
|
signature?: Signature;
|
|
1421
1593
|
/**
|
|
1422
1594
|
* The new status this override sets for the requirement. Optional when only impact is being
|
|
1423
|
-
* overridden
|
|
1595
|
+
* overridden; forbidden on an operationalRequirement, which adjudicates nothing, and on a
|
|
1596
|
+
* riskAdjustment, which re-rates impact only.
|
|
1424
1597
|
*/
|
|
1425
1598
|
status?: ResultStatus;
|
|
1426
1599
|
/**
|
|
@@ -2328,6 +2501,11 @@ export interface HDFBaseline {
|
|
|
2328
2501
|
* The set of dependencies this baseline depends on.
|
|
2329
2502
|
*/
|
|
2330
2503
|
depends?: Dependency[];
|
|
2504
|
+
/**
|
|
2505
|
+
* Producer data outside the HDF model, and the pre-converted source artifact(s) this
|
|
2506
|
+
* baseline was converted from.
|
|
2507
|
+
*/
|
|
2508
|
+
extensions?: Extensions;
|
|
2331
2509
|
/**
|
|
2332
2510
|
* The tool that generated this file.
|
|
2333
2511
|
*/
|
|
@@ -2366,6 +2544,11 @@ export interface HDFBaseline {
|
|
|
2366
2544
|
* The email address or other contact information of the copyright holder(s).
|
|
2367
2545
|
*/
|
|
2368
2546
|
copyrightEmail?: string;
|
|
2547
|
+
/**
|
|
2548
|
+
* Prose description of the baseline, more detailed than summary. Carried verbatim, like
|
|
2549
|
+
* every HDF prose field.
|
|
2550
|
+
*/
|
|
2551
|
+
description?: string;
|
|
2369
2552
|
/**
|
|
2370
2553
|
* Optional references to external artifacts relevant to this baseline (CTI/STIX,
|
|
2371
2554
|
* advisories, source catalogs, or any URI-addressable artifact). Travels with the baseline
|
|
@@ -2425,7 +2608,11 @@ export interface BaselineRequirement {
|
|
|
2425
2608
|
*/
|
|
2426
2609
|
severity?: Severity;
|
|
2427
2610
|
/**
|
|
2428
|
-
* The requirement identifier
|
|
2611
|
+
* The requirement identifier, naming the requirement itself rather than one finding of it.
|
|
2612
|
+
* Example: 'SV-238196'. Several entries in one baseline may legitimately carry the same id
|
|
2613
|
+
* (one scanner reporting one CVE against several packages, or an overlay restating what it
|
|
2614
|
+
* inherits), so an id is not an instance key: index requirements as id to list, never id to
|
|
2615
|
+
* one, and an amendment addressing an id applies to every entry carrying it.
|
|
2429
2616
|
*/
|
|
2430
2617
|
id: string;
|
|
2431
2618
|
/**
|
|
@@ -2536,11 +2723,10 @@ export interface HDFComparison {
|
|
|
2536
2723
|
*/
|
|
2537
2724
|
drift?: RequirementDiff[];
|
|
2538
2725
|
/**
|
|
2539
|
-
*
|
|
2726
|
+
* Producer data outside the HDF model, and the pre-converted source artifact(s) this
|
|
2727
|
+
* comparison was derived from.
|
|
2540
2728
|
*/
|
|
2541
|
-
extensions?:
|
|
2542
|
-
[key: string]: any;
|
|
2543
|
-
};
|
|
2729
|
+
extensions?: Extensions;
|
|
2544
2730
|
/**
|
|
2545
2731
|
* Optional references to external artifacts relevant to this comparison (CTI/STIX,
|
|
2546
2732
|
* advisories, or any URI-addressable artifact). Inert context; see External_Reference.
|
|
@@ -2651,9 +2837,8 @@ export interface BaselineDiff {
|
|
|
2651
2837
|
[property: string]: any;
|
|
2652
2838
|
}
|
|
2653
2839
|
/**
|
|
2654
|
-
*
|
|
2655
|
-
*
|
|
2656
|
-
* The state of this component in the comparison.
|
|
2840
|
+
* How a baseline or component fared across the compared documents: new (only in the newer), absent
|
|
2841
|
+
* (only in the older), unchanged, or updated (present in both with a changed version).
|
|
2657
2842
|
*/
|
|
2658
2843
|
export declare enum BaselineDiffState {
|
|
2659
2844
|
Absent = "absent",
|
|
@@ -2751,6 +2936,12 @@ export interface RequirementDiff {
|
|
|
2751
2936
|
* IDs of annotations attached to this requirement diff.
|
|
2752
2937
|
*/
|
|
2753
2938
|
annotationIds?: string[];
|
|
2939
|
+
/**
|
|
2940
|
+
* Name of the baseline the requirement belongs to, so a consumer can group diffs the way
|
|
2941
|
+
* hdf diff --group-by baseline does. '(multiple)' when the id appears in more than one
|
|
2942
|
+
* baseline of the same document.
|
|
2943
|
+
*/
|
|
2944
|
+
baseline?: string;
|
|
2754
2945
|
/**
|
|
2755
2946
|
* The requirement as it appeared in the old/reference source. Null when state is 'new'.
|
|
2756
2947
|
*/
|
|
@@ -3134,7 +3325,8 @@ export interface ComparisonSummary {
|
|
|
3134
3325
|
*/
|
|
3135
3326
|
regressed?: number;
|
|
3136
3327
|
/**
|
|
3137
|
-
* Total number of
|
|
3328
|
+
* Total number of distinct requirement ids across all sources; an id carried by several
|
|
3329
|
+
* entries counts once.
|
|
3138
3330
|
*/
|
|
3139
3331
|
total: number;
|
|
3140
3332
|
/**
|
|
@@ -3303,6 +3495,11 @@ export interface HDFSystem {
|
|
|
3303
3495
|
* Description of the system's purpose and mission.
|
|
3304
3496
|
*/
|
|
3305
3497
|
description?: string;
|
|
3498
|
+
/**
|
|
3499
|
+
* Producer data outside the HDF model, and the pre-converted source artifact(s) this system
|
|
3500
|
+
* document was converted from.
|
|
3501
|
+
*/
|
|
3502
|
+
extensions?: Extensions;
|
|
3306
3503
|
/**
|
|
3307
3504
|
* Optional references to external artifacts describing this system's threat environment or
|
|
3308
3505
|
* context (CTI/STIX, BOMs, advisories, or any URI-addressable artifact). Inert context; see
|
|
@@ -3486,6 +3683,11 @@ export interface HDFPlan {
|
|
|
3486
3683
|
* Description of the plan's purpose and scope.
|
|
3487
3684
|
*/
|
|
3488
3685
|
description?: string;
|
|
3686
|
+
/**
|
|
3687
|
+
* Producer data outside the HDF model, and the pre-converted source artifact(s) this plan
|
|
3688
|
+
* was converted from.
|
|
3689
|
+
*/
|
|
3690
|
+
extensions?: Extensions;
|
|
3489
3691
|
/**
|
|
3490
3692
|
* Optional references to external artifacts relevant to this assessment plan (CTI/STIX,
|
|
3491
3693
|
* advisories, methodology docs, or any URI-addressable artifact). Inert context; see
|
|
@@ -3647,6 +3849,12 @@ export interface HDFAmendments {
|
|
|
3647
3849
|
* Description of the amendments' purpose and scope.
|
|
3648
3850
|
*/
|
|
3649
3851
|
description?: string;
|
|
3852
|
+
/**
|
|
3853
|
+
* Producer data outside the HDF model, and the pre-converted source artifact(s) these
|
|
3854
|
+
* amendments were converted from — the VEX family and oscal-poam-to-hdf all emit this
|
|
3855
|
+
* document type.
|
|
3856
|
+
*/
|
|
3857
|
+
extensions?: Extensions;
|
|
3650
3858
|
/**
|
|
3651
3859
|
* Information about the tool that generated this document.
|
|
3652
3860
|
*/
|
|
@@ -3685,11 +3893,13 @@ export interface HDFAmendments {
|
|
|
3685
3893
|
[property: string]: any;
|
|
3686
3894
|
}
|
|
3687
3895
|
/**
|
|
3688
|
-
* A standalone override to a requirement's compliance status or risk impact. Validation
|
|
3689
|
-
*
|
|
3690
|
-
*
|
|
3691
|
-
*
|
|
3692
|
-
*
|
|
3896
|
+
* A standalone override to a requirement's compliance status or risk impact. Validation is gated on
|
|
3897
|
+
* 'type': when type is 'operationalRequirement', neither 'status' nor 'impact' may be set — the
|
|
3898
|
+
* override records accepted risk without changing the finding (documentation-only). When type is
|
|
3899
|
+
* 'riskAdjustment', 'status' may not be set — it re-rates the risk through 'impact' and never
|
|
3900
|
+
* changes the finding's pass/fail; an override that must change status is a waiver or
|
|
3901
|
+
* falsePositive. For all other types, at least one of 'status' or 'impact' must be set. This rule
|
|
3902
|
+
* aligns with: - OSCAL Assessment Results — finding.target.status and
|
|
3693
3903
|
* finding.associated-risk[].facet[] are separate axes
|
|
3694
3904
|
* (https://pages.nist.gov/OSCAL/learn/concepts/layer/assessment/assessment-results/) - FedRAMP
|
|
3695
3905
|
* deviation request types — Risk Adjustment changes impact only, Operational Requirement documents
|
|
@@ -3789,8 +3999,9 @@ export interface StandaloneOverride {
|
|
|
3789
3999
|
*/
|
|
3790
4000
|
reason: string;
|
|
3791
4001
|
/**
|
|
3792
|
-
* The
|
|
3793
|
-
* baseline
|
|
4002
|
+
* The id of the requirement being amended. An id names the requirement, not one finding, so
|
|
4003
|
+
* the override applies to every requirement entry carrying that id in the baseline(s) it
|
|
4004
|
+
* targets.
|
|
3794
4005
|
*/
|
|
3795
4006
|
requirementId: string;
|
|
3796
4007
|
/**
|
|
@@ -3798,7 +4009,9 @@ export interface StandaloneOverride {
|
|
|
3798
4009
|
*/
|
|
3799
4010
|
signature?: Signature;
|
|
3800
4011
|
/**
|
|
3801
|
-
* The new status this
|
|
4012
|
+
* The new status this override sets for the requirement. Optional when only impact is being
|
|
4013
|
+
* overridden; forbidden on an operationalRequirement, which adjudicates nothing, and on a
|
|
4014
|
+
* riskAdjustment, which re-rates impact only.
|
|
3802
4015
|
*/
|
|
3803
4016
|
status?: ResultStatus;
|
|
3804
4017
|
/**
|
|
@@ -3824,6 +4037,11 @@ export interface HDFEvidencePackage {
|
|
|
3824
4037
|
* Description of the evidence package's purpose and scope.
|
|
3825
4038
|
*/
|
|
3826
4039
|
description?: string;
|
|
4040
|
+
/**
|
|
4041
|
+
* Producer data outside the HDF model, and the pre-converted source artifact(s) this
|
|
4042
|
+
* package was assembled from.
|
|
4043
|
+
*/
|
|
4044
|
+
extensions?: Extensions;
|
|
3827
4045
|
/**
|
|
3828
4046
|
* References to external native-format evidence (log/telemetry corpora and other artifacts)
|
|
3829
4047
|
* carried by URI + integrity hash + format discriminator, without recreating the data
|
|
@@ -3957,7 +4175,17 @@ export interface ContentReference {
|
|
|
3957
4175
|
*/
|
|
3958
4176
|
type: ContentType;
|
|
3959
4177
|
/**
|
|
3960
|
-
*
|
|
4178
|
+
* A uri-reference whose DECODED form is a path relative to the package document's own
|
|
4179
|
+
* directory — that is what the reference MEANS, independently of any one consumer.
|
|
4180
|
+
* Percent-escapes are part of the encoding, not the name: `my%20scans/q4.json` and `my
|
|
4181
|
+
* scans/q4.json` name the same file, and the escaped spelling is the one this field's
|
|
4182
|
+
* format admits. A consumer decodes before it resolves, never after, because decoding can
|
|
4183
|
+
* produce a parent traversal that containment must then see. It is never fetched: there is
|
|
4184
|
+
* no network retrieval anywhere in evidence handling. `uri-reference` admits shapes other
|
|
4185
|
+
* than a relative path and they stay schema-valid; how a consumer resolves one, and what it
|
|
4186
|
+
* does when it cannot, is that consumer's own contract. An artifact deliberately held
|
|
4187
|
+
* elsewhere belongs in externalEvidence[], which references it by URI and checksum without
|
|
4188
|
+
* retrieving it.
|
|
3961
4189
|
*/
|
|
3962
4190
|
uri: string;
|
|
3963
4191
|
[property: string]: any;
|
package/dist/ts/hdf.js
CHANGED
|
@@ -18,8 +18,14 @@ export var IdentityType;
|
|
|
18
18
|
IdentityType["Username"] = "username";
|
|
19
19
|
})(IdentityType || (IdentityType = {}));
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* container-image and other artifact digests that use it.
|
|
21
|
+
* Cryptographic hash algorithms a checksum or integrity record may name. blake3 covers
|
|
22
|
+
* container-image and other artifact digests that use it. HDF tooling verifies every algorithm in
|
|
23
|
+
* this enum, so any of them may be recorded where the checksum needs to be verifiable. md5 and sha1
|
|
24
|
+
* are excluded deliberately: a checksum or integrity record exists to detect tampering, and both
|
|
25
|
+
* are collision-broken, so a digest in either would look verifiable while proving nothing. A source
|
|
26
|
+
* tool digest in an excluded algorithm is not recorded as a checksum. Admitting weak hashes as an
|
|
27
|
+
* application-level accept/reject decision was considered and rejected; widening this enum is a
|
|
28
|
+
* schema decision, not an oversight.
|
|
23
29
|
*/
|
|
24
30
|
export var HashAlgorithm;
|
|
25
31
|
(function (HashAlgorithm) {
|
|
@@ -28,6 +34,15 @@ export var HashAlgorithm;
|
|
|
28
34
|
HashAlgorithm["Sha384"] = "sha384";
|
|
29
35
|
HashAlgorithm["Sha512"] = "sha512";
|
|
30
36
|
})(HashAlgorithm || (HashAlgorithm = {}));
|
|
37
|
+
/**
|
|
38
|
+
* How an embedded copy's bytes are read back: 'utf-8' for text, 'base64' for anything that is not
|
|
39
|
+
* valid UTF-8 text.
|
|
40
|
+
*/
|
|
41
|
+
export var ExternalReferenceEncoding;
|
|
42
|
+
(function (ExternalReferenceEncoding) {
|
|
43
|
+
ExternalReferenceEncoding["Base64"] = "base64";
|
|
44
|
+
ExternalReferenceEncoding["UTF8"] = "utf-8";
|
|
45
|
+
})(ExternalReferenceEncoding || (ExternalReferenceEncoding = {}));
|
|
31
46
|
/**
|
|
32
47
|
* Comparison operator for evaluating the input value against observed values. Numeric:
|
|
33
48
|
* eq/ne/lt/le/gt/ge. String: eq/ne/contains/matches. Collection: in/notIn.
|
|
@@ -146,10 +161,11 @@ export var Version;
|
|
|
146
161
|
* to 'notApplicable'. The disposition field on the requirement distinguishes false positives from
|
|
147
162
|
* genuinely not-applicable findings. - 'riskAdjustment': impact score adjusted based on
|
|
148
163
|
* environmental context (FedRAMP Risk Adjustment); does not change pass/fail status, only impact
|
|
149
|
-
* via the impact field. - 'operationalRequirement':
|
|
150
|
-
* (FedRAMP Operational Requirement); the finding
|
|
151
|
-
* the affected functionality. Remains an open
|
|
152
|
-
* v3.1.0 — use 'waiver' with status
|
|
164
|
+
* via the impact field; a status on it is rejected by validation. - 'operationalRequirement':
|
|
165
|
+
* deviation required by operational constraints (FedRAMP Operational Requirement); the finding
|
|
166
|
+
* cannot be remediated because the system requires the affected functionality. Remains an open
|
|
167
|
+
* risk. Migration note: 'exception' was removed in v3.1.0 — use 'waiver' with status
|
|
168
|
+
* 'notApplicable' instead.
|
|
153
169
|
*/
|
|
154
170
|
export var OverrideType;
|
|
155
171
|
(function (OverrideType) {
|
|
@@ -327,9 +343,8 @@ export var AnnotationCategory;
|
|
|
327
343
|
AnnotationCategory["Waiver"] = "waiver";
|
|
328
344
|
})(AnnotationCategory || (AnnotationCategory = {}));
|
|
329
345
|
/**
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
* The state of this component in the comparison.
|
|
346
|
+
* How a baseline or component fared across the compared documents: new (only in the newer), absent
|
|
347
|
+
* (only in the older), unchanged, or updated (present in both with a changed version).
|
|
333
348
|
*/
|
|
334
349
|
export var BaselineDiffState;
|
|
335
350
|
(function (BaselineDiffState) {
|