cdk-insights 1.2.7 → 1.2.9
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/entry.js +150 -148
- package/dist/helpers/sensitiveDataDetection/types.d.ts +33 -0
- package/dist/index.js +112 -110
- package/dist/types/analysis.types.d.ts +8 -1
- package/package.json +1 -1
|
@@ -22,6 +22,39 @@ export interface SensitiveDataFinding {
|
|
|
22
22
|
detectionReasonMessage: string;
|
|
23
23
|
/** Recommended secure alternative */
|
|
24
24
|
recommendation: string;
|
|
25
|
+
/**
|
|
26
|
+
* Diagnostic metadata about the flagged value. Populated so users can
|
|
27
|
+
* triage findings without the scanner revealing the full value.
|
|
28
|
+
*/
|
|
29
|
+
diagnostics?: SensitiveDataDiagnostics;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Privacy-preserving diagnostic metadata attached to each finding.
|
|
33
|
+
*
|
|
34
|
+
* The scanner must never emit the full flagged value (it's potentially
|
|
35
|
+
* a real secret). But users triaging false positives need enough signal
|
|
36
|
+
* to recognise what was flagged — especially important for CDK-generated
|
|
37
|
+
* names and other structural false positives where the length + shape
|
|
38
|
+
* immediately identifies the value. The fields here walk that line.
|
|
39
|
+
*/
|
|
40
|
+
export interface SensitiveDataDiagnostics {
|
|
41
|
+
/** Length of the flagged value in characters */
|
|
42
|
+
valueLength: number;
|
|
43
|
+
/**
|
|
44
|
+
* Partial preview: first 4 and last 4 chars joined by an ellipsis
|
|
45
|
+
* (e.g. `Cogn…EEFF`) when the value is long enough for this to be
|
|
46
|
+
* safe. Returns null for values under 20 chars — too short to reveal
|
|
47
|
+
* any portion safely.
|
|
48
|
+
*/
|
|
49
|
+
valueShape: string | null;
|
|
50
|
+
/** Shannon entropy in bits/char (only set for high_entropy detections) */
|
|
51
|
+
entropy?: number;
|
|
52
|
+
/** The threshold the entropy exceeded */
|
|
53
|
+
entropyThreshold?: number;
|
|
54
|
+
/** Which sensitive-property-name pattern matched (property_name detections) */
|
|
55
|
+
matchedPropertyPattern?: string;
|
|
56
|
+
/** Which secret-value pattern matched (value_pattern detections) */
|
|
57
|
+
matchedValuePattern?: string;
|
|
25
58
|
}
|
|
26
59
|
/**
|
|
27
60
|
* Result of scanning a single resource for sensitive data
|