@mitre/hdf-mappings 3.3.0 → 3.3.2
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 +67 -84
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3441 -1236
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,36 @@ type NISTDescriptions = Record<string, string>;
|
|
|
113
113
|
/**
|
|
114
114
|
* NIST SP 800-53 control description functions
|
|
115
115
|
*/
|
|
116
|
+
/**
|
|
117
|
+
* NIST SP 800-53 revision selection.
|
|
118
|
+
*
|
|
119
|
+
* The revision is a module-global default that every NIST-emitting mapping
|
|
120
|
+
* consults through its default lookups. Set it once at startup (the CLI's
|
|
121
|
+
* `--nist-rev` flag does this) to switch the catalog all converters target.
|
|
122
|
+
* For explicit, side-effect-free per-call selection, pass an explicit `rev` to
|
|
123
|
+
* the mapping lookups instead of mutating this.
|
|
124
|
+
*/
|
|
125
|
+
/** The revision mappings emit when nothing overrides it. */
|
|
126
|
+
declare const DEFAULT_NIST_REVISION = 5;
|
|
127
|
+
/** Revisions every NIST-emitting mapping table has rows for. */
|
|
128
|
+
declare const SUPPORTED_NIST_REVISIONS: readonly number[];
|
|
129
|
+
/** Get the module-global default NIST revision. */
|
|
130
|
+
declare function getCurrentNistRevision(): number;
|
|
131
|
+
/**
|
|
132
|
+
* Set the module-global default NIST revision. Throws (without mutating state)
|
|
133
|
+
* if the revision has no mapping data.
|
|
134
|
+
*/
|
|
135
|
+
declare function setCurrentNistRevision(rev: number): void;
|
|
136
|
+
/** Restore the default revision. Intended for cleanup and tests. */
|
|
137
|
+
declare function resetNistRevision(): void;
|
|
138
|
+
/** Report whether strict NIST revision alignment is enabled. */
|
|
139
|
+
declare function isNistStrict(): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Toggle strict NIST revision alignment. When enabled, revision-divergent
|
|
142
|
+
* mappings treat a rule mapped only at another revision as a hard error rather
|
|
143
|
+
* than a silent omission.
|
|
144
|
+
*/
|
|
145
|
+
declare function setNistStrict(strict: boolean): void;
|
|
116
146
|
/**
|
|
117
147
|
* Get the description for a NIST control ID.
|
|
118
148
|
*
|
|
@@ -290,39 +320,17 @@ interface CweNistMapping {
|
|
|
290
320
|
type CweNistMappings = CweNistMapping[];
|
|
291
321
|
//#endregion
|
|
292
322
|
//#region src/cwe/index.d.ts
|
|
293
|
-
/**
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
*/
|
|
298
|
-
declare function
|
|
299
|
-
/**
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
*/
|
|
304
|
-
declare function getCweNistControl(cweId: number): string | undefined;
|
|
305
|
-
/**
|
|
306
|
-
* Get the CWE name for a CWE ID
|
|
307
|
-
* @param cweId - The CWE ID (number)
|
|
308
|
-
* @returns The CWE name or undefined if not found
|
|
309
|
-
*/
|
|
310
|
-
declare function getCweName(cweId: number): string | undefined;
|
|
311
|
-
/**
|
|
312
|
-
* Get all CWE IDs
|
|
313
|
-
* @returns Array of all CWE IDs
|
|
314
|
-
*/
|
|
315
|
-
declare function getAllCweIds(): number[];
|
|
316
|
-
/**
|
|
317
|
-
* Check if a CWE ID exists in the mappings
|
|
318
|
-
* @param cweId - The CWE ID to check
|
|
319
|
-
* @returns True if the CWE ID exists
|
|
320
|
-
*/
|
|
321
|
-
declare function cweExists(cweId: number): boolean;
|
|
322
|
-
/**
|
|
323
|
-
* Get all CWE to NIST mappings
|
|
324
|
-
* @returns Array of all mappings
|
|
325
|
-
*/
|
|
323
|
+
/** Get the full mapping for a CWE ID at the given NIST revision. */
|
|
324
|
+
declare function getCweNistMapping(cweId: number, rev?: number): CweNistMapping | undefined;
|
|
325
|
+
/** Get the NIST control ID for a CWE ID at the given NIST revision. */
|
|
326
|
+
declare function getCweNistControl(cweId: number, rev?: number): string | undefined;
|
|
327
|
+
/** Get the CWE name for a CWE ID at the given NIST revision. */
|
|
328
|
+
declare function getCweName(cweId: number, rev?: number): string | undefined;
|
|
329
|
+
/** Get all CWE IDs present at the given NIST revision. */
|
|
330
|
+
declare function getAllCweIds(rev?: number): number[];
|
|
331
|
+
/** Check whether a CWE ID exists at the given NIST revision. */
|
|
332
|
+
declare function cweExists(cweId: number, rev?: number): boolean;
|
|
333
|
+
/** Get all CWE to NIST mappings (all revisions). */
|
|
326
334
|
declare function getAllCweMappings(): CweNistMappings;
|
|
327
335
|
//#endregion
|
|
328
336
|
//#region src/nessus/types.d.ts
|
|
@@ -450,57 +458,32 @@ interface AwsConfigNistMapping {
|
|
|
450
458
|
type AwsConfigNistMappings = AwsConfigNistMapping[];
|
|
451
459
|
//#endregion
|
|
452
460
|
//#region src/awsconfig/index.d.ts
|
|
453
|
-
/**
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
*/
|
|
458
|
-
declare function
|
|
459
|
-
/**
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
*/
|
|
464
|
-
declare function
|
|
465
|
-
/**
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*/
|
|
476
|
-
declare function
|
|
477
|
-
/**
|
|
478
|
-
* Get all AWS Config rule source identifiers
|
|
479
|
-
* @returns Array of all rule source identifiers
|
|
480
|
-
*/
|
|
481
|
-
declare function getAllAwsConfigIdentifiers(): string[];
|
|
482
|
-
/**
|
|
483
|
-
* Get all AWS Config rule names
|
|
484
|
-
* @returns Array of all rule names
|
|
485
|
-
*/
|
|
486
|
-
declare function getAllAwsConfigRuleNames(): string[];
|
|
487
|
-
/**
|
|
488
|
-
* Check if an AWS Config rule exists by source identifier
|
|
489
|
-
* @param identifier - The rule source identifier to check
|
|
490
|
-
* @returns True if the rule exists
|
|
491
|
-
*/
|
|
492
|
-
declare function awsConfigIdentifierExists(identifier: string): boolean;
|
|
493
|
-
/**
|
|
494
|
-
* Check if an AWS Config rule exists by rule name
|
|
495
|
-
* @param ruleName - The rule name to check
|
|
496
|
-
* @returns True if the rule exists
|
|
497
|
-
*/
|
|
498
|
-
declare function awsConfigRuleNameExists(ruleName: string): boolean;
|
|
499
|
-
/**
|
|
500
|
-
* Get all AWS Config to NIST mappings
|
|
501
|
-
* @returns Array of all mappings
|
|
502
|
-
*/
|
|
461
|
+
/** Get the full mapping for an AWS Config rule by source identifier. */
|
|
462
|
+
declare function getAwsConfigNistMappingByIdentifier(identifier: string, rev?: number): AwsConfigNistMapping | undefined;
|
|
463
|
+
/** Get the full mapping for an AWS Config rule by rule name. */
|
|
464
|
+
declare function getAwsConfigNistMappingByName(ruleName: string, rev?: number): AwsConfigNistMapping | undefined;
|
|
465
|
+
/** Get the NIST control ID for an AWS Config rule by source identifier. */
|
|
466
|
+
declare function getAwsConfigNistControlByIdentifier(identifier: string, rev?: number): string | undefined;
|
|
467
|
+
/** Get the NIST control ID for an AWS Config rule by rule name. */
|
|
468
|
+
declare function getAwsConfigNistControlByName(ruleName: string, rev?: number): string | undefined;
|
|
469
|
+
/** Get all AWS Config rule source identifiers present at the given revision. */
|
|
470
|
+
declare function getAllAwsConfigIdentifiers(rev?: number): string[];
|
|
471
|
+
/** Get all AWS Config rule names present at the given revision. */
|
|
472
|
+
declare function getAllAwsConfigRuleNames(rev?: number): string[];
|
|
473
|
+
/** Check if an AWS Config rule exists by source identifier at the given revision. */
|
|
474
|
+
declare function awsConfigIdentifierExists(identifier: string, rev?: number): boolean;
|
|
475
|
+
/** Check if an AWS Config rule exists by rule name at the given revision. */
|
|
476
|
+
declare function awsConfigRuleNameExists(ruleName: string, rev?: number): boolean;
|
|
477
|
+
/**
|
|
478
|
+
* Get the supported NIST revisions at which the rule resolves (by source
|
|
479
|
+
* identifier or rule name), sorted ascending. Mirrors the resolution
|
|
480
|
+
* buildNistTags performs, so a revision is included exactly when a conversion
|
|
481
|
+
* at that revision would emit NIST tags. Empty means unmapped everywhere — a
|
|
482
|
+
* coverage gap, not a revision mismatch.
|
|
483
|
+
*/
|
|
484
|
+
declare function awsConfigMappedRevisions(identifier: string, ruleName: string): number[];
|
|
485
|
+
/** Get all AWS Config to NIST mappings (all revisions). */
|
|
503
486
|
declare function getAllAwsConfigMappings(): AwsConfigNistMappings;
|
|
504
487
|
//#endregion
|
|
505
|
-
export { type AwsConfigNistMapping, type AwsConfigNistMappings, type CCIItem, type CCIMappings, type CweNistMapping, type CweNistMappings, DEFAULT_COMPONENT_MANAGEMENT_NIST_TAGS, DEFAULT_REMEDIATION_NIST_TAGS, DEFAULT_STATIC_ANALYSIS_NIST_TAGS, type NISTDescriptions, type NessusNistMapping, type NessusNistMappings, type NiktoNistMappings, type NistCCIMappings, type OwaspNistMapping, type OwaspNistMappings, type ScoutsuiteNistMapping, type ScoutsuiteNistMappings, awsConfigIdentifierExists, awsConfigRuleNameExists, cciExists, cweExists, getAllAwsConfigIdentifiers, getAllAwsConfigMappings, getAllAwsConfigRuleNames, getAllCCIIds, getAllCweIds, getAllCweMappings, getAllNISTIds, getAllNessusMappings, getAllNessusPluginFamilies, getAllNiktoIds, getAllNiktoMappings, getAllOwaspIds, getAllOwaspMappings, getAllScoutsuiteMappings, getAllScoutsuiteRules, getAwsConfigNistControlByIdentifier, getAwsConfigNistControlByName, getAwsConfigNistMappingByIdentifier, getAwsConfigNistMappingByName, getCCIDescription, getCCINistMappings, getCweName, getCweNistControl, getCweNistMapping, getNISTDescription, getNISTFamily, getNessusNistControl, getNessusPluginFamilyMappings, getNiktoNistControl, getNistCCIMappings, getOwaspName, getOwaspNistControl, getOwaspNistMapping, getScoutsuiteNistControl, getScoutsuiteNistMapping, nessusPluginFamilyExists, niktoExists, nistExists, nistToCci, owaspExists, scoutsuiteRuleExists };
|
|
488
|
+
export { type AwsConfigNistMapping, type AwsConfigNistMappings, type CCIItem, type CCIMappings, type CweNistMapping, type CweNistMappings, DEFAULT_COMPONENT_MANAGEMENT_NIST_TAGS, DEFAULT_NIST_REVISION, DEFAULT_REMEDIATION_NIST_TAGS, DEFAULT_STATIC_ANALYSIS_NIST_TAGS, type NISTDescriptions, type NessusNistMapping, type NessusNistMappings, type NiktoNistMappings, type NistCCIMappings, type OwaspNistMapping, type OwaspNistMappings, SUPPORTED_NIST_REVISIONS, type ScoutsuiteNistMapping, type ScoutsuiteNistMappings, awsConfigIdentifierExists, awsConfigMappedRevisions, awsConfigRuleNameExists, cciExists, cweExists, getAllAwsConfigIdentifiers, getAllAwsConfigMappings, getAllAwsConfigRuleNames, getAllCCIIds, getAllCweIds, getAllCweMappings, getAllNISTIds, getAllNessusMappings, getAllNessusPluginFamilies, getAllNiktoIds, getAllNiktoMappings, getAllOwaspIds, getAllOwaspMappings, getAllScoutsuiteMappings, getAllScoutsuiteRules, getAwsConfigNistControlByIdentifier, getAwsConfigNistControlByName, getAwsConfigNistMappingByIdentifier, getAwsConfigNistMappingByName, getCCIDescription, getCCINistMappings, getCurrentNistRevision, getCweName, getCweNistControl, getCweNistMapping, getNISTDescription, getNISTFamily, getNessusNistControl, getNessusPluginFamilyMappings, getNiktoNistControl, getNistCCIMappings, getOwaspName, getOwaspNistControl, getOwaspNistMapping, getScoutsuiteNistControl, getScoutsuiteNistMapping, isNistStrict, nessusPluginFamilyExists, niktoExists, nistExists, nistToCci, owaspExists, resetNistRevision, scoutsuiteRuleExists, setCurrentNistRevision, setNistStrict };
|
|
506
489
|
//# 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/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"],"mappings":";;AAGA;;UAAiB,OAAA;EAEf;EAAA,GAAA;EAQU;EANV,IAAI;AAAA;;AAM0C;AAMhD;KANY,WAAA,GAAc,MAAM,SAAS,OAAA;;;AAML;;KAAxB,eAAA,GAAkB,MAAM;;;;AAhBpC;;;;AAIM;AAMN;;;;AAAgD;AAMhD;;;;iBCIgB,iBAAA,CAAkB,KAAa;;;;AAA/C;;;;AAA+C;AAqB/C;;;;iBAAgB,kBAAA,CAAmB,KAAa;AAoBhD;;;;AAA4B;AAiB5B;;;;AAAuC;AA8BvC;AA/CA,iBAAgB,YAAA;;;AA+CsC;AAqBtD;;;;AAAgD;;;;ACjIhD;;iBD8EgB,SAAA,CAAU,KAAa;;AC9EF;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/cci/types.ts","../src/cci/index.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"],"mappings":";;AAGA;;UAAiB,OAAA;EAEf;EAAA,GAAA;EAQU;EANV,IAAI;AAAA;;AAM0C;AAMhD;KANY,WAAA,GAAc,MAAM,SAAS,OAAA;;;AAML;;KAAxB,eAAA,GAAkB,MAAM;;;;AAhBpC;;;;AAIM;AAMN;;;;AAAgD;AAMhD;;;;iBCIgB,iBAAA,CAAkB,KAAa;;;;AAA/C;;;;AAA+C;AAqB/C;;;;iBAAgB,kBAAA,CAAmB,KAAa;AAoBhD;;;;AAA4B;AAiB5B;;;;AAAuC;AA8BvC;AA/CA,iBAAgB,YAAA;;;AA+CsC;AAqBtD;;;;AAAgD;;;;ACjIhD;;iBD8EgB,SAAA,CAAU,KAAa;;AC9EF;;;;ACiBrC;;;;AAAkC;A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