@mitre/hdf-mappings 3.0.1 → 3.1.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/LICENSE.md +55 -0
- package/README.md +7 -3
- package/dist/index.d.ts +504 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33049 -21
- package/dist/index.js.map +1 -1
- package/package.json +18 -19
- package/dist/awsconfig/index.d.ts +0 -56
- package/dist/awsconfig/index.d.ts.map +0 -1
- package/dist/awsconfig/index.js +0 -79
- package/dist/awsconfig/index.js.map +0 -1
- package/dist/awsconfig/types.d.ts +0 -11
- package/dist/awsconfig/types.d.ts.map +0 -1
- package/dist/awsconfig/types.js +0 -5
- package/dist/awsconfig/types.js.map +0 -1
- package/dist/cci/index.d.ts +0 -85
- package/dist/cci/index.d.ts.map +0 -1
- package/dist/cci/index.js +0 -132
- package/dist/cci/index.js.map +0 -1
- package/dist/cci/types.d.ts +0 -19
- package/dist/cci/types.d.ts.map +0 -1
- package/dist/cci/types.js +0 -2
- package/dist/cci/types.js.map +0 -1
- package/dist/cwe/index.d.ts +0 -39
- package/dist/cwe/index.d.ts.map +0 -1
- package/dist/cwe/index.js +0 -55
- package/dist/cwe/index.js.map +0 -1
- package/dist/cwe/types.d.ts +0 -12
- package/dist/cwe/types.d.ts.map +0 -1
- package/dist/cwe/types.js +0 -5
- package/dist/cwe/types.js.map +0 -1
- package/dist/data/awsconfig-mappings.json +0 -638
- package/dist/data/cci-mappings.json +0 -24125
- package/dist/data/cwe-nist-mappings.json +0 -1416
- package/dist/data/nessus-nist-mappings.json +0 -432
- package/dist/data/nikto-nist-mappings.json +0 -8943
- package/dist/data/nist-cci-mappings.json +0 -23
- package/dist/data/nist-descriptions.json +0 -1684
- package/dist/data/owasp-nist-mappings.json +0 -72
- package/dist/data/scoutsuite-nist-mappings.json +0 -558
- package/dist/data/src/data/awsconfig-mappings.json +0 -638
- package/dist/data/src/data/cci-mappings.json +0 -24125
- package/dist/data/src/data/cwe-nist-mappings.json +0 -1416
- package/dist/data/src/data/nessus-nist-mappings.json +0 -432
- package/dist/data/src/data/nikto-nist-mappings.json +0 -8943
- package/dist/data/src/data/nist-cci-mappings.json +0 -23
- package/dist/data/src/data/nist-descriptions.json +0 -1684
- package/dist/data/src/data/owasp-nist-mappings.json +0 -72
- package/dist/data/src/data/scoutsuite-nist-mappings.json +0 -558
- package/dist/nessus/index.d.ts +0 -34
- package/dist/nessus/index.d.ts.map +0 -1
- package/dist/nessus/index.js +0 -53
- package/dist/nessus/index.js.map +0 -1
- package/dist/nessus/types.d.ts +0 -10
- package/dist/nessus/types.d.ts.map +0 -1
- package/dist/nessus/types.js +0 -5
- package/dist/nessus/types.js.map +0 -1
- package/dist/nikto/index.d.ts +0 -27
- package/dist/nikto/index.d.ts.map +0 -1
- package/dist/nikto/index.js +0 -38
- package/dist/nikto/index.js.map +0 -1
- package/dist/nikto/types.d.ts +0 -5
- package/dist/nikto/types.d.ts.map +0 -1
- package/dist/nikto/types.js +0 -5
- package/dist/nikto/types.js.map +0 -1
- package/dist/nist/index.d.ts +0 -75
- package/dist/nist/index.d.ts.map +0 -1
- package/dist/nist/index.js +0 -103
- package/dist/nist/index.js.map +0 -1
- package/dist/nist/types.d.ts +0 -5
- package/dist/nist/types.d.ts.map +0 -1
- package/dist/nist/types.js +0 -2
- package/dist/nist/types.js.map +0 -1
- package/dist/owasp/index.d.ts +0 -83
- package/dist/owasp/index.d.ts.map +0 -1
- package/dist/owasp/index.js +0 -104
- package/dist/owasp/index.js.map +0 -1
- package/dist/owasp/types.d.ts +0 -12
- package/dist/owasp/types.d.ts.map +0 -1
- package/dist/owasp/types.js +0 -5
- package/dist/owasp/types.js.map +0 -1
- package/dist/scoutsuite/index.d.ts +0 -33
- package/dist/scoutsuite/index.d.ts.map +0 -1
- package/dist/scoutsuite/index.js +0 -46
- package/dist/scoutsuite/index.js.map +0 -1
- package/dist/scoutsuite/types.d.ts +0 -9
- package/dist/scoutsuite/types.d.ts.map +0 -1
- package/dist/scoutsuite/types.js +0 -5
- package/dist/scoutsuite/types.js.map +0 -1
package/dist/cwe/index.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Query functions for CWE to NIST mappings
|
|
3
|
-
*/
|
|
4
|
-
import type { CweNistMapping, CweNistMappings } from './types.js';
|
|
5
|
-
/**
|
|
6
|
-
* Get the full mapping for a CWE ID
|
|
7
|
-
* @param cweId - The CWE ID (number)
|
|
8
|
-
* @returns The mapping object or undefined if not found
|
|
9
|
-
*/
|
|
10
|
-
export declare function getCweNistMapping(cweId: number): CweNistMapping | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Get the NIST control ID for a CWE ID
|
|
13
|
-
* @param cweId - The CWE ID (number)
|
|
14
|
-
* @returns The NIST control ID or undefined if not found
|
|
15
|
-
*/
|
|
16
|
-
export declare function getCweNistControl(cweId: number): string | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Get the CWE name for a CWE ID
|
|
19
|
-
* @param cweId - The CWE ID (number)
|
|
20
|
-
* @returns The CWE name or undefined if not found
|
|
21
|
-
*/
|
|
22
|
-
export declare function getCweName(cweId: number): string | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Get all CWE IDs
|
|
25
|
-
* @returns Array of all CWE IDs
|
|
26
|
-
*/
|
|
27
|
-
export declare function getAllCweIds(): number[];
|
|
28
|
-
/**
|
|
29
|
-
* Check if a CWE ID exists in the mappings
|
|
30
|
-
* @param cweId - The CWE ID to check
|
|
31
|
-
* @returns True if the CWE ID exists
|
|
32
|
-
*/
|
|
33
|
-
export declare function cweExists(cweId: number): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Get all CWE to NIST mappings
|
|
36
|
-
* @returns Array of all mappings
|
|
37
|
-
*/
|
|
38
|
-
export declare function getAllCweMappings(): CweNistMappings;
|
|
39
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/cwe/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cwe/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAQlE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAE3E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGnE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG5D;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,eAAe,CAEnD"}
|
package/dist/cwe/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Query functions for CWE to NIST mappings
|
|
3
|
-
*/
|
|
4
|
-
import rawMappings from '../data/cwe-nist-mappings.json';
|
|
5
|
-
const mappings = rawMappings;
|
|
6
|
-
const indexById = new Map(mappings.map(m => [m['CWE-ID'], m]));
|
|
7
|
-
/**
|
|
8
|
-
* Get the full mapping for a CWE ID
|
|
9
|
-
* @param cweId - The CWE ID (number)
|
|
10
|
-
* @returns The mapping object or undefined if not found
|
|
11
|
-
*/
|
|
12
|
-
export function getCweNistMapping(cweId) {
|
|
13
|
-
return indexById.get(cweId);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Get the NIST control ID for a CWE ID
|
|
17
|
-
* @param cweId - The CWE ID (number)
|
|
18
|
-
* @returns The NIST control ID or undefined if not found
|
|
19
|
-
*/
|
|
20
|
-
export function getCweNistControl(cweId) {
|
|
21
|
-
const mapping = getCweNistMapping(cweId);
|
|
22
|
-
return mapping?.['NIST-ID'];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Get the CWE name for a CWE ID
|
|
26
|
-
* @param cweId - The CWE ID (number)
|
|
27
|
-
* @returns The CWE name or undefined if not found
|
|
28
|
-
*/
|
|
29
|
-
export function getCweName(cweId) {
|
|
30
|
-
const mapping = getCweNistMapping(cweId);
|
|
31
|
-
return mapping?.['CWE Name'];
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Get all CWE IDs
|
|
35
|
-
* @returns Array of all CWE IDs
|
|
36
|
-
*/
|
|
37
|
-
export function getAllCweIds() {
|
|
38
|
-
return Array.from(indexById.keys());
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Check if a CWE ID exists in the mappings
|
|
42
|
-
* @param cweId - The CWE ID to check
|
|
43
|
-
* @returns True if the CWE ID exists
|
|
44
|
-
*/
|
|
45
|
-
export function cweExists(cweId) {
|
|
46
|
-
return indexById.has(cweId);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Get all CWE to NIST mappings
|
|
50
|
-
* @returns Array of all mappings
|
|
51
|
-
*/
|
|
52
|
-
export function getAllCweMappings() {
|
|
53
|
-
return [...mappings];
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cwe/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cwe/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAEzD,MAAM,QAAQ,GAAG,WAA8B,CAAC;AAChD,MAAM,SAAS,GAAG,IAAI,GAAG,CACvB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CACpC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,OAAO,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC;AAC9B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;AACvB,CAAC"}
|
package/dist/cwe/types.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TypeScript types for CWE to NIST mappings
|
|
3
|
-
*/
|
|
4
|
-
export interface CweNistMapping {
|
|
5
|
-
'CWE-ID': number;
|
|
6
|
-
'CWE Name': string;
|
|
7
|
-
'NIST-ID': string;
|
|
8
|
-
Rev: number;
|
|
9
|
-
'NIST Name': string;
|
|
10
|
-
}
|
|
11
|
-
export type CweNistMappings = CweNistMapping[];
|
|
12
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/cwe/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cwe/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC"}
|
package/dist/cwe/types.js
DELETED
package/dist/cwe/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/cwe/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|