driftdetect-core 0.4.0 → 0.4.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.
Files changed (237) hide show
  1. package/dist/boundaries/boundary-scanner.d.ts +76 -0
  2. package/dist/boundaries/boundary-scanner.d.ts.map +1 -0
  3. package/dist/boundaries/boundary-scanner.js +801 -0
  4. package/dist/boundaries/boundary-scanner.js.map +1 -0
  5. package/dist/boundaries/data-access-learner.d.ts +126 -0
  6. package/dist/boundaries/data-access-learner.d.ts.map +1 -0
  7. package/dist/boundaries/data-access-learner.js +486 -0
  8. package/dist/boundaries/data-access-learner.js.map +1 -0
  9. package/dist/boundaries/index.d.ts +6 -0
  10. package/dist/boundaries/index.d.ts.map +1 -1
  11. package/dist/boundaries/index.js +6 -0
  12. package/dist/boundaries/index.js.map +1 -1
  13. package/dist/boundaries/security-prioritizer.d.ts +118 -0
  14. package/dist/boundaries/security-prioritizer.d.ts.map +1 -0
  15. package/dist/boundaries/security-prioritizer.js +316 -0
  16. package/dist/boundaries/security-prioritizer.js.map +1 -0
  17. package/dist/call-graph/analysis/coverage-analyzer.d.ts +201 -0
  18. package/dist/call-graph/analysis/coverage-analyzer.d.ts.map +1 -0
  19. package/dist/call-graph/analysis/coverage-analyzer.js +553 -0
  20. package/dist/call-graph/analysis/coverage-analyzer.js.map +1 -0
  21. package/dist/call-graph/analysis/dead-code-detector.d.ts +145 -0
  22. package/dist/call-graph/analysis/dead-code-detector.d.ts.map +1 -0
  23. package/dist/call-graph/analysis/dead-code-detector.js +391 -0
  24. package/dist/call-graph/analysis/dead-code-detector.js.map +1 -0
  25. package/dist/call-graph/analysis/graph-builder.d.ts +142 -0
  26. package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -0
  27. package/dist/call-graph/analysis/graph-builder.js +624 -0
  28. package/dist/call-graph/analysis/graph-builder.js.map +1 -0
  29. package/dist/call-graph/analysis/impact-analyzer.d.ts +150 -0
  30. package/dist/call-graph/analysis/impact-analyzer.d.ts.map +1 -0
  31. package/dist/call-graph/analysis/impact-analyzer.js +329 -0
  32. package/dist/call-graph/analysis/impact-analyzer.js.map +1 -0
  33. package/dist/call-graph/analysis/index.d.ts +11 -0
  34. package/dist/call-graph/analysis/index.d.ts.map +1 -0
  35. package/dist/call-graph/analysis/index.js +9 -0
  36. package/dist/call-graph/analysis/index.js.map +1 -0
  37. package/dist/call-graph/analysis/path-finder.d.ts +117 -0
  38. package/dist/call-graph/analysis/path-finder.d.ts.map +1 -0
  39. package/dist/call-graph/analysis/path-finder.js +360 -0
  40. package/dist/call-graph/analysis/path-finder.js.map +1 -0
  41. package/dist/call-graph/analysis/reachability.d.ts +56 -0
  42. package/dist/call-graph/analysis/reachability.d.ts.map +1 -0
  43. package/dist/call-graph/analysis/reachability.js +357 -0
  44. package/dist/call-graph/analysis/reachability.js.map +1 -0
  45. package/dist/call-graph/demo.d.ts +11 -0
  46. package/dist/call-graph/demo.d.ts.map +1 -0
  47. package/dist/call-graph/demo.js +339 -0
  48. package/dist/call-graph/demo.js.map +1 -0
  49. package/dist/call-graph/enrichment/enrichment-engine.d.ts +126 -0
  50. package/dist/call-graph/enrichment/enrichment-engine.d.ts.map +1 -0
  51. package/dist/call-graph/enrichment/enrichment-engine.js +760 -0
  52. package/dist/call-graph/enrichment/enrichment-engine.js.map +1 -0
  53. package/dist/call-graph/enrichment/impact-scorer.d.ts +59 -0
  54. package/dist/call-graph/enrichment/impact-scorer.d.ts.map +1 -0
  55. package/dist/call-graph/enrichment/impact-scorer.js +328 -0
  56. package/dist/call-graph/enrichment/impact-scorer.js.map +1 -0
  57. package/dist/call-graph/enrichment/index.d.ts +12 -0
  58. package/dist/call-graph/enrichment/index.d.ts.map +1 -0
  59. package/dist/call-graph/enrichment/index.js +15 -0
  60. package/dist/call-graph/enrichment/index.js.map +1 -0
  61. package/dist/call-graph/enrichment/remediation-generator.d.ts +41 -0
  62. package/dist/call-graph/enrichment/remediation-generator.d.ts.map +1 -0
  63. package/dist/call-graph/enrichment/remediation-generator.js +609 -0
  64. package/dist/call-graph/enrichment/remediation-generator.js.map +1 -0
  65. package/dist/call-graph/enrichment/sensitivity-classifier.d.ts +71 -0
  66. package/dist/call-graph/enrichment/sensitivity-classifier.d.ts.map +1 -0
  67. package/dist/call-graph/enrichment/sensitivity-classifier.js +454 -0
  68. package/dist/call-graph/enrichment/sensitivity-classifier.js.map +1 -0
  69. package/dist/call-graph/enrichment/types.d.ts +402 -0
  70. package/dist/call-graph/enrichment/types.d.ts.map +1 -0
  71. package/dist/call-graph/enrichment/types.js +9 -0
  72. package/dist/call-graph/enrichment/types.js.map +1 -0
  73. package/dist/call-graph/extractors/base-extractor.d.ts +112 -0
  74. package/dist/call-graph/extractors/base-extractor.d.ts.map +1 -0
  75. package/dist/call-graph/extractors/base-extractor.js +140 -0
  76. package/dist/call-graph/extractors/base-extractor.js.map +1 -0
  77. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts +76 -0
  78. package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -0
  79. package/dist/call-graph/extractors/csharp-data-access-extractor.js +387 -0
  80. package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -0
  81. package/dist/call-graph/extractors/csharp-extractor.d.ts +87 -0
  82. package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -0
  83. package/dist/call-graph/extractors/csharp-extractor.js +470 -0
  84. package/dist/call-graph/extractors/csharp-extractor.js.map +1 -0
  85. package/dist/call-graph/extractors/data-access-extractor.d.ts +76 -0
  86. package/dist/call-graph/extractors/data-access-extractor.d.ts.map +1 -0
  87. package/dist/call-graph/extractors/data-access-extractor.js +234 -0
  88. package/dist/call-graph/extractors/data-access-extractor.js.map +1 -0
  89. package/dist/call-graph/extractors/index.d.ts +26 -0
  90. package/dist/call-graph/extractors/index.d.ts.map +1 -0
  91. package/dist/call-graph/extractors/index.js +36 -0
  92. package/dist/call-graph/extractors/index.js.map +1 -0
  93. package/dist/call-graph/extractors/java-data-access-extractor.d.ts +101 -0
  94. package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -0
  95. package/dist/call-graph/extractors/java-data-access-extractor.js +611 -0
  96. package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -0
  97. package/dist/call-graph/extractors/java-extractor.d.ts +87 -0
  98. package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -0
  99. package/dist/call-graph/extractors/java-extractor.js +510 -0
  100. package/dist/call-graph/extractors/java-extractor.js.map +1 -0
  101. package/dist/call-graph/extractors/php-data-access-extractor.d.ts +93 -0
  102. package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -0
  103. package/dist/call-graph/extractors/php-data-access-extractor.js +589 -0
  104. package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -0
  105. package/dist/call-graph/extractors/php-extractor.d.ts +104 -0
  106. package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -0
  107. package/dist/call-graph/extractors/php-extractor.js +619 -0
  108. package/dist/call-graph/extractors/php-extractor.js.map +1 -0
  109. package/dist/call-graph/extractors/python-data-access-extractor.d.ts +90 -0
  110. package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -0
  111. package/dist/call-graph/extractors/python-data-access-extractor.js +537 -0
  112. package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -0
  113. package/dist/call-graph/extractors/python-extractor.d.ts +98 -0
  114. package/dist/call-graph/extractors/python-extractor.d.ts.map +1 -0
  115. package/dist/call-graph/extractors/python-extractor.js +681 -0
  116. package/dist/call-graph/extractors/python-extractor.js.map +1 -0
  117. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +91 -0
  118. package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -0
  119. package/dist/call-graph/extractors/semantic-data-access-scanner.js +498 -0
  120. package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -0
  121. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +122 -0
  122. package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -0
  123. package/dist/call-graph/extractors/typescript-data-access-extractor.js +788 -0
  124. package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -0
  125. package/dist/call-graph/extractors/typescript-extractor.d.ts +145 -0
  126. package/dist/call-graph/extractors/typescript-extractor.d.ts.map +1 -0
  127. package/dist/call-graph/extractors/typescript-extractor.js +904 -0
  128. package/dist/call-graph/extractors/typescript-extractor.js.map +1 -0
  129. package/dist/call-graph/index.d.ts +127 -0
  130. package/dist/call-graph/index.d.ts.map +1 -0
  131. package/dist/call-graph/index.js +247 -0
  132. package/dist/call-graph/index.js.map +1 -0
  133. package/dist/call-graph/store/call-graph-store.d.ts +70 -0
  134. package/dist/call-graph/store/call-graph-store.d.ts.map +1 -0
  135. package/dist/call-graph/store/call-graph-store.js +210 -0
  136. package/dist/call-graph/store/call-graph-store.js.map +1 -0
  137. package/dist/call-graph/store/index.d.ts +7 -0
  138. package/dist/call-graph/store/index.d.ts.map +1 -0
  139. package/dist/call-graph/store/index.js +7 -0
  140. package/dist/call-graph/store/index.js.map +1 -0
  141. package/dist/call-graph/types.d.ts +376 -0
  142. package/dist/call-graph/types.d.ts.map +1 -0
  143. package/dist/call-graph/types.js +8 -0
  144. package/dist/call-graph/types.js.map +1 -0
  145. package/dist/index.d.ts +8 -0
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +12 -0
  148. package/dist/index.js.map +1 -1
  149. package/dist/lake/callgraph-shard-store.d.ts +168 -0
  150. package/dist/lake/callgraph-shard-store.d.ts.map +1 -0
  151. package/dist/lake/callgraph-shard-store.js +466 -0
  152. package/dist/lake/callgraph-shard-store.js.map +1 -0
  153. package/dist/lake/examples-store.d.ts +127 -0
  154. package/dist/lake/examples-store.d.ts.map +1 -0
  155. package/dist/lake/examples-store.js +389 -0
  156. package/dist/lake/examples-store.js.map +1 -0
  157. package/dist/lake/index-store.d.ts +82 -0
  158. package/dist/lake/index-store.d.ts.map +1 -0
  159. package/dist/lake/index-store.js +359 -0
  160. package/dist/lake/index-store.js.map +1 -0
  161. package/dist/lake/index.d.ts +93 -0
  162. package/dist/lake/index.d.ts.map +1 -0
  163. package/dist/lake/index.js +138 -0
  164. package/dist/lake/index.js.map +1 -0
  165. package/dist/lake/lake.bak/index-store.d.ts +82 -0
  166. package/dist/lake/lake.bak/index-store.d.ts.map +1 -0
  167. package/dist/lake/lake.bak/index-store.js +357 -0
  168. package/dist/lake/lake.bak/index-store.js.map +1 -0
  169. package/dist/lake/lake.bak/index.d.ts +81 -0
  170. package/dist/lake/lake.bak/index.d.ts.map +1 -0
  171. package/dist/lake/lake.bak/index.js +114 -0
  172. package/dist/lake/lake.bak/index.js.map +1 -0
  173. package/dist/lake/lake.bak/manifest-store.d.ts +51 -0
  174. package/dist/lake/lake.bak/manifest-store.d.ts.map +1 -0
  175. package/dist/lake/lake.bak/manifest-store.js +347 -0
  176. package/dist/lake/lake.bak/manifest-store.js.map +1 -0
  177. package/dist/lake/lake.bak/query-engine.d.ts +112 -0
  178. package/dist/lake/lake.bak/query-engine.d.ts.map +1 -0
  179. package/dist/lake/lake.bak/query-engine.js +370 -0
  180. package/dist/lake/lake.bak/query-engine.js.map +1 -0
  181. package/dist/lake/lake.bak/types.d.ts +428 -0
  182. package/dist/lake/lake.bak/types.d.ts.map +1 -0
  183. package/dist/lake/lake.bak/types.js +46 -0
  184. package/dist/lake/lake.bak/types.js.map +1 -0
  185. package/dist/lake/lake.bak/view-materializer.d.ts +70 -0
  186. package/dist/lake/lake.bak/view-materializer.d.ts.map +1 -0
  187. package/dist/lake/lake.bak/view-materializer.js +314 -0
  188. package/dist/lake/lake.bak/view-materializer.js.map +1 -0
  189. package/dist/lake/lake.bak/view-store.d.ts +57 -0
  190. package/dist/lake/lake.bak/view-store.d.ts.map +1 -0
  191. package/dist/lake/lake.bak/view-store.js +348 -0
  192. package/dist/lake/lake.bak/view-store.js.map +1 -0
  193. package/dist/lake/manifest-store.d.ts +51 -0
  194. package/dist/lake/manifest-store.d.ts.map +1 -0
  195. package/dist/lake/manifest-store.js +348 -0
  196. package/dist/lake/manifest-store.js.map +1 -0
  197. package/dist/lake/pattern-shard-store.d.ts +87 -0
  198. package/dist/lake/pattern-shard-store.d.ts.map +1 -0
  199. package/dist/lake/pattern-shard-store.js +347 -0
  200. package/dist/lake/pattern-shard-store.js.map +1 -0
  201. package/dist/lake/query-engine.d.ts +124 -0
  202. package/dist/lake/query-engine.d.ts.map +1 -0
  203. package/dist/lake/query-engine.js +453 -0
  204. package/dist/lake/query-engine.js.map +1 -0
  205. package/dist/lake/security-shard-store.d.ts +156 -0
  206. package/dist/lake/security-shard-store.d.ts.map +1 -0
  207. package/dist/lake/security-shard-store.js +498 -0
  208. package/dist/lake/security-shard-store.js.map +1 -0
  209. package/dist/lake/types.d.ts +428 -0
  210. package/dist/lake/types.d.ts.map +1 -0
  211. package/dist/lake/types.js +46 -0
  212. package/dist/lake/types.js.map +1 -0
  213. package/dist/lake/view-materializer.d.ts +70 -0
  214. package/dist/lake/view-materializer.d.ts.map +1 -0
  215. package/dist/lake/view-materializer.js +314 -0
  216. package/dist/lake/view-materializer.js.map +1 -0
  217. package/dist/lake/view-store.d.ts +57 -0
  218. package/dist/lake/view-store.d.ts.map +1 -0
  219. package/dist/lake/view-store.js +348 -0
  220. package/dist/lake/view-store.js.map +1 -0
  221. package/dist/parsers/tree-sitter/index.d.ts +1 -0
  222. package/dist/parsers/tree-sitter/index.d.ts.map +1 -1
  223. package/dist/parsers/tree-sitter/index.js +4 -0
  224. package/dist/parsers/tree-sitter/index.js.map +1 -1
  225. package/dist/parsers/tree-sitter/typescript-loader.d.ts +58 -0
  226. package/dist/parsers/tree-sitter/typescript-loader.d.ts.map +1 -0
  227. package/dist/parsers/tree-sitter/typescript-loader.js +250 -0
  228. package/dist/parsers/tree-sitter/typescript-loader.js.map +1 -0
  229. package/dist/store/project-config.d.ts +154 -0
  230. package/dist/store/project-config.d.ts.map +1 -0
  231. package/dist/store/project-config.js +235 -0
  232. package/dist/store/project-config.js.map +1 -0
  233. package/dist/store/project-registry.d.ts +241 -0
  234. package/dist/store/project-registry.d.ts.map +1 -0
  235. package/dist/store/project-registry.js +557 -0
  236. package/dist/store/project-registry.js.map +1 -0
  237. package/package.json +7 -7
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Sensitivity Classifier
3
+ *
4
+ * Enterprise-grade classification of data sensitivity.
5
+ * Maps fields to sensitivity types and regulatory implications.
6
+ */
7
+ import type { SensitivityType } from '../../boundaries/types.js';
8
+ import type { DataSensitivityProfile, DataRegulation } from './types.js';
9
+ /**
10
+ * Pattern-based sensitivity detection
11
+ */
12
+ interface SensitivityPattern {
13
+ /** Regex patterns to match field names */
14
+ patterns: RegExp[];
15
+ /** Sensitivity type */
16
+ type: SensitivityType;
17
+ /** Applicable regulations */
18
+ regulations: DataRegulation[];
19
+ /** Base impact score */
20
+ baseScore: number;
21
+ /** Rationale for classification */
22
+ rationale: string;
23
+ }
24
+ /**
25
+ * Classifies data sensitivity based on field names and context
26
+ */
27
+ export declare class SensitivityClassifier {
28
+ private customPatterns;
29
+ private fieldOverrides;
30
+ /**
31
+ * Add custom sensitivity patterns
32
+ */
33
+ addPattern(pattern: SensitivityPattern): void;
34
+ /**
35
+ * Override classification for a specific field
36
+ */
37
+ overrideField(fieldKey: string, profile: DataSensitivityProfile): void;
38
+ /**
39
+ * Classify a field's sensitivity
40
+ */
41
+ classify(field: string, table?: string): DataSensitivityProfile;
42
+ /**
43
+ * Classify multiple fields and return aggregated regulations
44
+ */
45
+ classifyMultiple(fields: Array<{
46
+ field: string;
47
+ table?: string;
48
+ }>): {
49
+ profiles: DataSensitivityProfile[];
50
+ regulations: DataRegulation[];
51
+ maxScore: number;
52
+ };
53
+ /**
54
+ * Get all regulations that apply to a sensitivity type
55
+ */
56
+ getRegulationsForType(type: SensitivityType): DataRegulation[];
57
+ /**
58
+ * Check if a field matches any of the patterns
59
+ */
60
+ private matchesPattern;
61
+ }
62
+ /**
63
+ * Create a new sensitivity classifier
64
+ */
65
+ export declare function createSensitivityClassifier(): SensitivityClassifier;
66
+ /**
67
+ * Get the default sensitivity classifier
68
+ */
69
+ export declare function getDefaultClassifier(): SensitivityClassifier;
70
+ export {};
71
+ //# sourceMappingURL=sensitivity-classifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sensitivity-classifier.d.ts","sourceRoot":"","sources":["../../../src/call-graph/enrichment/sensitivity-classifier.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EACV,sBAAsB,EACtB,cAAc,EACf,MAAM,YAAY,CAAC;AAMpB;;GAEG;AACH,UAAU,kBAAkB;IAC1B,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,uBAAuB;IACvB,IAAI,EAAE,eAAe,CAAC;IACtB,6BAA6B;IAC7B,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;CACnB;AA8UD;;GAEG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,cAAc,CAAkD;IAExE;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAI7C;;OAEG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,IAAI;IAItE;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,sBAAsB;IAyC/D;;OAEG;IACH,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAClE,QAAQ,EAAE,sBAAsB,EAAE,CAAC;QACnC,WAAW,EAAE,cAAc,EAAE,CAAC;QAC9B,QAAQ,EAAE,MAAM,CAAC;KAClB;IAqBD;;OAEG;IACH,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,EAAE;IAc9D;;OAEG;IACH,OAAO,CAAC,cAAc;CAIvB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,qBAAqB,CAEnE;AAOD;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,qBAAqB,CAK5D"}
@@ -0,0 +1,454 @@
1
+ /**
2
+ * Sensitivity Classifier
3
+ *
4
+ * Enterprise-grade classification of data sensitivity.
5
+ * Maps fields to sensitivity types and regulatory implications.
6
+ */
7
+ /**
8
+ * Comprehensive sensitivity patterns based on industry standards
9
+ */
10
+ const SENSITIVITY_PATTERNS = [
11
+ // ============================================================================
12
+ // CREDENTIALS - Highest sensitivity (authentication/authorization)
13
+ // ============================================================================
14
+ {
15
+ patterns: [
16
+ /^password$/i,
17
+ /password[_-]?hash$/i,
18
+ /hashed[_-]?password$/i,
19
+ /pwd$/i,
20
+ /passwd$/i,
21
+ /pass[_-]?phrase$/i,
22
+ ],
23
+ type: 'credentials',
24
+ regulations: ['pci-dss', 'gdpr', 'ccpa', 'hipaa'],
25
+ baseScore: 100,
26
+ rationale: 'Password hashes enable account takeover if exposed',
27
+ },
28
+ {
29
+ patterns: [
30
+ /api[_-]?key$/i,
31
+ /api[_-]?secret$/i,
32
+ /secret[_-]?key$/i,
33
+ /access[_-]?key$/i,
34
+ /private[_-]?key$/i,
35
+ ],
36
+ type: 'credentials',
37
+ regulations: ['pci-dss', 'sox'],
38
+ baseScore: 95,
39
+ rationale: 'API keys provide system access and must be protected',
40
+ },
41
+ {
42
+ patterns: [
43
+ /^token$/i,
44
+ /auth[_-]?token$/i,
45
+ /access[_-]?token$/i,
46
+ /refresh[_-]?token$/i,
47
+ /session[_-]?token$/i,
48
+ /jwt$/i,
49
+ /bearer[_-]?token$/i,
50
+ ],
51
+ type: 'credentials',
52
+ regulations: ['pci-dss', 'gdpr'],
53
+ baseScore: 90,
54
+ rationale: 'Authentication tokens enable session hijacking',
55
+ },
56
+ {
57
+ patterns: [
58
+ /^secret$/i,
59
+ /client[_-]?secret$/i,
60
+ /encryption[_-]?key$/i,
61
+ /signing[_-]?key$/i,
62
+ /master[_-]?key$/i,
63
+ ],
64
+ type: 'credentials',
65
+ regulations: ['pci-dss', 'hipaa', 'sox'],
66
+ baseScore: 98,
67
+ rationale: 'Cryptographic secrets compromise entire system security',
68
+ },
69
+ {
70
+ patterns: [
71
+ /mfa[_-]?secret$/i,
72
+ /totp[_-]?secret$/i,
73
+ /two[_-]?factor[_-]?secret$/i,
74
+ /recovery[_-]?code/i,
75
+ /backup[_-]?code/i,
76
+ ],
77
+ type: 'credentials',
78
+ regulations: ['pci-dss', 'gdpr'],
79
+ baseScore: 92,
80
+ rationale: 'MFA secrets bypass two-factor authentication',
81
+ },
82
+ // ============================================================================
83
+ // FINANCIAL - Payment and financial data
84
+ // ============================================================================
85
+ {
86
+ patterns: [
87
+ /credit[_-]?card/i,
88
+ /card[_-]?number/i,
89
+ /cc[_-]?number/i,
90
+ /pan$/i,
91
+ /primary[_-]?account[_-]?number/i,
92
+ ],
93
+ type: 'financial',
94
+ regulations: ['pci-dss', 'gdpr', 'ccpa'],
95
+ baseScore: 100,
96
+ rationale: 'Credit card numbers are PCI-DSS regulated cardholder data',
97
+ },
98
+ {
99
+ patterns: [
100
+ /^cvv$/i,
101
+ /^cvc$/i,
102
+ /^cvv2$/i,
103
+ /security[_-]?code$/i,
104
+ /card[_-]?verification/i,
105
+ ],
106
+ type: 'financial',
107
+ regulations: ['pci-dss'],
108
+ baseScore: 100,
109
+ rationale: 'CVV codes must never be stored per PCI-DSS',
110
+ },
111
+ {
112
+ patterns: [
113
+ /bank[_-]?account/i,
114
+ /account[_-]?number/i,
115
+ /routing[_-]?number/i,
116
+ /iban$/i,
117
+ /swift[_-]?code/i,
118
+ /bic$/i,
119
+ ],
120
+ type: 'financial',
121
+ regulations: ['pci-dss', 'glba', 'gdpr'],
122
+ baseScore: 90,
123
+ rationale: 'Bank account details enable financial fraud',
124
+ },
125
+ {
126
+ patterns: [
127
+ /^salary$/i,
128
+ /^income$/i,
129
+ /^wage$/i,
130
+ /wage[_-]?rate/i,
131
+ /wage[_-]?override/i,
132
+ /wage[_-]?cents/i,
133
+ /hourly[_-]?rate/i,
134
+ /rate[_-]?cents/i,
135
+ /compensation/i,
136
+ /net[_-]?worth/i,
137
+ /tax[_-]?return/i,
138
+ /pay[_-]?rate/i,
139
+ /payroll/i,
140
+ ],
141
+ type: 'financial',
142
+ regulations: ['gdpr', 'ccpa', 'glba'],
143
+ baseScore: 75,
144
+ rationale: 'Wage and compensation data is sensitive financial information',
145
+ },
146
+ // ============================================================================
147
+ // PII - Personally Identifiable Information
148
+ // ============================================================================
149
+ {
150
+ patterns: [
151
+ /^ssn$/i,
152
+ /social[_-]?security/i,
153
+ /national[_-]?id/i,
154
+ /national[_-]?insurance/i,
155
+ /tax[_-]?id/i,
156
+ /tin$/i,
157
+ /ein$/i,
158
+ ],
159
+ type: 'pii',
160
+ regulations: ['gdpr', 'ccpa', 'hipaa', 'glba'],
161
+ baseScore: 100,
162
+ rationale: 'Government IDs enable identity theft',
163
+ },
164
+ {
165
+ patterns: [
166
+ /passport[_-]?number/i,
167
+ /driver[_-]?license/i,
168
+ /license[_-]?number/i,
169
+ /id[_-]?number/i,
170
+ ],
171
+ type: 'pii',
172
+ regulations: ['gdpr', 'ccpa'],
173
+ baseScore: 90,
174
+ rationale: 'Government-issued ID numbers are high-value PII',
175
+ },
176
+ {
177
+ patterns: [
178
+ /date[_-]?of[_-]?birth/i,
179
+ /^dob$/i,
180
+ /birth[_-]?date/i,
181
+ /birthday/i,
182
+ ],
183
+ type: 'pii',
184
+ regulations: ['gdpr', 'ccpa', 'coppa', 'hipaa'],
185
+ baseScore: 70,
186
+ rationale: 'Date of birth is a key identity verification element',
187
+ },
188
+ {
189
+ patterns: [
190
+ /^email$/i,
191
+ /email[_-]?address/i,
192
+ /e[_-]?mail/i,
193
+ ],
194
+ type: 'pii',
195
+ regulations: ['gdpr', 'ccpa', 'coppa'],
196
+ baseScore: 50,
197
+ rationale: 'Email addresses are personal identifiers',
198
+ },
199
+ {
200
+ patterns: [
201
+ /phone[_-]?number/i,
202
+ /mobile[_-]?number/i,
203
+ /cell[_-]?phone/i,
204
+ /telephone/i,
205
+ ],
206
+ type: 'pii',
207
+ regulations: ['gdpr', 'ccpa', 'coppa'],
208
+ baseScore: 55,
209
+ rationale: 'Phone numbers are personal contact information',
210
+ },
211
+ {
212
+ patterns: [
213
+ /^address$/i,
214
+ /street[_-]?address/i,
215
+ /home[_-]?address/i,
216
+ /mailing[_-]?address/i,
217
+ /postal[_-]?address/i,
218
+ ],
219
+ type: 'pii',
220
+ regulations: ['gdpr', 'ccpa'],
221
+ baseScore: 60,
222
+ rationale: 'Physical addresses reveal location and enable stalking',
223
+ },
224
+ {
225
+ patterns: [
226
+ /^ip[_-]?address$/i,
227
+ /client[_-]?ip/i,
228
+ /user[_-]?ip/i,
229
+ ],
230
+ type: 'pii',
231
+ regulations: ['gdpr'],
232
+ baseScore: 40,
233
+ rationale: 'IP addresses are personal data under GDPR',
234
+ },
235
+ {
236
+ patterns: [
237
+ /biometric/i,
238
+ /fingerprint/i,
239
+ /face[_-]?id/i,
240
+ /retina/i,
241
+ /voice[_-]?print/i,
242
+ ],
243
+ type: 'pii',
244
+ regulations: ['gdpr', 'ccpa', 'hipaa'],
245
+ baseScore: 95,
246
+ rationale: 'Biometric data is immutable and highly sensitive',
247
+ },
248
+ {
249
+ patterns: [
250
+ /^race$/i,
251
+ /ethnicity/i,
252
+ /religion/i,
253
+ /political[_-]?affiliation/i,
254
+ /sexual[_-]?orientation/i,
255
+ /gender[_-]?identity/i,
256
+ ],
257
+ type: 'pii',
258
+ regulations: ['gdpr', 'ccpa'],
259
+ baseScore: 85,
260
+ rationale: 'Special category data under GDPR Article 9',
261
+ },
262
+ // ============================================================================
263
+ // HEALTH - Protected Health Information
264
+ // ============================================================================
265
+ {
266
+ patterns: [
267
+ /diagnosis/i,
268
+ /medical[_-]?condition/i,
269
+ /health[_-]?condition/i,
270
+ /disease/i,
271
+ /illness/i,
272
+ ],
273
+ type: 'health',
274
+ regulations: ['hipaa', 'gdpr'],
275
+ baseScore: 95,
276
+ rationale: 'Medical diagnoses are protected health information',
277
+ },
278
+ {
279
+ patterns: [
280
+ /prescription/i,
281
+ /medication/i,
282
+ /drug[_-]?name/i,
283
+ /dosage/i,
284
+ ],
285
+ type: 'health',
286
+ regulations: ['hipaa', 'gdpr'],
287
+ baseScore: 90,
288
+ rationale: 'Prescription data reveals health conditions',
289
+ },
290
+ {
291
+ patterns: [
292
+ /medical[_-]?record/i,
293
+ /health[_-]?record/i,
294
+ /patient[_-]?record/i,
295
+ /ehr$/i,
296
+ /emr$/i,
297
+ ],
298
+ type: 'health',
299
+ regulations: ['hipaa', 'gdpr'],
300
+ baseScore: 100,
301
+ rationale: 'Medical records are core PHI under HIPAA',
302
+ },
303
+ {
304
+ patterns: [
305
+ /insurance[_-]?id/i,
306
+ /insurance[_-]?member[_-]?id/i,
307
+ /policy[_-]?number/i,
308
+ /group[_-]?number/i,
309
+ /health[_-]?plan[_-]?id/i,
310
+ /beneficiary[_-]?id/i,
311
+ ],
312
+ type: 'health',
313
+ regulations: ['hipaa', 'gdpr'],
314
+ baseScore: 75,
315
+ rationale: 'Insurance identifiers are PHI under HIPAA',
316
+ },
317
+ {
318
+ patterns: [
319
+ /lab[_-]?result/i,
320
+ /test[_-]?result/i,
321
+ /blood[_-]?type/i,
322
+ /genetic/i,
323
+ /dna/i,
324
+ ],
325
+ type: 'health',
326
+ regulations: ['hipaa', 'gdpr'],
327
+ baseScore: 95,
328
+ rationale: 'Lab results and genetic data are highly sensitive PHI',
329
+ },
330
+ ];
331
+ // ============================================================================
332
+ // Sensitivity Classifier
333
+ // ============================================================================
334
+ /**
335
+ * Classifies data sensitivity based on field names and context
336
+ */
337
+ export class SensitivityClassifier {
338
+ customPatterns = [];
339
+ fieldOverrides = new Map();
340
+ /**
341
+ * Add custom sensitivity patterns
342
+ */
343
+ addPattern(pattern) {
344
+ this.customPatterns.push(pattern);
345
+ }
346
+ /**
347
+ * Override classification for a specific field
348
+ */
349
+ overrideField(fieldKey, profile) {
350
+ this.fieldOverrides.set(fieldKey.toLowerCase(), profile);
351
+ }
352
+ /**
353
+ * Classify a field's sensitivity
354
+ */
355
+ classify(field, table) {
356
+ // Check for explicit override first
357
+ const fieldKey = table ? `${table}.${field}`.toLowerCase() : field.toLowerCase();
358
+ const override = this.fieldOverrides.get(fieldKey);
359
+ if (override) {
360
+ return override;
361
+ }
362
+ // Check custom patterns first (higher priority)
363
+ for (const pattern of this.customPatterns) {
364
+ if (this.matchesPattern(field, pattern.patterns)) {
365
+ return {
366
+ type: pattern.type,
367
+ regulations: pattern.regulations,
368
+ baseScore: pattern.baseScore,
369
+ rationale: pattern.rationale,
370
+ };
371
+ }
372
+ }
373
+ // Check built-in patterns
374
+ for (const pattern of SENSITIVITY_PATTERNS) {
375
+ if (this.matchesPattern(field, pattern.patterns)) {
376
+ return {
377
+ type: pattern.type,
378
+ regulations: pattern.regulations,
379
+ baseScore: pattern.baseScore,
380
+ rationale: pattern.rationale,
381
+ };
382
+ }
383
+ }
384
+ // Default: unknown sensitivity
385
+ return {
386
+ type: 'unknown',
387
+ regulations: [],
388
+ baseScore: 10,
389
+ rationale: 'No sensitive data patterns detected',
390
+ };
391
+ }
392
+ /**
393
+ * Classify multiple fields and return aggregated regulations
394
+ */
395
+ classifyMultiple(fields) {
396
+ const profiles = [];
397
+ const regulationsSet = new Set();
398
+ let maxScore = 0;
399
+ for (const { field, table } of fields) {
400
+ const profile = this.classify(field, table);
401
+ profiles.push(profile);
402
+ maxScore = Math.max(maxScore, profile.baseScore);
403
+ for (const reg of profile.regulations) {
404
+ regulationsSet.add(reg);
405
+ }
406
+ }
407
+ return {
408
+ profiles,
409
+ regulations: Array.from(regulationsSet),
410
+ maxScore,
411
+ };
412
+ }
413
+ /**
414
+ * Get all regulations that apply to a sensitivity type
415
+ */
416
+ getRegulationsForType(type) {
417
+ const regulations = new Set();
418
+ for (const pattern of [...SENSITIVITY_PATTERNS, ...this.customPatterns]) {
419
+ if (pattern.type === type) {
420
+ for (const reg of pattern.regulations) {
421
+ regulations.add(reg);
422
+ }
423
+ }
424
+ }
425
+ return Array.from(regulations);
426
+ }
427
+ /**
428
+ * Check if a field matches any of the patterns
429
+ */
430
+ matchesPattern(field, patterns) {
431
+ const normalizedField = field.toLowerCase();
432
+ return patterns.some((pattern) => pattern.test(normalizedField));
433
+ }
434
+ }
435
+ /**
436
+ * Create a new sensitivity classifier
437
+ */
438
+ export function createSensitivityClassifier() {
439
+ return new SensitivityClassifier();
440
+ }
441
+ /**
442
+ * Default singleton instance
443
+ */
444
+ let defaultClassifier = null;
445
+ /**
446
+ * Get the default sensitivity classifier
447
+ */
448
+ export function getDefaultClassifier() {
449
+ if (!defaultClassifier) {
450
+ defaultClassifier = createSensitivityClassifier();
451
+ }
452
+ return defaultClassifier;
453
+ }
454
+ //# sourceMappingURL=sensitivity-classifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sensitivity-classifier.js","sourceRoot":"","sources":["../../../src/call-graph/enrichment/sensitivity-classifier.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH;;GAEG;AACH,MAAM,oBAAoB,GAAyB;IACjD,+EAA+E;IAC/E,mEAAmE;IACnE,+EAA+E;IAC/E;QACE,QAAQ,EAAE;YACR,aAAa;YACb,qBAAqB;YACrB,uBAAuB;YACvB,OAAO;YACP,UAAU;YACV,mBAAmB;SACpB;QACD,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;QACjD,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,oDAAoD;KAChE;IACD;QACE,QA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