@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.
Files changed (89) hide show
  1. package/LICENSE.md +55 -0
  2. package/README.md +7 -3
  3. package/dist/index.d.ts +504 -21
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +33049 -21
  6. package/dist/index.js.map +1 -1
  7. package/package.json +18 -19
  8. package/dist/awsconfig/index.d.ts +0 -56
  9. package/dist/awsconfig/index.d.ts.map +0 -1
  10. package/dist/awsconfig/index.js +0 -79
  11. package/dist/awsconfig/index.js.map +0 -1
  12. package/dist/awsconfig/types.d.ts +0 -11
  13. package/dist/awsconfig/types.d.ts.map +0 -1
  14. package/dist/awsconfig/types.js +0 -5
  15. package/dist/awsconfig/types.js.map +0 -1
  16. package/dist/cci/index.d.ts +0 -85
  17. package/dist/cci/index.d.ts.map +0 -1
  18. package/dist/cci/index.js +0 -132
  19. package/dist/cci/index.js.map +0 -1
  20. package/dist/cci/types.d.ts +0 -19
  21. package/dist/cci/types.d.ts.map +0 -1
  22. package/dist/cci/types.js +0 -2
  23. package/dist/cci/types.js.map +0 -1
  24. package/dist/cwe/index.d.ts +0 -39
  25. package/dist/cwe/index.d.ts.map +0 -1
  26. package/dist/cwe/index.js +0 -55
  27. package/dist/cwe/index.js.map +0 -1
  28. package/dist/cwe/types.d.ts +0 -12
  29. package/dist/cwe/types.d.ts.map +0 -1
  30. package/dist/cwe/types.js +0 -5
  31. package/dist/cwe/types.js.map +0 -1
  32. package/dist/data/awsconfig-mappings.json +0 -638
  33. package/dist/data/cci-mappings.json +0 -24125
  34. package/dist/data/cwe-nist-mappings.json +0 -1416
  35. package/dist/data/nessus-nist-mappings.json +0 -432
  36. package/dist/data/nikto-nist-mappings.json +0 -8943
  37. package/dist/data/nist-cci-mappings.json +0 -23
  38. package/dist/data/nist-descriptions.json +0 -1684
  39. package/dist/data/owasp-nist-mappings.json +0 -72
  40. package/dist/data/scoutsuite-nist-mappings.json +0 -558
  41. package/dist/data/src/data/awsconfig-mappings.json +0 -638
  42. package/dist/data/src/data/cci-mappings.json +0 -24125
  43. package/dist/data/src/data/cwe-nist-mappings.json +0 -1416
  44. package/dist/data/src/data/nessus-nist-mappings.json +0 -432
  45. package/dist/data/src/data/nikto-nist-mappings.json +0 -8943
  46. package/dist/data/src/data/nist-cci-mappings.json +0 -23
  47. package/dist/data/src/data/nist-descriptions.json +0 -1684
  48. package/dist/data/src/data/owasp-nist-mappings.json +0 -72
  49. package/dist/data/src/data/scoutsuite-nist-mappings.json +0 -558
  50. package/dist/nessus/index.d.ts +0 -34
  51. package/dist/nessus/index.d.ts.map +0 -1
  52. package/dist/nessus/index.js +0 -53
  53. package/dist/nessus/index.js.map +0 -1
  54. package/dist/nessus/types.d.ts +0 -10
  55. package/dist/nessus/types.d.ts.map +0 -1
  56. package/dist/nessus/types.js +0 -5
  57. package/dist/nessus/types.js.map +0 -1
  58. package/dist/nikto/index.d.ts +0 -27
  59. package/dist/nikto/index.d.ts.map +0 -1
  60. package/dist/nikto/index.js +0 -38
  61. package/dist/nikto/index.js.map +0 -1
  62. package/dist/nikto/types.d.ts +0 -5
  63. package/dist/nikto/types.d.ts.map +0 -1
  64. package/dist/nikto/types.js +0 -5
  65. package/dist/nikto/types.js.map +0 -1
  66. package/dist/nist/index.d.ts +0 -75
  67. package/dist/nist/index.d.ts.map +0 -1
  68. package/dist/nist/index.js +0 -103
  69. package/dist/nist/index.js.map +0 -1
  70. package/dist/nist/types.d.ts +0 -5
  71. package/dist/nist/types.d.ts.map +0 -1
  72. package/dist/nist/types.js +0 -2
  73. package/dist/nist/types.js.map +0 -1
  74. package/dist/owasp/index.d.ts +0 -83
  75. package/dist/owasp/index.d.ts.map +0 -1
  76. package/dist/owasp/index.js +0 -104
  77. package/dist/owasp/index.js.map +0 -1
  78. package/dist/owasp/types.d.ts +0 -12
  79. package/dist/owasp/types.d.ts.map +0 -1
  80. package/dist/owasp/types.js +0 -5
  81. package/dist/owasp/types.js.map +0 -1
  82. package/dist/scoutsuite/index.d.ts +0 -33
  83. package/dist/scoutsuite/index.d.ts.map +0 -1
  84. package/dist/scoutsuite/index.js +0 -46
  85. package/dist/scoutsuite/index.js.map +0 -1
  86. package/dist/scoutsuite/types.d.ts +0 -9
  87. package/dist/scoutsuite/types.d.ts.map +0 -1
  88. package/dist/scoutsuite/types.js +0 -5
  89. package/dist/scoutsuite/types.js.map +0 -1
package/LICENSE.md ADDED
@@ -0,0 +1,55 @@
1
+ # License
2
+
3
+ Copyright © 2025 The MITRE Corporation.
4
+
5
+ Approved for Public Release; Distribution Unlimited. Case Number 18-3678.
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License"); you may
8
+ not use this file except in compliance with the License. You may obtain a
9
+ copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ License for the specific language governing permissions and limitations
17
+ under the License.
18
+
19
+ ## Redistribution Terms
20
+
21
+ Redistribution and use in source and binary forms, with or without
22
+ modification, are permitted provided that the following conditions are
23
+ met:
24
+
25
+ - Redistributions of source code must retain the above copyright/digital
26
+ rights legend, this list of conditions and the following Notice.
27
+ - Redistributions in binary form must reproduce the above
28
+ copyright/digital rights legend, this list of conditions and the
29
+ following Notice in the documentation and/or other materials provided
30
+ with the distribution.
31
+ - Neither the name of The MITRE Corporation nor the names of its contributors
32
+ may be used to endorse or promote products derived from this software
33
+ without specific prior written permission.
34
+
35
+ ## Notice
36
+
37
+ The MITRE Corporation grants permission to reproduce, distribute, modify, and
38
+ otherwise use this software to the extent permitted by the licensed terms
39
+ provided in the LICENSE file included with this project.
40
+
41
+ This software was produced by The MITRE Corporation for the U.S. Government
42
+ under contract. As such the U.S. Government has certain use and data
43
+ rights in this software. No use other than those granted to the U.S.
44
+ Government, or to those acting on behalf of the U.S. Government, under
45
+ these contract arrangements is authorized without the express written
46
+ permission of The MITRE Corporation.
47
+
48
+ Some files in this codebase were generated by generative AI, under the
49
+ direction and review of The MITRE Corporation employees, for the purpose of
50
+ development efficiency. All AI-generated code functionality was validated
51
+ by standard quality and assurance testing.
52
+
53
+ For further information, please contact The MITRE Corporation,
54
+ Contracts Management Office, 7515 Colshire Drive, McLean, VA 22102-7539,
55
+ (703) 983-6000.
package/README.md CHANGED
@@ -215,11 +215,15 @@ Each mapping is also available as a Go package:
215
215
  hdf-mappings/go/
216
216
  cci/ — CCI↔NIST lookups (GetCCINistMappings, NISTToCCI, CCIToNIST)
217
217
  cwe/ — CWE→NIST lookups (NISTControls)
218
+ owasp/ — OWASP→NIST lookups (NISTControls)
219
+ nessus/ — Nessus plugin→NIST lookups (NISTControls, with family+pluginID)
220
+ nikto/ — Nikto test→NIST lookups (NISTControls)
221
+ scoutsuite/ — ScoutSuite rule→NIST lookups (NISTControls)
218
222
  awsconfig/ — AWS Config→NIST lookups (NISTControls, GetByRuleName, GetByIdentifier)
219
223
  ```
220
224
 
221
225
  ```go
222
- import "github.com/mitre/hdf-mappings/go/cci"
226
+ import "github.com/mitre/hdf-libs/hdf-mappings/go/cci"
223
227
 
224
228
  controls := cci.GetCCINistMappings("CCI-000001")
225
229
  // Returns: []string{"AC-1 a", "AC-1.1 (i and ii)", "AC-1 a 1"}
@@ -232,14 +236,14 @@ nist := cci.CCIToNIST([]string{"CCI-000366", "CCI-000001"})
232
236
  ```
233
237
 
234
238
  ```go
235
- import "github.com/mitre/hdf-mappings/go/cwe"
239
+ import "github.com/mitre/hdf-libs/hdf-mappings/go/cwe"
236
240
 
237
241
  controls := cwe.NISTControls("CWE-476") // prefix form
238
242
  controls = cwe.NISTControls("476") // numeric form — equivalent
239
243
  ```
240
244
 
241
245
  ```go
242
- import "github.com/mitre/hdf-mappings/go/awsconfig"
246
+ import "github.com/mitre/hdf-libs/hdf-mappings/go/awsconfig"
243
247
 
244
248
  controls := awsconfig.NISTControls("SECRETSMANAGER_SCHEDULED_ROTATION_SUCCESS_CHECK")
245
249
  mapping := awsconfig.GetByIdentifier("SECRETSMANAGER_SCHEDULED_ROTATION_SUCCESS_CHECK")
package/dist/index.d.ts CHANGED
@@ -1,23 +1,506 @@
1
+ //#region src/cci/types.d.ts
1
2
  /**
2
- * @mitre/hdf-mappings
3
- *
4
- * Security framework mappings for the Heimdall Data Format (HDF).
5
- * Provides CCI↔NIST, OWASP→NIST mappings and NIST control descriptions.
6
- */
7
- export { getCCIDescription, getCCINistMappings, getAllCCIIds, cciExists, getNistCCIMappings, nistToCci, } from './cci/index.js';
8
- export type { CCIItem, CCIMappings, NistCCIMappings } from './cci/types.js';
9
- export { getNISTDescription, getAllNISTIds, nistExists, getNISTFamily, DEFAULT_STATIC_ANALYSIS_NIST_TAGS, DEFAULT_REMEDIATION_NIST_TAGS, DEFAULT_COMPONENT_MANAGEMENT_NIST_TAGS, } from './nist/index.js';
10
- export type { NISTDescriptions } from './nist/types.js';
11
- export { getOwaspNistMapping, getOwaspNistControl, getOwaspName, getAllOwaspIds, owaspExists, getAllOwaspMappings, } from './owasp/index.js';
12
- export type { OwaspNistMapping, OwaspNistMappings } from './owasp/types.js';
13
- export { getCweNistMapping, getCweNistControl, getCweName, getAllCweIds, cweExists, getAllCweMappings, } from './cwe/index.js';
14
- export type { CweNistMapping, CweNistMappings } from './cwe/types.js';
15
- export { getNessusNistControl, getNessusPluginFamilyMappings, getAllNessusPluginFamilies, nessusPluginFamilyExists, getAllNessusMappings, } from './nessus/index.js';
16
- export type { NessusNistMapping, NessusNistMappings } from './nessus/types.js';
17
- export { getNiktoNistControl, getAllNiktoIds, niktoExists, getAllNiktoMappings, } from './nikto/index.js';
18
- export type { NiktoNistMappings } from './nikto/types.js';
19
- export { getScoutsuiteNistMapping, getScoutsuiteNistControl, getAllScoutsuiteRules, scoutsuiteRuleExists, getAllScoutsuiteMappings, } from './scoutsuite/index.js';
20
- export type { ScoutsuiteNistMapping, ScoutsuiteNistMappings } from './scoutsuite/types.js';
21
- export { getAwsConfigNistMappingByIdentifier, getAwsConfigNistMappingByName, getAwsConfigNistControlByIdentifier, getAwsConfigNistControlByName, getAllAwsConfigIdentifiers, getAllAwsConfigRuleNames, awsConfigIdentifierExists, awsConfigRuleNameExists, getAllAwsConfigMappings, } from './awsconfig/index.js';
22
- export type { AwsConfigNistMapping, AwsConfigNistMappings } from './awsconfig/types.js';
3
+ * Represents a CCI (Control Correlation Identifier) item.
4
+ */
5
+ interface CCIItem {
6
+ /** Definition/description of the CCI */
7
+ def: string;
8
+ /** Array of NIST control references this CCI maps to */
9
+ nist: string[];
10
+ }
11
+ /**
12
+ * CCI mappings database structure
13
+ */
14
+ type CCIMappings = Record<string, CCIItem>;
15
+ /**
16
+ * NIST control CCI ID mapping database structure.
17
+ * Keys are base NIST controls (e.g. "SA-11"), values are arrays of CCI IDs.
18
+ */
19
+ type NistCCIMappings = Record<string, string[]>;
20
+ //#endregion
21
+ //#region src/cci/index.d.ts
22
+ /**
23
+ * CCI (Control Correlation Identifier) mapping functions
24
+ */
25
+ /**
26
+ * Get the definition/description for a CCI ID.
27
+ *
28
+ * @param cciId - The CCI ID (e.g., 'CCI-000001')
29
+ * @returns The CCI definition, or undefined if not found
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * const def = getCCIDescription('CCI-000001');
34
+ * // Returns: "The organization develops an access control policy..."
35
+ * ```
36
+ */
37
+ declare function getCCIDescription(cciId: string): string | undefined;
38
+ /**
39
+ * Get the NIST control mappings for a CCI ID.
40
+ *
41
+ * @param cciId - The CCI ID (e.g., 'CCI-000001')
42
+ * @returns Array of NIST control references, or undefined if not found
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * const mappings = getCCINistMappings('CCI-000001');
47
+ * // Returns: ['AC-1 a', 'AC-1.1 (i and ii)', 'AC-1 a 1']
48
+ * ```
49
+ */
50
+ declare function getCCINistMappings(cciId: string): string[] | undefined;
51
+ /**
52
+ * Get all CCI IDs available in the database.
53
+ *
54
+ * @returns Array of all CCI IDs
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * const ids = getAllCCIIds();
59
+ * // Returns: ['CCI-000001', 'CCI-000002', ...]
60
+ * ```
61
+ */
62
+ declare function getAllCCIIds(): string[];
63
+ /**
64
+ * Check if a CCI ID exists in the database.
65
+ *
66
+ * @param cciId - The CCI ID to check
67
+ * @returns true if the CCI exists, false otherwise
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * if (cciExists('CCI-000001')) {
72
+ * console.log('CCI found');
73
+ * }
74
+ * ```
75
+ */
76
+ declare function cciExists(cciId: string): boolean;
77
+ /**
78
+ * Get CCI IDs for a NIST control using the curated mapping table.
79
+ * The input is normalized to its base control before lookup.
80
+ *
81
+ * @param nistControl - NIST control string (e.g., 'SI-10', 'AC-3 (2)')
82
+ * @returns Array of CCI IDs, or undefined if not found
83
+ *
84
+ * @example
85
+ * ```typescript
86
+ * const ccis = getNistCCIMappings('SI-10');
87
+ * // Returns: ['CCI-001310']
88
+ * ```
89
+ */
90
+ declare function getNistCCIMappings(nistControl: string): string[] | undefined;
91
+ /**
92
+ * Map NIST 800-53 controls to their CCI IDs using the curated mapping table.
93
+ * Results are deduplicated and sorted.
94
+ *
95
+ * @param nistControls - Array of NIST control strings
96
+ * @returns Deduplicated, sorted array of CCI IDs (empty array if no mappings found)
97
+ *
98
+ * @example
99
+ * ```typescript
100
+ * const ccis = nistToCci(['AC-3', 'SI-10']);
101
+ * // Returns: ['CCI-000213', 'CCI-001310']
102
+ * ```
103
+ */
104
+ declare function nistToCci(nistControls: string[]): string[];
105
+ //#endregion
106
+ //#region src/nist/types.d.ts
107
+ /**
108
+ * NIST control descriptions database structure
109
+ */
110
+ type NISTDescriptions = Record<string, string>;
111
+ //#endregion
112
+ //#region src/nist/index.d.ts
113
+ /**
114
+ * NIST SP 800-53 control description functions
115
+ */
116
+ /**
117
+ * Get the description for a NIST control ID.
118
+ *
119
+ * @param nistId - The NIST control ID (e.g., 'AC-01', 'AC-01 a', 'AC-01 a 01')
120
+ * @returns The NIST control description, or undefined if not found
121
+ *
122
+ * @example
123
+ * ```typescript
124
+ * const desc = getNISTDescription('AC-01');
125
+ * // Returns: "ACCESS CONTROL POLICY AND PROCEDURES"
126
+ * ```
127
+ */
128
+ declare function getNISTDescription(nistId: string): string | undefined;
129
+ /**
130
+ * Get all NIST control IDs available in the database.
131
+ *
132
+ * @returns Array of all NIST control IDs
133
+ *
134
+ * @example
135
+ * ```typescript
136
+ * const ids = getAllNISTIds();
137
+ * // Returns: ['AC-01', 'AC-01 a', 'AC-02', ...]
138
+ * ```
139
+ */
140
+ declare function getAllNISTIds(): string[];
141
+ /**
142
+ * Check if a NIST control ID exists in the database.
143
+ *
144
+ * @param nistId - The NIST control ID to check
145
+ * @returns true if the NIST control exists, false otherwise
146
+ *
147
+ * @example
148
+ * ```typescript
149
+ * if (nistExists('AC-01')) {
150
+ * console.log('NIST control found');
151
+ * }
152
+ * ```
153
+ */
154
+ declare function nistExists(nistId: string): boolean;
155
+ /**
156
+ * Extract the NIST family from a NIST control ID.
157
+ *
158
+ * @param nistId - The NIST control ID (e.g., 'AC-01', 'AC-01 a')
159
+ * @returns The NIST family code (e.g., 'AC'), or undefined if invalid
160
+ *
161
+ * @example
162
+ * ```typescript
163
+ * const family = getNISTFamily('AC-01');
164
+ * // Returns: 'AC'
165
+ *
166
+ * const family2 = getNISTFamily('AC-01 a 01');
167
+ * // Returns: 'AC'
168
+ * ```
169
+ */
170
+ declare function getNISTFamily(nistId: string): string | undefined;
171
+ /**
172
+ * Canonical NIST 800-53 fallback tags for converters when a finding has no
173
+ * CWE or the CWE has no NIST mapping. Categories match heimdall2's global.ts.
174
+ *
175
+ * - SA-11: Developer Security Testing and Evaluation
176
+ * - RA-5: Vulnerability Monitoring and Scanning
177
+ * - SI-2: Flaw Remediation
178
+ * - CM-8: System Component Inventory
179
+ */
180
+ /** Static analysis and vulnerability scanning tools (SA-11 + RA-5). */
181
+ declare const DEFAULT_STATIC_ANALYSIS_NIST_TAGS: string[];
182
+ /** Tools that identify outdated packages or flaws requiring patching (SI-2 + RA-5). */
183
+ declare const DEFAULT_REMEDIATION_NIST_TAGS: string[];
184
+ /** Dependency/inventory management tools (CM-8). */
185
+ declare const DEFAULT_COMPONENT_MANAGEMENT_NIST_TAGS: string[];
186
+ //#endregion
187
+ //#region src/owasp/types.d.ts
188
+ /**
189
+ * TypeScript types for OWASP Top 10 to NIST mappings
190
+ */
191
+ interface OwaspNistMapping {
192
+ 'OWASP-ID': string;
193
+ 'OWASP Name': string;
194
+ 'NIST-ID': string;
195
+ Rev: number;
196
+ 'NIST Name': string;
197
+ }
198
+ type OwaspNistMappings = OwaspNistMapping[];
199
+ //#endregion
200
+ //#region src/owasp/index.d.ts
201
+ /**
202
+ * Get the NIST mapping for an OWASP Top 10 ID.
203
+ *
204
+ * @param owaspId - The OWASP ID (e.g., 'A1', 'A2')
205
+ * @returns The mapping object, or undefined if not found
206
+ *
207
+ * @example
208
+ * ```typescript
209
+ * const mapping = getOwaspNistMapping('A1');
210
+ * // Returns: { 'OWASP-ID': 'A1', 'OWASP Name': 'Injection', 'NIST-ID': 'SI-10', ... }
211
+ * ```
212
+ */
213
+ declare function getOwaspNistMapping(owaspId: string): OwaspNistMapping | undefined;
214
+ /**
215
+ * Get the NIST control ID for an OWASP Top 10 ID.
216
+ *
217
+ * @param owaspId - The OWASP ID (e.g., 'A1', 'A2')
218
+ * @returns The NIST control ID, or undefined if not found
219
+ *
220
+ * @example
221
+ * ```typescript
222
+ * const nistId = getOwaspNistControl('A1');
223
+ * // Returns: 'SI-10'
224
+ * ```
225
+ */
226
+ declare function getOwaspNistControl(owaspId: string): string | undefined;
227
+ /**
228
+ * Get the OWASP vulnerability name for an OWASP ID.
229
+ *
230
+ * @param owaspId - The OWASP ID (e.g., 'A1', 'A2')
231
+ * @returns The OWASP vulnerability name, or undefined if not found
232
+ *
233
+ * @example
234
+ * ```typescript
235
+ * const name = getOwaspName('A1');
236
+ * // Returns: 'Injection'
237
+ * ```
238
+ */
239
+ declare function getOwaspName(owaspId: string): string | undefined;
240
+ /**
241
+ * Get all OWASP IDs available in the database.
242
+ *
243
+ * @returns Array of all OWASP IDs
244
+ *
245
+ * @example
246
+ * ```typescript
247
+ * const ids = getAllOwaspIds();
248
+ * // Returns: ['A1', 'A2', 'A3', ..., 'A10']
249
+ * ```
250
+ */
251
+ declare function getAllOwaspIds(): string[];
252
+ /**
253
+ * Check if an OWASP ID exists in the database.
254
+ *
255
+ * @param owaspId - The OWASP ID to check
256
+ * @returns true if the OWASP ID exists, false otherwise
257
+ *
258
+ * @example
259
+ * ```typescript
260
+ * if (owaspExists('A1')) {
261
+ * console.log('OWASP ID found');
262
+ * }
263
+ * ```
264
+ */
265
+ declare function owaspExists(owaspId: string): boolean;
266
+ /**
267
+ * Get all OWASP to NIST mappings.
268
+ *
269
+ * @returns Array of all mappings
270
+ *
271
+ * @example
272
+ * ```typescript
273
+ * const mappings = getAllOwaspMappings();
274
+ * // Returns all 10 OWASP Top 10 mappings
275
+ * ```
276
+ */
277
+ declare function getAllOwaspMappings(): OwaspNistMappings;
278
+ //#endregion
279
+ //#region src/cwe/types.d.ts
280
+ /**
281
+ * TypeScript types for CWE to NIST mappings
282
+ */
283
+ interface CweNistMapping {
284
+ 'CWE-ID': number;
285
+ 'CWE Name': string;
286
+ 'NIST-ID': string;
287
+ Rev: number;
288
+ 'NIST Name': string;
289
+ }
290
+ type CweNistMappings = CweNistMapping[];
291
+ //#endregion
292
+ //#region src/cwe/index.d.ts
293
+ /**
294
+ * Get the full mapping for a CWE ID
295
+ * @param cweId - The CWE ID (number)
296
+ * @returns The mapping object or undefined if not found
297
+ */
298
+ declare function getCweNistMapping(cweId: number): CweNistMapping | undefined;
299
+ /**
300
+ * Get the NIST control ID for a CWE ID
301
+ * @param cweId - The CWE ID (number)
302
+ * @returns The NIST control ID or undefined if not found
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
+ */
326
+ declare function getAllCweMappings(): CweNistMappings;
327
+ //#endregion
328
+ //#region src/nessus/types.d.ts
329
+ /**
330
+ * TypeScript types for Nessus to NIST mappings
331
+ */
332
+ interface NessusNistMapping {
333
+ pluginFamily: string;
334
+ pluginID: string;
335
+ 'NIST-ID': string;
336
+ }
337
+ type NessusNistMappings = NessusNistMapping[];
338
+ //#endregion
339
+ //#region src/nessus/index.d.ts
340
+ /**
341
+ * Get the NIST control ID for a Nessus plugin family and plugin ID
342
+ * @param pluginFamily - The Nessus plugin family
343
+ * @param pluginId - The Nessus plugin ID (optional, defaults to "*")
344
+ * @returns The NIST control ID or undefined if not found
345
+ */
346
+ declare function getNessusNistControl(pluginFamily: string, pluginId?: string): string | undefined;
347
+ /**
348
+ * Get all mappings for a plugin family
349
+ * @param pluginFamily - The Nessus plugin family
350
+ * @returns Array of mappings for the plugin family
351
+ */
352
+ declare function getNessusPluginFamilyMappings(pluginFamily: string): NessusNistMappings;
353
+ /**
354
+ * Get all plugin families
355
+ * @returns Array of all plugin families
356
+ */
357
+ declare function getAllNessusPluginFamilies(): string[];
358
+ /**
359
+ * Check if a plugin family exists in the mappings
360
+ * @param pluginFamily - The plugin family to check
361
+ * @returns True if the plugin family exists
362
+ */
363
+ declare function nessusPluginFamilyExists(pluginFamily: string): boolean;
364
+ /**
365
+ * Get all Nessus to NIST mappings
366
+ * @returns Array of all mappings
367
+ */
368
+ declare function getAllNessusMappings(): NessusNistMappings;
369
+ //#endregion
370
+ //#region src/nikto/types.d.ts
371
+ /**
372
+ * TypeScript types for Nikto to NIST mappings
373
+ */
374
+ type NiktoNistMappings = Record<string, string>;
375
+ //#endregion
376
+ //#region src/nikto/index.d.ts
377
+ /**
378
+ * Get the NIST control ID for a Nikto test ID
379
+ * @param niktoId - The Nikto test ID (string or number)
380
+ * @returns The NIST control ID or undefined if not found
381
+ */
382
+ declare function getNiktoNistControl(niktoId: string | number): string | undefined;
383
+ /**
384
+ * Get all Nikto test IDs
385
+ * @returns Array of all Nikto test IDs
386
+ */
387
+ declare function getAllNiktoIds(): string[];
388
+ /**
389
+ * Check if a Nikto test ID exists in the mappings
390
+ * @param niktoId - The Nikto test ID to check
391
+ * @returns True if the Nikto test ID exists
392
+ */
393
+ declare function niktoExists(niktoId: string | number): boolean;
394
+ /**
395
+ * Get all Nikto to NIST mappings
396
+ * @returns Object mapping Nikto test IDs to NIST control IDs
397
+ */
398
+ declare function getAllNiktoMappings(): NiktoNistMappings;
399
+ //#endregion
400
+ //#region src/scoutsuite/types.d.ts
401
+ /**
402
+ * TypeScript types for ScoutSuite to NIST mappings
403
+ */
404
+ interface ScoutsuiteNistMapping {
405
+ RULE: string;
406
+ 'NIST-ID': string;
407
+ }
408
+ type ScoutsuiteNistMappings = ScoutsuiteNistMapping[];
409
+ //#endregion
410
+ //#region src/scoutsuite/index.d.ts
411
+ /**
412
+ * Get the full mapping for a ScoutSuite rule
413
+ * @param rule - The ScoutSuite rule name
414
+ * @returns The mapping object or undefined if not found
415
+ */
416
+ declare function getScoutsuiteNistMapping(rule: string): ScoutsuiteNistMapping | undefined;
417
+ /**
418
+ * Get the NIST control ID for a ScoutSuite rule
419
+ * @param rule - The ScoutSuite rule name
420
+ * @returns The NIST control ID or undefined if not found
421
+ */
422
+ declare function getScoutsuiteNistControl(rule: string): string | undefined;
423
+ /**
424
+ * Get all ScoutSuite rule names
425
+ * @returns Array of all rule names
426
+ */
427
+ declare function getAllScoutsuiteRules(): string[];
428
+ /**
429
+ * Check if a ScoutSuite rule exists in the mappings
430
+ * @param rule - The rule name to check
431
+ * @returns True if the rule exists
432
+ */
433
+ declare function scoutsuiteRuleExists(rule: string): boolean;
434
+ /**
435
+ * Get all ScoutSuite to NIST mappings
436
+ * @returns Array of all mappings
437
+ */
438
+ declare function getAllScoutsuiteMappings(): ScoutsuiteNistMappings;
439
+ //#endregion
440
+ //#region src/awsconfig/types.d.ts
441
+ /**
442
+ * TypeScript types for AWS Config to NIST mappings
443
+ */
444
+ interface AwsConfigNistMapping {
445
+ AwsConfigRuleSourceIdentifier: string;
446
+ AwsConfigRuleName: string;
447
+ 'NIST-ID': string;
448
+ Rev: number;
449
+ }
450
+ type AwsConfigNistMappings = AwsConfigNistMapping[];
451
+ //#endregion
452
+ //#region src/awsconfig/index.d.ts
453
+ /**
454
+ * Get the full mapping for an AWS Config rule by source identifier
455
+ * @param identifier - The AWS Config rule source identifier
456
+ * @returns The mapping object or undefined if not found
457
+ */
458
+ declare function getAwsConfigNistMappingByIdentifier(identifier: string): AwsConfigNistMapping | undefined;
459
+ /**
460
+ * Get the full mapping for an AWS Config rule by rule name
461
+ * @param ruleName - The AWS Config rule name
462
+ * @returns The mapping object or undefined if not found
463
+ */
464
+ declare function getAwsConfigNistMappingByName(ruleName: string): AwsConfigNistMapping | undefined;
465
+ /**
466
+ * Get the NIST control ID for an AWS Config rule by source identifier
467
+ * @param identifier - The AWS Config rule source identifier
468
+ * @returns The NIST control ID or undefined if not found
469
+ */
470
+ declare function getAwsConfigNistControlByIdentifier(identifier: string): string | undefined;
471
+ /**
472
+ * Get the NIST control ID for an AWS Config rule by rule name
473
+ * @param ruleName - The AWS Config rule name
474
+ * @returns The NIST control ID or undefined if not found
475
+ */
476
+ declare function getAwsConfigNistControlByName(ruleName: string): string | undefined;
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
+ */
503
+ declare function getAllAwsConfigMappings(): AwsConfigNistMappings;
504
+ //#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 };
23
506
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,SAAS,GACV,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG5E,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,aAAa,EACb,iCAAiC,EACjC,6BAA6B,EAC7B,sCAAsC,GACvC,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG5E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,SAAS,EACT,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtE,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG/E,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG1D,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAG3F,OAAO,EACL,mCAAmC,EACnC,6BAA6B,EAC7B,mCAAmC,EACnC,6BAA6B,EAC7B,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC"}
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,IAAA;AAAA;;;AAYF;KANY,WAAA,GAAc,MAAA,SAAe,OAAA;;;;;KAM7B,eAAA,GAAkB,MAAA;;;;AAhB9B;;;;;AAUA;;;;;AAMA;;;;iBCIgB,iBAAA,CAAkB,KAAA;;;;AAAlC;;;;;AAqBA;;;;iBAAgB,kBAAA,CAAmB,KAAA;AAoBnC;;;;;AAiBA;;;;;AA8BA;AA/CA,iBAAgB,YAAA,CAAA;;;;AAoEhB;;;;;;;;ACjIA;;iBD8EgB,SAAA,CAAU,KAAA;;;;;;AE5D1B;;;;;AAmBA;;;iBFuEgB,kBAAA,CAAmB,W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