@mitre/hdf-schema 3.1.0 → 3.3.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/README.md +20 -14
- package/dist/go/go.mod +2 -2
- package/dist/go/hdf.go +570 -210
- package/dist/helpers.d.ts +5 -1
- package/dist/index.d.ts +27 -52
- package/dist/index.js +30 -48
- package/dist/schemas/hdf-amendments.schema.json +565 -45
- package/dist/schemas/hdf-baseline.schema.json +570 -50
- package/dist/schemas/hdf-comparison.schema.json +820 -103
- package/dist/schemas/hdf-evidence-package.schema.json +564 -44
- package/dist/schemas/hdf-plan.schema.json +571 -50
- package/dist/schemas/hdf-results.schema.json +777 -80
- package/dist/schemas/hdf-system.schema.json +596 -59
- package/dist/ts/hdf.d.ts +3562 -0
- package/dist/ts/hdf.js +564 -0
- package/dist/ts/hdf.ts +3623 -0
- package/package.json +18 -17
- package/dist/ts/hdf-amendments.d.ts +0 -474
- package/dist/ts/hdf-amendments.js +0 -88
- package/dist/ts/hdf-amendments.ts +0 -486
- package/dist/ts/hdf-baseline.d.ts +0 -472
- package/dist/ts/hdf-baseline.js +0 -58
- package/dist/ts/hdf-baseline.ts +0 -483
- package/dist/ts/hdf-comparison.d.ts +0 -1185
- package/dist/ts/hdf-comparison.js +0 -216
- package/dist/ts/hdf-comparison.ts +0 -1210
- package/dist/ts/hdf-evidence-package.d.ts +0 -348
- package/dist/ts/hdf-evidence-package.js +0 -39
- package/dist/ts/hdf-evidence-package.ts +0 -356
- package/dist/ts/hdf-plan.d.ts +0 -204
- package/dist/ts/hdf-plan.js +0 -23
- package/dist/ts/hdf-plan.ts +0 -205
- package/dist/ts/hdf-results.d.ts +0 -1511
- package/dist/ts/hdf-results.js +0 -194
- package/dist/ts/hdf-results.ts +0 -1536
- package/dist/ts/hdf-system.d.ts +0 -609
- package/dist/ts/hdf-system.js +0 -102
- package/dist/ts/hdf-system.ts +0 -617
package/dist/ts/hdf-plan.ts
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defines an assessment plan — what baselines to run against which targets, with resolved
|
|
3
|
-
* inputs and scheduling. Maps to OSCAL Assessment Plan.
|
|
4
|
-
*/
|
|
5
|
-
export interface HdfPlan {
|
|
6
|
-
/**
|
|
7
|
-
* The assessments to perform. Each assessment pairs a baseline with targets and resolved
|
|
8
|
-
* inputs.
|
|
9
|
-
*/
|
|
10
|
-
assessments: Assessment[];
|
|
11
|
-
/**
|
|
12
|
-
* Description of the plan's purpose and scope.
|
|
13
|
-
*/
|
|
14
|
-
description?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Information about the tool that generated this plan.
|
|
17
|
-
*/
|
|
18
|
-
generator?: Generator;
|
|
19
|
-
/**
|
|
20
|
-
* Cryptographic integrity information for verifying this plan document has not been
|
|
21
|
-
* tampered with.
|
|
22
|
-
*/
|
|
23
|
-
integrity?: Integrity;
|
|
24
|
-
/**
|
|
25
|
-
* Optional key-value labels for grouping and querying plans.
|
|
26
|
-
*/
|
|
27
|
-
labels?: { [key: string]: string };
|
|
28
|
-
/**
|
|
29
|
-
* Human-readable plan name. Example: 'Portal Monthly Assessment'.
|
|
30
|
-
*/
|
|
31
|
-
name: string;
|
|
32
|
-
/**
|
|
33
|
-
* Unique identifier for this plan. Optional in casual use, expected in production
|
|
34
|
-
* documents. Auto-generated if omitted during creation.
|
|
35
|
-
*/
|
|
36
|
-
planId?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Optional scheduling configuration for recurring assessments.
|
|
39
|
-
*/
|
|
40
|
-
schedule?: Schedule;
|
|
41
|
-
/**
|
|
42
|
-
* URI to the hdf-system document this plan targets. Example: 'portal-prod.hdf-system.json'.
|
|
43
|
-
*/
|
|
44
|
-
systemRef?: string;
|
|
45
|
-
/**
|
|
46
|
-
* The type of assessment plan.
|
|
47
|
-
*/
|
|
48
|
-
type?: PlanType;
|
|
49
|
-
/**
|
|
50
|
-
* Version of this plan document.
|
|
51
|
-
*/
|
|
52
|
-
version?: string;
|
|
53
|
-
[property: string]: any;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* A single assessment within a plan — defines which baseline to run against which targets
|
|
58
|
-
* with what configuration.
|
|
59
|
-
*/
|
|
60
|
-
export interface Assessment {
|
|
61
|
-
/**
|
|
62
|
-
* Reference to the baseline to evaluate. May be a baseline name (e.g. 'RHEL9-STIG'), a
|
|
63
|
-
* relative path to an HDF Baseline document (e.g. 'rhel9-stig.hdf-baseline.json'), or an
|
|
64
|
-
* absolute URI.
|
|
65
|
-
*/
|
|
66
|
-
baselineRef: string;
|
|
67
|
-
/**
|
|
68
|
-
* componentId of the system component this assessment targets. Use for direct component
|
|
69
|
-
* binding. Alternative to targetSelector.
|
|
70
|
-
*/
|
|
71
|
-
componentRef?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Description of this assessment's purpose.
|
|
74
|
-
*/
|
|
75
|
-
description?: string;
|
|
76
|
-
/**
|
|
77
|
-
* Resolved input values for this assessment. Keys are input names, values are the final
|
|
78
|
-
* resolved values (after baseline defaults + system overrides).
|
|
79
|
-
*/
|
|
80
|
-
inputs?: { [key: string]: any };
|
|
81
|
-
/**
|
|
82
|
-
* Runner/scanner configuration for this assessment.
|
|
83
|
-
*/
|
|
84
|
-
runner?: RunnerConfig;
|
|
85
|
-
/**
|
|
86
|
-
* Label selector to match targets for this assessment. Overrides the system component's
|
|
87
|
-
* targetSelector if provided.
|
|
88
|
-
*/
|
|
89
|
-
targetSelector?: { [key: string]: string };
|
|
90
|
-
[property: string]: any;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Runner/scanner configuration for this assessment.
|
|
95
|
-
*
|
|
96
|
-
* Configuration for the assessment runner/scanner.
|
|
97
|
-
*/
|
|
98
|
-
export interface RunnerConfig {
|
|
99
|
-
/**
|
|
100
|
-
* Name of the assessment runner. Example: 'cinc-auditor', 'inspec', 'openscap'.
|
|
101
|
-
*/
|
|
102
|
-
name?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Version of the runner.
|
|
105
|
-
*/
|
|
106
|
-
version?: string;
|
|
107
|
-
[property: string]: any;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Information about the tool that generated this plan.
|
|
112
|
-
*
|
|
113
|
-
* Information about the tool that generated this HDF file.
|
|
114
|
-
*/
|
|
115
|
-
export interface Generator {
|
|
116
|
-
/**
|
|
117
|
-
* The name of the software that produced this HDF file. Example: 'gosec-to-hdf'.
|
|
118
|
-
*/
|
|
119
|
-
name: string;
|
|
120
|
-
/**
|
|
121
|
-
* The version of the tool. Example: '5.22.3'.
|
|
122
|
-
*/
|
|
123
|
-
version: string;
|
|
124
|
-
[property: string]: any;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Cryptographic integrity information for verifying this plan document has not been
|
|
129
|
-
* tampered with.
|
|
130
|
-
*
|
|
131
|
-
* Cryptographic integrity information for verifying the HDF file has not been tampered
|
|
132
|
-
* with. If algorithm is provided, checksum must also be provided, and vice versa.
|
|
133
|
-
*/
|
|
134
|
-
export interface Integrity {
|
|
135
|
-
/**
|
|
136
|
-
* The hash algorithm used for the checksum.
|
|
137
|
-
*/
|
|
138
|
-
algorithm?: HashAlgorithm;
|
|
139
|
-
/**
|
|
140
|
-
* The checksum value.
|
|
141
|
-
*/
|
|
142
|
-
checksum?: string;
|
|
143
|
-
/**
|
|
144
|
-
* Optional cryptographic signature.
|
|
145
|
-
*/
|
|
146
|
-
signature?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Identifier of who signed this file.
|
|
149
|
-
*/
|
|
150
|
-
signedBy?: string;
|
|
151
|
-
[property: string]: any;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* The hash algorithm used for the checksum.
|
|
156
|
-
*
|
|
157
|
-
* Supported cryptographic hash algorithms for checksums and integrity verification.
|
|
158
|
-
*/
|
|
159
|
-
export enum HashAlgorithm {
|
|
160
|
-
Sha256 = "sha256",
|
|
161
|
-
Sha384 = "sha384",
|
|
162
|
-
Sha512 = "sha512",
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Optional scheduling configuration for recurring assessments.
|
|
167
|
-
*
|
|
168
|
-
* Scheduling configuration for recurring assessments.
|
|
169
|
-
*/
|
|
170
|
-
export interface Schedule {
|
|
171
|
-
/**
|
|
172
|
-
* Cron expression for recurring assessments. Example: '0 2 1 * *' (2 AM on the 1st of each
|
|
173
|
-
* month).
|
|
174
|
-
*/
|
|
175
|
-
cron?: string;
|
|
176
|
-
/**
|
|
177
|
-
* Date after which assessments should no longer run. ISO 8601 format.
|
|
178
|
-
*/
|
|
179
|
-
endDate?: Date;
|
|
180
|
-
/**
|
|
181
|
-
* Email addresses or notification endpoints to alert when assessments complete.
|
|
182
|
-
*/
|
|
183
|
-
notifyOnCompletion?: string[];
|
|
184
|
-
/**
|
|
185
|
-
* Email addresses or notification endpoints to alert when regressions are detected.
|
|
186
|
-
*/
|
|
187
|
-
notifyOnRegression?: string[];
|
|
188
|
-
/**
|
|
189
|
-
* Earliest date to begin assessments. ISO 8601 format.
|
|
190
|
-
*/
|
|
191
|
-
startDate?: Date;
|
|
192
|
-
[property: string]: any;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* The type of assessment plan.
|
|
197
|
-
*
|
|
198
|
-
* The type of assessment. 'automated' for scanner-driven, 'manual' for human-performed,
|
|
199
|
-
* 'hybrid' for both.
|
|
200
|
-
*/
|
|
201
|
-
export enum PlanType {
|
|
202
|
-
Automated = "automated",
|
|
203
|
-
Hybrid = "hybrid",
|
|
204
|
-
Manual = "manual",
|
|
205
|
-
}
|