@mitre/hdf-schema 2.0.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.
Files changed (65) hide show
  1. package/LICENSE.md +55 -0
  2. package/README.md +143 -0
  3. package/dist/go/go.mod +4 -0
  4. package/dist/go/hdf.go +2224 -0
  5. package/dist/helpers.d.ts +77 -0
  6. package/dist/helpers.js +242 -0
  7. package/dist/index.d.ts +62 -0
  8. package/dist/index.js +37 -0
  9. package/dist/python/hdf_amendments.py +695 -0
  10. package/dist/python/hdf_baseline.py +782 -0
  11. package/dist/python/hdf_comparison.py +1771 -0
  12. package/dist/python/hdf_evidence_package.py +593 -0
  13. package/dist/python/hdf_plan.py +363 -0
  14. package/dist/python/hdf_results.py +2163 -0
  15. package/dist/python/hdf_system.py +904 -0
  16. package/dist/schemas/hdf-amendments.schema.json +1562 -0
  17. package/dist/schemas/hdf-baseline.schema.json +1787 -0
  18. package/dist/schemas/hdf-comparison.schema.json +3730 -0
  19. package/dist/schemas/hdf-evidence-package.schema.json +1738 -0
  20. package/dist/schemas/hdf-plan.schema.json +1821 -0
  21. package/dist/schemas/hdf-results.schema.json +2810 -0
  22. package/dist/schemas/hdf-system.schema.json +2512 -0
  23. package/dist/ts/hdf-amendments.d.ts +446 -0
  24. package/dist/ts/hdf-amendments.js +77 -0
  25. package/dist/ts/hdf-amendments.ts +457 -0
  26. package/dist/ts/hdf-baseline.d.ts +472 -0
  27. package/dist/ts/hdf-baseline.js +58 -0
  28. package/dist/ts/hdf-baseline.ts +483 -0
  29. package/dist/ts/hdf-comparison.d.ts +1185 -0
  30. package/dist/ts/hdf-comparison.js +216 -0
  31. package/dist/ts/hdf-comparison.ts +1210 -0
  32. package/dist/ts/hdf-evidence-package.d.ts +348 -0
  33. package/dist/ts/hdf-evidence-package.js +39 -0
  34. package/dist/ts/hdf-evidence-package.ts +356 -0
  35. package/dist/ts/hdf-plan.d.ts +204 -0
  36. package/dist/ts/hdf-plan.js +23 -0
  37. package/dist/ts/hdf-plan.ts +205 -0
  38. package/dist/ts/hdf-results.d.ts +1457 -0
  39. package/dist/ts/hdf-results.js +174 -0
  40. package/dist/ts/hdf-results.ts +1481 -0
  41. package/dist/ts/hdf-system.d.ts +609 -0
  42. package/dist/ts/hdf-system.js +102 -0
  43. package/dist/ts/hdf-system.ts +617 -0
  44. package/package.json +98 -0
  45. package/src/schemas/hdf-amendments.schema.json +97 -0
  46. package/src/schemas/hdf-baseline.schema.json +190 -0
  47. package/src/schemas/hdf-comparison.schema.json +107 -0
  48. package/src/schemas/hdf-evidence-package.schema.json +227 -0
  49. package/src/schemas/hdf-plan.schema.json +92 -0
  50. package/src/schemas/hdf-results.schema.json +304 -0
  51. package/src/schemas/hdf-system.schema.json +136 -0
  52. package/src/schemas/primitives/amendments.schema.json +155 -0
  53. package/src/schemas/primitives/common.schema.json +814 -0
  54. package/src/schemas/primitives/comparison.schema.json +809 -0
  55. package/src/schemas/primitives/component.schema.json +518 -0
  56. package/src/schemas/primitives/data-flow.schema.json +158 -0
  57. package/src/schemas/primitives/extensions.schema.json +342 -0
  58. package/src/schemas/primitives/parameter.schema.json +128 -0
  59. package/src/schemas/primitives/plan.schema.json +128 -0
  60. package/src/schemas/primitives/platform.schema.json +32 -0
  61. package/src/schemas/primitives/result.schema.json +133 -0
  62. package/src/schemas/primitives/runner.schema.json +83 -0
  63. package/src/schemas/primitives/statistics.schema.json +71 -0
  64. package/src/schemas/primitives/system.schema.json +132 -0
  65. package/src/schemas/primitives/target.schema.json +523 -0
@@ -0,0 +1,342 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mitre.github.io/hdf-libs/schemas/primitives/extensions/v2.0.0",
4
+ "title": "HDF Extension Primitives",
5
+ "description": "Extension types for waivers, attestations, generators, and integrity.",
6
+ "$defs": {
7
+ "Status_Override": {
8
+ "type": "object",
9
+ "unevaluatedProperties": false,
10
+ "required": [
11
+ "type",
12
+ "status",
13
+ "reason",
14
+ "appliedBy",
15
+ "appliedAt",
16
+ "expiresAt"
17
+ ],
18
+ "properties": {
19
+ "type": {
20
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/amendments/v2.0.0#/$defs/Override_Type",
21
+ "description": "The type of status override applied to this requirement."
22
+ },
23
+ "status": {
24
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/result/v2.0.0#/$defs/Result_Status",
25
+ "description": "The new status this override sets for the requirement. This intentionally changes the compliance status."
26
+ },
27
+ "reason": {
28
+ "type": "string",
29
+ "description": "Explanation for why this status override was applied."
30
+ },
31
+ "appliedBy": {
32
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Identity",
33
+ "description": "Identity of who applied this status override. For simple cases, use type 'simple' with just an identifier."
34
+ },
35
+ "appliedAt": {
36
+ "type": "string",
37
+ "format": "date-time",
38
+ "description": "Timestamp when this status override was applied. ISO 8601 format."
39
+ },
40
+ "expiresAt": {
41
+ "type": "string",
42
+ "format": "date-time",
43
+ "description": "Timestamp when this status override expires and must be reviewed/renewed. REQUIRED - no permanent status overrides allowed. ISO 8601 format."
44
+ },
45
+ "signature": {
46
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Signature",
47
+ "description": "Optional digital signature for enhanced trust and non-repudiation. Supports hardware security tokens (PKCS#11/PKCS#12), Yubikeys, GPG keys, passkeys, and other signing methods."
48
+ },
49
+ "evidence": {
50
+ "type": "array",
51
+ "items": {
52
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Evidence"
53
+ },
54
+ "description": "Supporting evidence for this status override, such as screenshots demonstrating manual verification for attestations."
55
+ },
56
+ "previousChecksum": {
57
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Checksum",
58
+ "description": "SHA-256 checksum of the previous amendment in chronological order. Creates a tamper-evident chain of amendments (similar to blockchain). Null for the first amendment on a requirement."
59
+ }
60
+ },
61
+ "examples": [
62
+ {
63
+ "type": "waiver",
64
+ "status": "notApplicable",
65
+ "reason": "This control does not apply to containerized environments as the application runs in ephemeral containers without persistent storage",
66
+ "appliedBy": {
67
+ "identifier": "security-team@example.com",
68
+ "type": "email"
69
+ },
70
+ "appliedAt": "2025-12-01T10:00:00Z",
71
+ "expiresAt": "2026-12-01T00:00:00Z"
72
+ },
73
+ {
74
+ "type": "attestation",
75
+ "status": "passed",
76
+ "reason": "Manual verification completed: Reviewed firewall rules and confirmed all required ports are properly restricted per security policy",
77
+ "appliedBy": {
78
+ "identifier": "john.doe",
79
+ "type": "username",
80
+ "description": "Senior Security Engineer"
81
+ },
82
+ "appliedAt": "2025-11-30T14:30:00Z",
83
+ "expiresAt": "2026-05-30T00:00:00Z",
84
+ "evidence": [
85
+ {
86
+ "type": "screenshot",
87
+ "data": "base64-encoded-screenshot-data-here",
88
+ "description": "Screenshot showing firewall configuration",
89
+ "mimeType": "image/png",
90
+ "encoding": "base64",
91
+ "capturedAt": "2025-11-30T14:25:00Z",
92
+ "capturedBy": {
93
+ "identifier": "john.doe",
94
+ "type": "username"
95
+ }
96
+ }
97
+ ]
98
+ }
99
+ ],
100
+ "description": "An intentional change to a requirement's compliance status (waiver or attestation). Status overrides change the effectiveStatus of the requirement. All status overrides must have an expiration date to enforce periodic review.",
101
+ "title": "Status Override"
102
+ },
103
+ "POAM": {
104
+ "type": "object",
105
+ "unevaluatedProperties": false,
106
+ "required": [
107
+ "type",
108
+ "explanation",
109
+ "appliedBy",
110
+ "appliedAt"
111
+ ],
112
+ "properties": {
113
+ "type": {
114
+ "type": "string",
115
+ "enum": [
116
+ "remediation",
117
+ "mitigation",
118
+ "riskAcceptance"
119
+ ],
120
+ "description": "The type of POA&M. 'remediation' fixes root cause. 'mitigation' reduces risk via compensating controls. 'riskAcceptance' documents decision to accept risk."
121
+ },
122
+ "explanation": {
123
+ "type": "string",
124
+ "description": "Detailed explanation of the plan, including what actions will be taken."
125
+ },
126
+ "appliedBy": {
127
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Identity",
128
+ "description": "Identity of who created this POA&M. For simple cases, use type 'simple' with just an identifier."
129
+ },
130
+ "appliedAt": {
131
+ "type": "string",
132
+ "format": "date-time",
133
+ "description": "Timestamp when this POA&M was created. ISO 8601 format."
134
+ },
135
+ "expiresAt": {
136
+ "type": "string",
137
+ "format": "date-time",
138
+ "description": "Optional expiration date for this POA&M requiring review/renewal. ISO 8601 format."
139
+ },
140
+ "milestones": {
141
+ "type": "array",
142
+ "items": {
143
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Milestone"
144
+ },
145
+ "description": "Optional array of milestones tracking progress toward completion."
146
+ },
147
+ "signature": {
148
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Signature",
149
+ "description": "Optional digital signature for enhanced trust and non-repudiation."
150
+ },
151
+ "evidence": {
152
+ "type": "array",
153
+ "items": {
154
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Evidence"
155
+ },
156
+ "description": "Supporting evidence for this POA&M, such as documentation of compensating controls or mitigation implementation."
157
+ },
158
+ "previousChecksum": {
159
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Checksum",
160
+ "description": "SHA-256 checksum of the previous amendment in chronological order. Creates a tamper-evident chain of amendments (similar to blockchain). Null for the first amendment on a requirement."
161
+ }
162
+ },
163
+ "examples": [
164
+ {
165
+ "type": "remediation",
166
+ "explanation": "Upgrade OpenSSL to version 3.0.x to address CVE-2024-XXXXX vulnerability. Root cause: outdated dependency version in base image.",
167
+ "appliedBy": {
168
+ "identifier": "devops-team@example.com",
169
+ "type": "email"
170
+ },
171
+ "appliedAt": "2025-12-01T09:00:00Z",
172
+ "milestones": [
173
+ {
174
+ "description": "Update base Docker image to use OpenSSL 3.0.x",
175
+ "estimatedCompletion": "2025-12-15T00:00:00Z",
176
+ "status": "completed",
177
+ "completedAt": "2025-12-10T16:30:00Z",
178
+ "completedBy": {
179
+ "identifier": "alice.smith",
180
+ "type": "username"
181
+ }
182
+ },
183
+ {
184
+ "description": "Deploy updated image to production",
185
+ "estimatedCompletion": "2025-12-20T00:00:00Z",
186
+ "status": "inProgress"
187
+ },
188
+ {
189
+ "description": "Verify vulnerability no longer present via security scan",
190
+ "estimatedCompletion": "2025-12-22T00:00:00Z",
191
+ "status": "pending"
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "type": "mitigation",
197
+ "explanation": "Implement network segmentation as compensating control while awaiting vendor patch for database vulnerability. Traffic to vulnerable database server is restricted to internal management VLAN only.",
198
+ "appliedBy": {
199
+ "identifier": "security-architect",
200
+ "type": "system",
201
+ "description": "Automated POA&M creation from vulnerability scan"
202
+ },
203
+ "appliedAt": "2025-11-28T14:00:00Z",
204
+ "expiresAt": "2026-02-28T00:00:00Z",
205
+ "milestones": [
206
+ {
207
+ "description": "Configure firewall rules to restrict database access to management VLAN",
208
+ "estimatedCompletion": "2025-12-02T00:00:00Z",
209
+ "status": "completed",
210
+ "completedAt": "2025-11-29T11:15:00Z",
211
+ "completedBy": {
212
+ "identifier": "network-ops@example.com",
213
+ "type": "email"
214
+ }
215
+ },
216
+ {
217
+ "description": "Monitor for vendor security patch release",
218
+ "estimatedCompletion": "2026-02-28T00:00:00Z",
219
+ "status": "inProgress"
220
+ }
221
+ ],
222
+ "evidence": [
223
+ {
224
+ "type": "code",
225
+ "data": "# Firewall rule configuration\niptables -A INPUT -s 10.0.1.0/24 -p tcp --dport 5432 -j ACCEPT\niptables -A INPUT -p tcp --dport 5432 -j DROP",
226
+ "description": "Firewall rules restricting database access",
227
+ "mimeType": "text/plain"
228
+ }
229
+ ]
230
+ },
231
+ {
232
+ "type": "riskAcceptance",
233
+ "explanation": "Risk accepted for legacy system scheduled for decommissioning in Q1 2026. Cost of remediation ($50K for emergency upgrade) exceeds residual risk given 3-month remaining lifespan. Compensating controls: isolated network segment, enhanced monitoring.",
234
+ "appliedBy": {
235
+ "identifier": "ciso@example.com",
236
+ "type": "email"
237
+ },
238
+ "appliedAt": "2025-12-05T10:00:00Z",
239
+ "expiresAt": "2026-04-01T00:00:00Z",
240
+ "milestones": [
241
+ {
242
+ "description": "Complete migration to replacement system",
243
+ "estimatedCompletion": "2026-03-15T00:00:00Z",
244
+ "status": "inProgress"
245
+ },
246
+ {
247
+ "description": "Decommission legacy system",
248
+ "estimatedCompletion": "2026-03-31T00:00:00Z",
249
+ "status": "pending"
250
+ }
251
+ ]
252
+ }
253
+ ],
254
+ "description": "Plan of Action and Milestones for tracking remediation, mitigation, or risk acceptance. POAMs do NOT change the effectiveStatus - the requirement remains in its current state while the POA&M tracks remediation efforts.",
255
+ "title": "POAM"
256
+ },
257
+ "Generator": {
258
+ "type": "object",
259
+ "unevaluatedProperties": false,
260
+ "required": [
261
+ "name",
262
+ "version"
263
+ ],
264
+ "properties": {
265
+ "name": {
266
+ "type": "string",
267
+ "description": "The name of the software that produced this HDF file. Example: 'gosec-to-hdf'."
268
+ },
269
+ "version": {
270
+ "type": "string",
271
+ "description": "The version of the tool. Example: '5.22.3'."
272
+ }
273
+ },
274
+ "description": "Information about the tool that generated this HDF file.",
275
+ "title": "Generator"
276
+ },
277
+ "Tool": {
278
+ "type": "object",
279
+ "unevaluatedProperties": false,
280
+ "properties": {
281
+ "name": {
282
+ "type": "string",
283
+ "description": "The name of the security tool that produced the data. Examples: 'gosec', 'Semgrep', 'OpenSCAP', 'AWS Config', 'Nessus'. Omit if the tool cannot be identified."
284
+ },
285
+ "version": {
286
+ "type": "string",
287
+ "description": "Version of the source tool, if available in the tool's output. Example: '5.22.3'."
288
+ },
289
+ "format": {
290
+ "type": "string",
291
+ "description": "The file format, if it is a recognized named format shared by multiple tools. Examples: 'SARIF', 'XCCDF'. Omit for tool-specific formats where the tool name already implies the format (Nessus XML, gosec JSON)."
292
+ }
293
+ },
294
+ "description": "The security tool that produced the assessment data represented in this HDF file. Aligns with SARIF, OSCAL, and CycloneDX terminology.",
295
+ "title": "Tool"
296
+ },
297
+ "Integrity": {
298
+ "type": "object",
299
+ "unevaluatedProperties": false,
300
+ "dependentRequired": {
301
+ "algorithm": [
302
+ "checksum"
303
+ ],
304
+ "checksum": [
305
+ "algorithm"
306
+ ]
307
+ },
308
+ "properties": {
309
+ "algorithm": {
310
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/common/v2.0.0#/$defs/Hash_Algorithm",
311
+ "description": "The hash algorithm used for the checksum."
312
+ },
313
+ "checksum": {
314
+ "type": "string",
315
+ "description": "The checksum value."
316
+ },
317
+ "signature": {
318
+ "type": "string",
319
+ "description": "Optional cryptographic signature."
320
+ },
321
+ "signedBy": {
322
+ "type": "string",
323
+ "description": "Identifier of who signed this file."
324
+ }
325
+ },
326
+ "examples": [
327
+ {
328
+ "algorithm": "sha256",
329
+ "checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
330
+ },
331
+ {
332
+ "algorithm": "sha512",
333
+ "checksum": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e",
334
+ "signature": "MEUCIQDx1y2hKl3mN8vP9qRz4tJ2sW5nX6cY8bD9aE3fG4hI5wIgK7mN8oP9qR0zS1tU2vW3xY4zA5bC6dD7eE8fG9hI0jK=",
335
+ "signedBy": "security-automation@example.com"
336
+ }
337
+ ],
338
+ "description": "Cryptographic integrity information for verifying the HDF file has not been tampered with. If algorithm is provided, checksum must also be provided, and vice versa.",
339
+ "title": "Integrity"
340
+ }
341
+ }
342
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mitre.github.io/hdf-libs/schemas/primitives/parameter/v2.0.0",
4
+ "title": "HDF Parameter Primitives",
5
+ "description": "Input/parameter type definitions for typed, traceable configuration values that bridge governance prose and scanner automation.",
6
+ "$defs": {
7
+ "Input_Type": {
8
+ "type": "string",
9
+ "enum": [
10
+ "String",
11
+ "Numeric",
12
+ "Boolean",
13
+ "Array",
14
+ "Hash",
15
+ "Regexp"
16
+ ],
17
+ "description": "The data type of the input value. Aligns with InSpec input types.",
18
+ "title": "Input Type"
19
+ },
20
+ "Comparison_Operator": {
21
+ "type": "string",
22
+ "enum": [
23
+ "eq",
24
+ "ne",
25
+ "lt",
26
+ "le",
27
+ "gt",
28
+ "ge",
29
+ "contains",
30
+ "matches",
31
+ "in",
32
+ "notIn"
33
+ ],
34
+ "description": "Comparison operator for evaluating the input value against observed values. Numeric: eq/ne/lt/le/gt/ge. String: eq/ne/contains/matches. Collection: in/notIn.",
35
+ "title": "Comparison Operator"
36
+ },
37
+ "Input_Constraints": {
38
+ "type": "object",
39
+ "unevaluatedProperties": false,
40
+ "properties": {
41
+ "min": {
42
+ "type": "number",
43
+ "description": "Minimum allowed value (for Numeric inputs)."
44
+ },
45
+ "max": {
46
+ "type": "number",
47
+ "description": "Maximum allowed value (for Numeric inputs)."
48
+ },
49
+ "pattern": {
50
+ "type": "string",
51
+ "description": "Regular expression pattern the value must match (for String inputs)."
52
+ },
53
+ "allowedValues": {
54
+ "type": "array",
55
+ "description": "Enumeration of permitted values."
56
+ }
57
+ },
58
+ "description": "Validation constraints for an input value.",
59
+ "title": "Input Constraints"
60
+ },
61
+ "Input": {
62
+ "type": "object",
63
+ "unevaluatedProperties": false,
64
+ "required": [
65
+ "name"
66
+ ],
67
+ "properties": {
68
+ "name": {
69
+ "type": "string",
70
+ "description": "The input name. Must be unique within a baseline or results document. Example: 'max_concurrent_sessions'."
71
+ },
72
+ "type": {
73
+ "$ref": "#/$defs/Input_Type",
74
+ "description": "The data type of this input."
75
+ },
76
+ "value": {
77
+ "description": "The input value. Type should match the declared type field. Accepts any JSON value."
78
+ },
79
+ "description": {
80
+ "type": "string",
81
+ "description": "Human-readable description of what this input controls."
82
+ },
83
+ "required": {
84
+ "type": "boolean",
85
+ "description": "Whether this input must be provided. Defaults to false if omitted."
86
+ },
87
+ "sensitive": {
88
+ "type": "boolean",
89
+ "description": "Whether this input contains sensitive data (passwords, keys). Sensitive values should be redacted in output. Defaults to false if omitted."
90
+ },
91
+ "operator": {
92
+ "$ref": "#/$defs/Comparison_Operator",
93
+ "description": "The comparison operator used when evaluating this input against observed values."
94
+ },
95
+ "constraints": {
96
+ "$ref": "#/$defs/Input_Constraints",
97
+ "description": "Validation constraints for the input value."
98
+ }
99
+ },
100
+ "examples": [
101
+ {
102
+ "name": "max_concurrent_sessions",
103
+ "type": "Numeric",
104
+ "value": 3,
105
+ "description": "Maximum concurrent sessions per user",
106
+ "required": true,
107
+ "sensitive": false,
108
+ "operator": "le",
109
+ "constraints": { "min": 1, "max": 100 }
110
+ },
111
+ {
112
+ "name": "allowed_ciphers",
113
+ "type": "String",
114
+ "value": "AES256-GCM",
115
+ "description": "Permitted TLS cipher suite",
116
+ "constraints": { "pattern": "^AES" }
117
+ },
118
+ {
119
+ "name": "db_password",
120
+ "type": "String",
121
+ "sensitive": true
122
+ }
123
+ ],
124
+ "description": "A typed input parameter that bridges governance requirements and scanner automation. Inputs carry expected configuration values with type information, comparison operators, and validation constraints, enabling traceability from policy through to scan results.",
125
+ "title": "Input"
126
+ }
127
+ }
128
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mitre.github.io/hdf-libs/schemas/primitives/plan/v2.0.0",
4
+ "title": "HDF Plan Primitives",
5
+ "description": "Types for defining assessment plans — what to scan, how to configure it, and when to run.",
6
+ "$defs": {
7
+ "Plan_Type": {
8
+ "type": "string",
9
+ "enum": [
10
+ "automated",
11
+ "manual",
12
+ "hybrid"
13
+ ],
14
+ "description": "The type of assessment. 'automated' for scanner-driven, 'manual' for human-performed, 'hybrid' for both.",
15
+ "title": "Plan Type"
16
+ },
17
+ "Runner_Config": {
18
+ "type": "object",
19
+ "unevaluatedProperties": false,
20
+ "properties": {
21
+ "name": {
22
+ "type": "string",
23
+ "description": "Name of the assessment runner. Example: 'cinc-auditor', 'inspec', 'openscap'."
24
+ },
25
+ "version": {
26
+ "type": "string",
27
+ "description": "Version of the runner."
28
+ }
29
+ },
30
+ "description": "Configuration for the assessment runner/scanner.",
31
+ "title": "Runner Config"
32
+ },
33
+ "Assessment": {
34
+ "type": "object",
35
+ "unevaluatedProperties": false,
36
+ "required": [
37
+ "baselineRef"
38
+ ],
39
+ "properties": {
40
+ "baselineRef": {
41
+ "type": "string",
42
+ "format": "uri-reference",
43
+ "description": "Reference to the baseline to evaluate. May be a baseline name (e.g. 'RHEL9-STIG'), a relative path to an HDF Baseline document (e.g. 'rhel9-stig.hdf-baseline.json'), or an absolute URI."
44
+ },
45
+ "componentRef": {
46
+ "type": "string",
47
+ "format": "uuid",
48
+ "description": "componentId of the system component this assessment targets. Use for direct component binding. Alternative to targetSelector."
49
+ },
50
+ "targetSelector": {
51
+ "$ref": "https://mitre.github.io/hdf-libs/schemas/primitives/system/v2.0.0#/$defs/Target_Selector",
52
+ "description": "Label selector to match targets for this assessment. Overrides the system component's targetSelector if provided."
53
+ },
54
+ "inputs": {
55
+ "type": "object",
56
+ "additionalProperties": true,
57
+ "description": "Resolved input values for this assessment. Keys are input names, values are the final resolved values (after baseline defaults + system overrides)."
58
+ },
59
+ "runner": {
60
+ "$ref": "#/$defs/Runner_Config",
61
+ "description": "Runner/scanner configuration for this assessment."
62
+ },
63
+ "description": {
64
+ "type": "string",
65
+ "description": "Description of this assessment's purpose."
66
+ }
67
+ },
68
+ "examples": [
69
+ {
70
+ "baselineRef": "RHEL9-STIG",
71
+ "targetSelector": { "labels.component": "WebTier" },
72
+ "inputs": {
73
+ "max_concurrent_sessions": 5,
74
+ "password_min_length": 15
75
+ },
76
+ "runner": {
77
+ "name": "cinc-auditor",
78
+ "version": "6.8.1"
79
+ }
80
+ }
81
+ ],
82
+ "description": "A single assessment within a plan — defines which baseline to run against which targets with what configuration.",
83
+ "title": "Assessment"
84
+ },
85
+ "Schedule": {
86
+ "type": "object",
87
+ "unevaluatedProperties": false,
88
+ "properties": {
89
+ "cron": {
90
+ "type": "string",
91
+ "description": "Cron expression for recurring assessments. Example: '0 2 1 * *' (2 AM on the 1st of each month)."
92
+ },
93
+ "startDate": {
94
+ "type": "string",
95
+ "format": "date-time",
96
+ "description": "Earliest date to begin assessments. ISO 8601 format."
97
+ },
98
+ "endDate": {
99
+ "type": "string",
100
+ "format": "date-time",
101
+ "description": "Date after which assessments should no longer run. ISO 8601 format."
102
+ },
103
+ "notifyOnRegression": {
104
+ "type": "array",
105
+ "items": {
106
+ "type": "string"
107
+ },
108
+ "description": "Email addresses or notification endpoints to alert when regressions are detected."
109
+ },
110
+ "notifyOnCompletion": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "string"
114
+ },
115
+ "description": "Email addresses or notification endpoints to alert when assessments complete."
116
+ }
117
+ },
118
+ "examples": [
119
+ {
120
+ "cron": "0 2 1 * *",
121
+ "notifyOnRegression": ["security-team@agency.gov"]
122
+ }
123
+ ],
124
+ "description": "Scheduling configuration for recurring assessments.",
125
+ "title": "Schedule"
126
+ }
127
+ }
128
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mitre.github.io/hdf-libs/schemas/primitives/platform/v2.0.0",
4
+ "title": "HDF Platform Primitive",
5
+ "description": "Legacy platform information for backward compatibility with existing HDF documents.",
6
+ "$defs": {
7
+ "Platform": {
8
+ "type": "object",
9
+ "unevaluatedProperties": false,
10
+ "required": [
11
+ "name",
12
+ "release"
13
+ ],
14
+ "properties": {
15
+ "name": {
16
+ "type": "string",
17
+ "description": "The name of the platform this was run on."
18
+ },
19
+ "release": {
20
+ "type": "string",
21
+ "description": "The version of the platform this was run on."
22
+ },
23
+ "targetId": {
24
+ "type": "string",
25
+ "description": "The id of the target. Example: the name and version of the operating system were not sufficient to identify the platform so a release identifier can additionally be provided like '21H2' for the release version of MS Windows 10."
26
+ }
27
+ },
28
+ "description": "Platform information such as its name. This is the legacy target representation; see Target for the new polymorphic target system.",
29
+ "title": "Platform"
30
+ }
31
+ }
32
+ }