@mitre/hdf-mappings 3.6.0 → 3.7.0-rc.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/dist/index.d.ts +141 -77
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5473 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ type NistCCIMappings = Record<string, string[]>;
|
|
|
34
34
|
* // Returns: "The organization develops an access control policy..."
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
declare function getCCIDescription(cciId: string): string | undefined;
|
|
37
|
+
export declare function getCCIDescription(cciId: string): string | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* Get the NIST control mappings for a CCI ID.
|
|
40
40
|
*
|
|
@@ -47,7 +47,7 @@ declare function getCCIDescription(cciId: string): string | undefined;
|
|
|
47
47
|
* // Returns: ['AC-1 a', 'AC-1.1 (i and ii)', 'AC-1 a 1']
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
declare function getCCINistMappings(cciId: string): string[] | undefined;
|
|
50
|
+
export declare function getCCINistMappings(cciId: string): string[] | undefined;
|
|
51
51
|
/**
|
|
52
52
|
* Get all CCI IDs available in the database.
|
|
53
53
|
*
|
|
@@ -59,7 +59,7 @@ declare function getCCINistMappings(cciId: string): string[] | undefined;
|
|
|
59
59
|
* // Returns: ['CCI-000001', 'CCI-000002', ...]
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
|
-
declare function getAllCCIIds(): string[];
|
|
62
|
+
export declare function getAllCCIIds(): string[];
|
|
63
63
|
/**
|
|
64
64
|
* Check if a CCI ID exists in the database.
|
|
65
65
|
*
|
|
@@ -73,7 +73,7 @@ declare function getAllCCIIds(): string[];
|
|
|
73
73
|
* }
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
declare function cciExists(cciId: string): boolean;
|
|
76
|
+
export declare function cciExists(cciId: string): boolean;
|
|
77
77
|
/**
|
|
78
78
|
* Get CCI IDs for a NIST control using the curated mapping table.
|
|
79
79
|
* The input is normalized to its base control before lookup.
|
|
@@ -87,7 +87,7 @@ declare function cciExists(cciId: string): boolean;
|
|
|
87
87
|
* // Returns: ['CCI-001310']
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
90
|
-
declare function getNistCCIMappings(nistControl: string): string[] | undefined;
|
|
90
|
+
export declare function getNistCCIMappings(nistControl: string): string[] | undefined;
|
|
91
91
|
/**
|
|
92
92
|
* Map NIST 800-53 controls to their CCI IDs using the curated mapping table.
|
|
93
93
|
* Results are deduplicated and sorted.
|
|
@@ -101,7 +101,33 @@ declare function getNistCCIMappings(nistControl: string): string[] | undefined;
|
|
|
101
101
|
* // Returns: ['CCI-000213', 'CCI-001310']
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
|
-
declare function nistToCci(nistControls: string[]): string[];
|
|
104
|
+
export declare function nistToCci(nistControls: string[]): string[];
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/nist/normalize.d.ts
|
|
107
|
+
/**
|
|
108
|
+
* NIST SP 800-53 identifier spelling normalization.
|
|
109
|
+
*
|
|
110
|
+
* Mirrors NormalizeID in go/nist/exists.go; both are pinned by the shared case
|
|
111
|
+
* table go/nist/testdata/nist-id-spelling-cases.json.
|
|
112
|
+
*/
|
|
113
|
+
/**
|
|
114
|
+
* Normalize a NIST SP 800-53 identifier to the description-table spelling:
|
|
115
|
+
* uppercase family, lowercase statement letters, zero-padded numbers and
|
|
116
|
+
* space-separated parts.
|
|
117
|
+
*
|
|
118
|
+
* @param nistId - An identifier such as 'AC-2', 'AC-2(3)', 'AC-2 (3)', 'AC-02 03', 'AC-1 a 1' or 'ac-2'
|
|
119
|
+
* @returns The table spelling (e.g. 'AC-02 03'), or undefined if the input is not
|
|
120
|
+
* a NIST identifier spelling. A defined result is not proof NIST defines the
|
|
121
|
+
* control; use nistExists for that.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* normalizeNistId('AC-2 (3)'); // 'AC-02 03'
|
|
126
|
+
* normalizeNistId('AC-2(3)(a)'); // 'AC-02 03 a'
|
|
127
|
+
* normalizeNistId('SV-230221'); // undefined
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export declare function normalizeNistId(nistId: string): string | undefined;
|
|
105
131
|
//#endregion
|
|
106
132
|
//#region src/nist/crosswalk.d.ts
|
|
107
133
|
/**
|
|
@@ -139,7 +165,7 @@ interface NistControlTranslation {
|
|
|
139
165
|
* no targets. Statement-letter suffixes ("AC-2(j)") survive identity
|
|
140
166
|
* translation and are dropped on redirects.
|
|
141
167
|
*/
|
|
142
|
-
declare function translateNistControl(control: string, from: number, to: number): NistControlTranslation;
|
|
168
|
+
export declare function translateNistControl(control: string, from: number, to: number): NistControlTranslation;
|
|
143
169
|
/**
|
|
144
170
|
* Translates a list of control IDs between revisions, flattening redirect
|
|
145
171
|
* targets and deduplicating while preserving first-seen order. Controls with
|
|
@@ -147,7 +173,7 @@ declare function translateNistControl(control: string, from: number, to: number)
|
|
|
147
173
|
* family-level, or unknown) are returned in `unmapped`, in input order, so
|
|
148
174
|
* callers can surface them instead of silently dropping.
|
|
149
175
|
*/
|
|
150
|
-
declare function translateNistControls(controls: string[], from: number, to: number): {
|
|
176
|
+
export declare function translateNistControls(controls: string[], from: number, to: number): {
|
|
151
177
|
translated: string[];
|
|
152
178
|
unmapped: NistControlTranslation[];
|
|
153
179
|
};
|
|
@@ -155,7 +181,7 @@ declare function translateNistControls(controls: string[], from: number, to: num
|
|
|
155
181
|
* Number of control IDs in the crosswalk's catalog for the given revision, or
|
|
156
182
|
* 0 for unsupported revisions.
|
|
157
183
|
*/
|
|
158
|
-
declare function nistRosterSize(rev: number): number;
|
|
184
|
+
export declare function nistRosterSize(rev: number): number;
|
|
159
185
|
/**
|
|
160
186
|
* Translates a control list authored against `nativeRev` into `rev`. Identity
|
|
161
187
|
* when the revisions are equal (or either is unsupported). Per token: the
|
|
@@ -166,7 +192,7 @@ declare function nistRosterSize(rev: number): number;
|
|
|
166
192
|
* (tool placeholders like "UM-1") pass through unchanged — they are not ours
|
|
167
193
|
* to drop. Output is deduplicated preserving first-seen order.
|
|
168
194
|
*/
|
|
169
|
-
declare function nistControlsAtRevision(controls: string[], nativeRev: number, rev: number): string[];
|
|
195
|
+
export declare function nistControlsAtRevision(controls: string[], nativeRev: number, rev: number): string[];
|
|
170
196
|
//#endregion
|
|
171
197
|
//#region src/nist/types.d.ts
|
|
172
198
|
/**
|
|
@@ -175,9 +201,6 @@ declare function nistControlsAtRevision(controls: string[], nativeRev: number, r
|
|
|
175
201
|
type NISTDescriptions = Record<string, string>;
|
|
176
202
|
//#endregion
|
|
177
203
|
//#region src/nist/index.d.ts
|
|
178
|
-
/**
|
|
179
|
-
* NIST SP 800-53 control description functions
|
|
180
|
-
*/
|
|
181
204
|
/**
|
|
182
205
|
* NIST SP 800-53 revision selection.
|
|
183
206
|
*
|
|
@@ -188,30 +211,31 @@ type NISTDescriptions = Record<string, string>;
|
|
|
188
211
|
* the mapping lookups instead of mutating this.
|
|
189
212
|
*/
|
|
190
213
|
/** The revision mappings emit when nothing overrides it. */
|
|
191
|
-
declare const DEFAULT_NIST_REVISION = 5;
|
|
214
|
+
export declare const DEFAULT_NIST_REVISION = 5;
|
|
192
215
|
/** Revisions every NIST-emitting mapping table has rows for. */
|
|
193
|
-
declare const SUPPORTED_NIST_REVISIONS: readonly number[];
|
|
216
|
+
export declare const SUPPORTED_NIST_REVISIONS: readonly number[];
|
|
194
217
|
/** Get the module-global default NIST revision. */
|
|
195
|
-
declare function getCurrentNistRevision(): number;
|
|
218
|
+
export declare function getCurrentNistRevision(): number;
|
|
196
219
|
/**
|
|
197
220
|
* Set the module-global default NIST revision. Throws (without mutating state)
|
|
198
221
|
* if the revision has no mapping data.
|
|
199
222
|
*/
|
|
200
|
-
declare function setCurrentNistRevision(rev: number): void;
|
|
223
|
+
export declare function setCurrentNistRevision(rev: number): void;
|
|
201
224
|
/** Restore the default revision. Intended for cleanup and tests. */
|
|
202
|
-
declare function resetNistRevision(): void;
|
|
225
|
+
export declare function resetNistRevision(): void;
|
|
203
226
|
/** Report whether strict NIST revision alignment is enabled. */
|
|
204
|
-
declare function isNistStrict(): boolean;
|
|
227
|
+
export declare function isNistStrict(): boolean;
|
|
205
228
|
/**
|
|
206
229
|
* Toggle strict NIST revision alignment. When enabled, revision-divergent
|
|
207
230
|
* mappings treat a rule mapped only at another revision as a hard error rather
|
|
208
231
|
* than a silent omission.
|
|
209
232
|
*/
|
|
210
|
-
declare function setNistStrict(strict: boolean): void;
|
|
233
|
+
export declare function setNistStrict(strict: boolean): void;
|
|
211
234
|
/**
|
|
212
235
|
* Get the description for a NIST control ID at the selected revision.
|
|
213
236
|
*
|
|
214
|
-
* @param nistId - The NIST control ID
|
|
237
|
+
* @param nistId - The NIST control ID, in any spelling normalizeNistId accepts
|
|
238
|
+
* ('AC-1', 'AC-01 a', 'AC-2 (1)', 'AC-02 01', ...)
|
|
215
239
|
* @param rev - NIST revision to look up; defaults to the module-global revision
|
|
216
240
|
* @returns The control's Rev-specific description, or undefined if not found at
|
|
217
241
|
* that revision (e.g. a Rev 5-only SR/PT control at Rev 4, or a Rev 4 control
|
|
@@ -220,10 +244,10 @@ declare function setNistStrict(strict: boolean): void;
|
|
|
220
244
|
* @example
|
|
221
245
|
* ```typescript
|
|
222
246
|
* getNISTDescription('AC-01'); // Rev 5 default -> "Policy and Procedures"
|
|
223
|
-
* getNISTDescription('AC-
|
|
247
|
+
* getNISTDescription('AC-1', 4); // -> "ACCESS CONTROL POLICY AND PROCEDURES"
|
|
224
248
|
* ```
|
|
225
249
|
*/
|
|
226
|
-
declare function getNISTDescription(nistId: string, rev?: number): string | undefined;
|
|
250
|
+
export declare function getNISTDescription(nistId: string, rev?: number): string | undefined;
|
|
227
251
|
/**
|
|
228
252
|
* Get all NIST control IDs present at the selected revision.
|
|
229
253
|
*
|
|
@@ -237,23 +261,24 @@ declare function getNISTDescription(nistId: string, rev?: number): string | unde
|
|
|
237
261
|
* // Returns: ['AC-01', 'AC-01 a', 'AC-02', ...]
|
|
238
262
|
* ```
|
|
239
263
|
*/
|
|
240
|
-
declare function getAllNISTIds(rev?: number): string[];
|
|
264
|
+
export declare function getAllNISTIds(rev?: number): string[];
|
|
241
265
|
/**
|
|
242
266
|
* Check if a NIST control ID exists at the selected revision.
|
|
243
267
|
*
|
|
244
|
-
* @param nistId - The NIST control ID to check
|
|
268
|
+
* @param nistId - The NIST control ID to check, in any spelling normalizeNistId
|
|
269
|
+
* accepts ('AC-2', 'AC-2(3)', 'AC-2 (3)', 'AC-02 03', 'AC-01 a 01', ...)
|
|
245
270
|
* @param rev - NIST revision to check against; defaults to the module-global revision
|
|
246
271
|
* @returns true if the control exists at that revision (e.g. an SR/PT control is
|
|
247
272
|
* present at Rev 5 but not Rev 4)
|
|
248
273
|
*
|
|
249
274
|
* @example
|
|
250
275
|
* ```typescript
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
276
|
+
* nistExists('AC-2 (3)'); // true
|
|
277
|
+
* nistExists('SR-3', 4); // false: the SR family is Rev 5-only
|
|
278
|
+
* nistExists('SV-230221'); // false
|
|
254
279
|
* ```
|
|
255
280
|
*/
|
|
256
|
-
declare function nistExists(nistId: string, rev?: number): boolean;
|
|
281
|
+
export declare function nistExists(nistId: string, rev?: number): boolean;
|
|
257
282
|
/**
|
|
258
283
|
* Extract the NIST family from a NIST control ID, if that family exists at the
|
|
259
284
|
* selected revision.
|
|
@@ -272,7 +297,7 @@ declare function nistExists(nistId: string, rev?: number): boolean;
|
|
|
272
297
|
* // Returns: 'AC'
|
|
273
298
|
* ```
|
|
274
299
|
*/
|
|
275
|
-
declare function getNISTFamily(nistId: string, rev?: number): string | undefined;
|
|
300
|
+
export declare function getNISTFamily(nistId: string, rev?: number): string | undefined;
|
|
276
301
|
/**
|
|
277
302
|
* Canonical NIST 800-53 fallback tags for converters when a finding has no
|
|
278
303
|
* CWE or the CWE has no NIST mapping. Categories match heimdall2's global.ts.
|
|
@@ -283,13 +308,13 @@ declare function getNISTFamily(nistId: string, rev?: number): string | undefined
|
|
|
283
308
|
* - CM-8: System Component Inventory
|
|
284
309
|
*/
|
|
285
310
|
/** Static analysis and vulnerability scanning tools (SA-11 + RA-5). */
|
|
286
|
-
declare const DEFAULT_STATIC_ANALYSIS_NIST_TAGS: string[];
|
|
311
|
+
export declare const DEFAULT_STATIC_ANALYSIS_NIST_TAGS: string[];
|
|
287
312
|
/** Tools that identify outdated packages or flaws requiring patching (SI-2 + RA-5). */
|
|
288
|
-
declare const DEFAULT_REMEDIATION_NIST_TAGS: string[];
|
|
313
|
+
export declare const DEFAULT_REMEDIATION_NIST_TAGS: string[];
|
|
289
314
|
/** Dependency/inventory management tools (CM-8). */
|
|
290
|
-
declare const DEFAULT_COMPONENT_MANAGEMENT_NIST_TAGS: string[];
|
|
315
|
+
export declare const DEFAULT_COMPONENT_MANAGEMENT_NIST_TAGS: string[];
|
|
291
316
|
/** Configuration-compliance checks with no specific mapping (CM-6: Configuration Settings). */
|
|
292
|
-
declare const DEFAULT_CONFIG_MANAGEMENT_NIST_TAGS: string[];
|
|
317
|
+
export declare const DEFAULT_CONFIG_MANAGEMENT_NIST_TAGS: string[];
|
|
293
318
|
//#endregion
|
|
294
319
|
//#region src/owasp/types.d.ts
|
|
295
320
|
/**
|
|
@@ -317,7 +342,7 @@ type OwaspNistMappings = OwaspNistMapping[];
|
|
|
317
342
|
* // Returns: { 'OWASP-ID': 'A1', 'OWASP Name': 'Injection', 'NIST-ID': 'SI-10', ... }
|
|
318
343
|
* ```
|
|
319
344
|
*/
|
|
320
|
-
declare function getOwaspNistMapping(owaspId: string): OwaspNistMapping | undefined;
|
|
345
|
+
export declare function getOwaspNistMapping(owaspId: string): OwaspNistMapping | undefined;
|
|
321
346
|
/**
|
|
322
347
|
* Get the NIST control ID for an OWASP Top 10 ID.
|
|
323
348
|
*
|
|
@@ -330,7 +355,7 @@ declare function getOwaspNistMapping(owaspId: string): OwaspNistMapping | undefi
|
|
|
330
355
|
* // Returns: 'SI-10'
|
|
331
356
|
* ```
|
|
332
357
|
*/
|
|
333
|
-
declare function getOwaspNistControl(owaspId: string): string | undefined;
|
|
358
|
+
export declare function getOwaspNistControl(owaspId: string): string | undefined;
|
|
334
359
|
/**
|
|
335
360
|
* Get the OWASP vulnerability name for an OWASP ID.
|
|
336
361
|
*
|
|
@@ -343,7 +368,7 @@ declare function getOwaspNistControl(owaspId: string): string | undefined;
|
|
|
343
368
|
* // Returns: 'Injection'
|
|
344
369
|
* ```
|
|
345
370
|
*/
|
|
346
|
-
declare function getOwaspName(owaspId: string): string | undefined;
|
|
371
|
+
export declare function getOwaspName(owaspId: string): string | undefined;
|
|
347
372
|
/**
|
|
348
373
|
* Get all OWASP IDs available in the database.
|
|
349
374
|
*
|
|
@@ -355,7 +380,7 @@ declare function getOwaspName(owaspId: string): string | undefined;
|
|
|
355
380
|
* // Returns: ['A1', 'A2', 'A3', ..., 'A10']
|
|
356
381
|
* ```
|
|
357
382
|
*/
|
|
358
|
-
declare function getAllOwaspIds(): string[];
|
|
383
|
+
export declare function getAllOwaspIds(): string[];
|
|
359
384
|
/**
|
|
360
385
|
* Check if an OWASP ID exists in the database.
|
|
361
386
|
*
|
|
@@ -369,7 +394,7 @@ declare function getAllOwaspIds(): string[];
|
|
|
369
394
|
* }
|
|
370
395
|
* ```
|
|
371
396
|
*/
|
|
372
|
-
declare function owaspExists(owaspId: string): boolean;
|
|
397
|
+
export declare function owaspExists(owaspId: string): boolean;
|
|
373
398
|
/**
|
|
374
399
|
* Get all OWASP to NIST mappings.
|
|
375
400
|
*
|
|
@@ -381,7 +406,7 @@ declare function owaspExists(owaspId: string): boolean;
|
|
|
381
406
|
* // Returns all 10 OWASP Top 10 mappings
|
|
382
407
|
* ```
|
|
383
408
|
*/
|
|
384
|
-
declare function getAllOwaspMappings(): OwaspNistMappings;
|
|
409
|
+
export declare function getAllOwaspMappings(): OwaspNistMappings;
|
|
385
410
|
//#endregion
|
|
386
411
|
//#region src/cwe/types.d.ts
|
|
387
412
|
/**
|
|
@@ -398,17 +423,56 @@ type CweNistMappings = CweNistMapping[];
|
|
|
398
423
|
//#endregion
|
|
399
424
|
//#region src/cwe/index.d.ts
|
|
400
425
|
/** Get the full mapping for a CWE ID at the given NIST revision. */
|
|
401
|
-
declare function getCweNistMapping(cweId: number, rev?: number): CweNistMapping | undefined;
|
|
426
|
+
export declare function getCweNistMapping(cweId: number, rev?: number): CweNistMapping | undefined;
|
|
402
427
|
/** Get the NIST control ID for a CWE ID at the given NIST revision. */
|
|
403
|
-
declare function getCweNistControl(cweId: number, rev?: number): string | undefined;
|
|
428
|
+
export declare function getCweNistControl(cweId: number, rev?: number): string | undefined;
|
|
404
429
|
/** Get the CWE name for a CWE ID at the given NIST revision. */
|
|
405
|
-
declare function getCweName(cweId: number, rev?: number): string | undefined;
|
|
430
|
+
export declare function getCweName(cweId: number, rev?: number): string | undefined;
|
|
406
431
|
/** Get all CWE IDs present at the given NIST revision. */
|
|
407
|
-
declare function getAllCweIds(rev?: number): number[];
|
|
432
|
+
export declare function getAllCweIds(rev?: number): number[];
|
|
408
433
|
/** Check whether a CWE ID exists at the given NIST revision. */
|
|
409
|
-
declare function cweExists(cweId: number, rev?: number): boolean;
|
|
434
|
+
export declare function cweExists(cweId: number, rev?: number): boolean;
|
|
410
435
|
/** Get all CWE to NIST mappings (all revisions). */
|
|
411
|
-
declare function getAllCweMappings(): CweNistMappings;
|
|
436
|
+
export declare function getAllCweMappings(): CweNistMappings;
|
|
437
|
+
//#endregion
|
|
438
|
+
//#region src/checkov/types.d.ts
|
|
439
|
+
/**
|
|
440
|
+
* TypeScript types for Checkov check ID to CCI/NIST mappings
|
|
441
|
+
*/
|
|
442
|
+
interface CheckovCciNistMapping {
|
|
443
|
+
cci: string[];
|
|
444
|
+
nist: string[];
|
|
445
|
+
}
|
|
446
|
+
type CheckovCciNistMappings = Record<string, CheckovCciNistMapping>;
|
|
447
|
+
interface CheckovMappingProvenance {
|
|
448
|
+
source: {
|
|
449
|
+
package: string;
|
|
450
|
+
version: string;
|
|
451
|
+
path: string;
|
|
452
|
+
integrity: string;
|
|
453
|
+
};
|
|
454
|
+
checkovVersion: string;
|
|
455
|
+
updated: string;
|
|
456
|
+
nistRevision: number;
|
|
457
|
+
}
|
|
458
|
+
interface CheckovMappingDataset extends CheckovMappingProvenance {
|
|
459
|
+
$comment: string[];
|
|
460
|
+
mappings: CheckovCciNistMappings;
|
|
461
|
+
}
|
|
462
|
+
//#endregion
|
|
463
|
+
//#region src/checkov/index.d.ts
|
|
464
|
+
/**
|
|
465
|
+
* Get the CCI and NIST controls for a Checkov check ID, with NIST controls
|
|
466
|
+
* translated to the given revision. CCIs are revision-independent.
|
|
467
|
+
* @returns copies of both lists, or undefined if the check is unmapped
|
|
468
|
+
*/
|
|
469
|
+
export declare function getCheckovCciNistMapping(checkId: string, rev?: number): CheckovCciNistMapping | undefined;
|
|
470
|
+
/** Check whether a Checkov check ID has a mapping. */
|
|
471
|
+
export declare function checkovCheckExists(checkId: string): boolean;
|
|
472
|
+
/** Get all mapped Checkov check IDs, sorted. */
|
|
473
|
+
export declare function getAllCheckovCheckIds(): string[];
|
|
474
|
+
/** Get the dataset's source package, Checkov version and native NIST revision. */
|
|
475
|
+
export declare function getCheckovMappingProvenance(): CheckovMappingProvenance;
|
|
412
476
|
//#endregion
|
|
413
477
|
//#region src/nessus/types.d.ts
|
|
414
478
|
/**
|
|
@@ -428,29 +492,29 @@ type NessusNistMappings = NessusNistMapping[];
|
|
|
428
492
|
* @param pluginId - The Nessus plugin ID (optional, defaults to "*")
|
|
429
493
|
* @returns The NIST control ID or undefined if not found
|
|
430
494
|
*/
|
|
431
|
-
declare function getNessusNistControl(pluginFamily: string, pluginId?: string): string | undefined;
|
|
495
|
+
export declare function getNessusNistControl(pluginFamily: string, pluginId?: string): string | undefined;
|
|
432
496
|
/**
|
|
433
497
|
* Get all mappings for a plugin family
|
|
434
498
|
* @param pluginFamily - The Nessus plugin family
|
|
435
499
|
* @returns Array of mappings for the plugin family
|
|
436
500
|
*/
|
|
437
|
-
declare function getNessusPluginFamilyMappings(pluginFamily: string): NessusNistMappings;
|
|
501
|
+
export declare function getNessusPluginFamilyMappings(pluginFamily: string): NessusNistMappings;
|
|
438
502
|
/**
|
|
439
503
|
* Get all plugin families
|
|
440
504
|
* @returns Array of all plugin families
|
|
441
505
|
*/
|
|
442
|
-
declare function getAllNessusPluginFamilies(): string[];
|
|
506
|
+
export declare function getAllNessusPluginFamilies(): string[];
|
|
443
507
|
/**
|
|
444
508
|
* Check if a plugin family exists in the mappings
|
|
445
509
|
* @param pluginFamily - The plugin family to check
|
|
446
510
|
* @returns True if the plugin family exists
|
|
447
511
|
*/
|
|
448
|
-
declare function nessusPluginFamilyExists(pluginFamily: string): boolean;
|
|
512
|
+
export declare function nessusPluginFamilyExists(pluginFamily: string): boolean;
|
|
449
513
|
/**
|
|
450
514
|
* Get all Nessus to NIST mappings
|
|
451
515
|
* @returns Array of all mappings
|
|
452
516
|
*/
|
|
453
|
-
declare function getAllNessusMappings(): NessusNistMappings;
|
|
517
|
+
export declare function getAllNessusMappings(): NessusNistMappings;
|
|
454
518
|
//#endregion
|
|
455
519
|
//#region src/nikto/types.d.ts
|
|
456
520
|
/**
|
|
@@ -464,23 +528,23 @@ type NiktoNistMappings = Record<string, string>;
|
|
|
464
528
|
* @param niktoId - The Nikto test ID (string or number)
|
|
465
529
|
* @returns The NIST control ID or undefined if not found
|
|
466
530
|
*/
|
|
467
|
-
declare function getNiktoNistControl(niktoId: string | number): string | undefined;
|
|
531
|
+
export declare function getNiktoNistControl(niktoId: string | number): string | undefined;
|
|
468
532
|
/**
|
|
469
533
|
* Get all Nikto test IDs
|
|
470
534
|
* @returns Array of all Nikto test IDs
|
|
471
535
|
*/
|
|
472
|
-
declare function getAllNiktoIds(): string[];
|
|
536
|
+
export declare function getAllNiktoIds(): string[];
|
|
473
537
|
/**
|
|
474
538
|
* Check if a Nikto test ID exists in the mappings
|
|
475
539
|
* @param niktoId - The Nikto test ID to check
|
|
476
540
|
* @returns True if the Nikto test ID exists
|
|
477
541
|
*/
|
|
478
|
-
declare function niktoExists(niktoId: string | number): boolean;
|
|
542
|
+
export declare function niktoExists(niktoId: string | number): boolean;
|
|
479
543
|
/**
|
|
480
544
|
* Get all Nikto to NIST mappings
|
|
481
545
|
* @returns Object mapping Nikto test IDs to NIST control IDs
|
|
482
546
|
*/
|
|
483
|
-
declare function getAllNiktoMappings(): NiktoNistMappings;
|
|
547
|
+
export declare function getAllNiktoMappings(): NiktoNistMappings;
|
|
484
548
|
//#endregion
|
|
485
549
|
//#region src/scoutsuite/types.d.ts
|
|
486
550
|
/**
|
|
@@ -498,29 +562,29 @@ type ScoutsuiteNistMappings = ScoutsuiteNistMapping[];
|
|
|
498
562
|
* @param rule - The ScoutSuite rule name
|
|
499
563
|
* @returns The mapping object or undefined if not found
|
|
500
564
|
*/
|
|
501
|
-
declare function getScoutsuiteNistMapping(rule: string): ScoutsuiteNistMapping | undefined;
|
|
565
|
+
export declare function getScoutsuiteNistMapping(rule: string): ScoutsuiteNistMapping | undefined;
|
|
502
566
|
/**
|
|
503
567
|
* Get the NIST control ID for a ScoutSuite rule
|
|
504
568
|
* @param rule - The ScoutSuite rule name
|
|
505
569
|
* @returns The NIST control ID or undefined if not found
|
|
506
570
|
*/
|
|
507
|
-
declare function getScoutsuiteNistControl(rule: string): string | undefined;
|
|
571
|
+
export declare function getScoutsuiteNistControl(rule: string): string | undefined;
|
|
508
572
|
/**
|
|
509
573
|
* Get all ScoutSuite rule names
|
|
510
574
|
* @returns Array of all rule names
|
|
511
575
|
*/
|
|
512
|
-
declare function getAllScoutsuiteRules(): string[];
|
|
576
|
+
export declare function getAllScoutsuiteRules(): string[];
|
|
513
577
|
/**
|
|
514
578
|
* Check if a ScoutSuite rule exists in the mappings
|
|
515
579
|
* @param rule - The rule name to check
|
|
516
580
|
* @returns True if the rule exists
|
|
517
581
|
*/
|
|
518
|
-
declare function scoutsuiteRuleExists(rule: string): boolean;
|
|
582
|
+
export declare function scoutsuiteRuleExists(rule: string): boolean;
|
|
519
583
|
/**
|
|
520
584
|
* Get all ScoutSuite to NIST mappings
|
|
521
585
|
* @returns Array of all mappings
|
|
522
586
|
*/
|
|
523
|
-
declare function getAllScoutsuiteMappings(): ScoutsuiteNistMappings;
|
|
587
|
+
export declare function getAllScoutsuiteMappings(): ScoutsuiteNistMappings;
|
|
524
588
|
//#endregion
|
|
525
589
|
//#region src/awsconfig/types.d.ts
|
|
526
590
|
/**
|
|
@@ -559,30 +623,30 @@ type AwsConfigSuppressions = AwsConfigSuppression[];
|
|
|
559
623
|
* the mapping table — exposed so a consumer can distinguish "removed by
|
|
560
624
|
* review" from "never mapped by the sources".
|
|
561
625
|
*/
|
|
562
|
-
declare const awsConfigSuppressions: AwsConfigSuppressions;
|
|
626
|
+
export declare const awsConfigSuppressions: AwsConfigSuppressions;
|
|
563
627
|
/** Get the full mapping for an AWS Config rule by source identifier. */
|
|
564
|
-
declare function getAwsConfigNistMappingByIdentifier(identifier: string, rev?: number): AwsConfigNistMapping | undefined;
|
|
628
|
+
export declare function getAwsConfigNistMappingByIdentifier(identifier: string, rev?: number): AwsConfigNistMapping | undefined;
|
|
565
629
|
/** Get the full mapping for an AWS Config rule by rule name. */
|
|
566
|
-
declare function getAwsConfigNistMappingByName(ruleName: string, rev?: number): AwsConfigNistMapping | undefined;
|
|
630
|
+
export declare function getAwsConfigNistMappingByName(ruleName: string, rev?: number): AwsConfigNistMapping | undefined;
|
|
567
631
|
/** Get the NIST control ID for an AWS Config rule by source identifier. */
|
|
568
|
-
declare function getAwsConfigNistControlByIdentifier(identifier: string, rev?: number): string | undefined;
|
|
632
|
+
export declare function getAwsConfigNistControlByIdentifier(identifier: string, rev?: number): string | undefined;
|
|
569
633
|
/** Get the NIST control ID for an AWS Config rule by rule name. */
|
|
570
|
-
declare function getAwsConfigNistControlByName(ruleName: string, rev?: number): string | undefined;
|
|
634
|
+
export declare function getAwsConfigNistControlByName(ruleName: string, rev?: number): string | undefined;
|
|
571
635
|
/**
|
|
572
636
|
* Resolve NIST controls for a decorated rule name such as Security Hub's
|
|
573
637
|
* "securityhub-<canonical>-<hash>", where an exact lookup fails. Returns the
|
|
574
638
|
* split controls of the canonical rule whose name is contained in the given
|
|
575
639
|
* name; the longest such match wins. Returns [] if none match.
|
|
576
640
|
*/
|
|
577
|
-
declare function getAwsConfigNistControlsBySubstring(name: string, rev?: number): string[];
|
|
641
|
+
export declare function getAwsConfigNistControlsBySubstring(name: string, rev?: number): string[];
|
|
578
642
|
/** Get all AWS Config rule source identifiers present at the given revision. */
|
|
579
|
-
declare function getAllAwsConfigIdentifiers(rev?: number): string[];
|
|
643
|
+
export declare function getAllAwsConfigIdentifiers(rev?: number): string[];
|
|
580
644
|
/** Get all AWS Config rule names present at the given revision. */
|
|
581
|
-
declare function getAllAwsConfigRuleNames(rev?: number): string[];
|
|
645
|
+
export declare function getAllAwsConfigRuleNames(rev?: number): string[];
|
|
582
646
|
/** Check if an AWS Config rule exists by source identifier at the given revision. */
|
|
583
|
-
declare function awsConfigIdentifierExists(identifier: string, rev?: number): boolean;
|
|
647
|
+
export declare function awsConfigIdentifierExists(identifier: string, rev?: number): boolean;
|
|
584
648
|
/** Check if an AWS Config rule exists by rule name at the given revision. */
|
|
585
|
-
declare function awsConfigRuleNameExists(ruleName: string, rev?: number): boolean;
|
|
649
|
+
export declare function awsConfigRuleNameExists(ruleName: string, rev?: number): boolean;
|
|
586
650
|
/**
|
|
587
651
|
* Get the supported NIST revisions at which the rule resolves (by source
|
|
588
652
|
* identifier or rule name), sorted ascending. Mirrors the resolution
|
|
@@ -590,9 +654,9 @@ declare function awsConfigRuleNameExists(ruleName: string, rev?: number): boolea
|
|
|
590
654
|
* at that revision would emit NIST tags. Empty means unmapped everywhere — a
|
|
591
655
|
* coverage gap, not a revision mismatch.
|
|
592
656
|
*/
|
|
593
|
-
declare function awsConfigMappedRevisions(identifier: string, ruleName: string): number[];
|
|
657
|
+
export declare function awsConfigMappedRevisions(identifier: string, ruleName: string): number[];
|
|
594
658
|
/** Get all AWS Config to NIST mappings (all revisions). */
|
|
595
|
-
declare function getAllAwsConfigMappings(): AwsConfigNistMappings;
|
|
659
|
+
export declare function getAllAwsConfigMappings(): AwsConfigNistMappings;
|
|
596
660
|
//#endregion
|
|
597
661
|
//#region src/hipcheck/types.d.ts
|
|
598
662
|
/**
|
|
@@ -612,13 +676,13 @@ type HipcheckNistMappings = HipcheckNistMapping[];
|
|
|
612
676
|
* Accepts bare ("binary") or publisher-prefixed ("mitre/binary") names.
|
|
613
677
|
* @returns array of control IDs, or [] if the analysis has no mapping
|
|
614
678
|
*/
|
|
615
|
-
declare function getHipcheckNistControls(analysis: string): string[];
|
|
679
|
+
export declare function getHipcheckNistControls(analysis: string): string[];
|
|
616
680
|
/** Check whether a Hipcheck analysis name has a NIST mapping. */
|
|
617
|
-
declare function hipcheckAnalysisExists(analysis: string): boolean;
|
|
681
|
+
export declare function hipcheckAnalysisExists(analysis: string): boolean;
|
|
618
682
|
/** Get all mapped Hipcheck analysis names, sorted. */
|
|
619
|
-
declare function getAllHipcheckAnalyses(): string[];
|
|
683
|
+
export declare function getAllHipcheckAnalyses(): string[];
|
|
620
684
|
/** Get all Hipcheck to NIST mappings. */
|
|
621
|
-
declare function getAllHipcheckMappings(): HipcheckNistMappings;
|
|
685
|
+
export declare function getAllHipcheckMappings(): HipcheckNistMappings;
|
|
622
686
|
//#endregion
|
|
623
|
-
export {
|
|
687
|
+
export type { AwsConfigNistMapping, AwsConfigNistMappings, AwsConfigSuppression, AwsConfigSuppressions, CCIItem, CCIMappings, CheckovCciNistMapping, CheckovCciNistMappings, CheckovMappingDataset, CheckovMappingProvenance, CweNistMapping, CweNistMappings, HipcheckNistMapping, HipcheckNistMappings, NISTDescriptions, NessusNistMapping, NessusNistMappings, NiktoNistMappings, NistCCIMappings, NistControlTranslation, NistCrosswalkRelation, OwaspNistMapping, OwaspNistMappings, ScoutsuiteNistMapping, ScoutsuiteNistMappings };
|
|
624
688
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/cci/types.ts","../src/cci/index.ts","../src/nist/crosswalk.ts","../src/nist/types.ts","../src/nist/index.ts","../src/owasp/types.ts","../src/owasp/index.ts","../src/cwe/types.ts","../src/cwe/index.ts","../src/nessus/types.ts","../src/nessus/index.ts","../src/nikto/types.ts","../src/nikto/index.ts","../src/scoutsuite/types.ts","../src/scoutsuite/index.ts","../src/awsconfig/types.ts","../src/awsconfig/index.ts","../src/hipcheck/types.ts","../src/hipcheck/index.ts"],"mappings":";;;;UAGiB;;EAEf;;EAEA;;;;;KAMU,cAAc,eAAe;;;;;KAM7B,kBAAkB;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/cci/types.ts","../src/cci/index.ts","../src/nist/normalize.ts","../src/nist/crosswalk.ts","../src/nist/types.ts","../src/nist/index.ts","../src/owasp/types.ts","../src/owasp/index.ts","../src/cwe/types.ts","../src/cwe/index.ts","../src/checkov/types.ts","../src/checkov/index.ts","../src/nessus/types.ts","../src/nessus/index.ts","../src/nikto/types.ts","../src/nikto/index.ts","../src/scoutsuite/types.ts","../src/scoutsuite/index.ts","../src/awsconfig/types.ts","../src/awsconfig/index.ts","../src/hipcheck/types.ts","../src/hipcheck/index.ts"],"mappings":"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"}
|