driftdetect-core 0.4.1 → 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.
- package/dist/boundaries/boundary-scanner.d.ts +76 -0
- package/dist/boundaries/boundary-scanner.d.ts.map +1 -0
- package/dist/boundaries/boundary-scanner.js +801 -0
- package/dist/boundaries/boundary-scanner.js.map +1 -0
- package/dist/boundaries/data-access-learner.d.ts +126 -0
- package/dist/boundaries/data-access-learner.d.ts.map +1 -0
- package/dist/boundaries/data-access-learner.js +486 -0
- package/dist/boundaries/data-access-learner.js.map +1 -0
- package/dist/boundaries/index.d.ts +6 -0
- package/dist/boundaries/index.d.ts.map +1 -1
- package/dist/boundaries/index.js +6 -0
- package/dist/boundaries/index.js.map +1 -1
- package/dist/boundaries/security-prioritizer.d.ts +118 -0
- package/dist/boundaries/security-prioritizer.d.ts.map +1 -0
- package/dist/boundaries/security-prioritizer.js +316 -0
- package/dist/boundaries/security-prioritizer.js.map +1 -0
- package/dist/call-graph/analysis/coverage-analyzer.d.ts +201 -0
- package/dist/call-graph/analysis/coverage-analyzer.d.ts.map +1 -0
- package/dist/call-graph/analysis/coverage-analyzer.js +553 -0
- package/dist/call-graph/analysis/coverage-analyzer.js.map +1 -0
- package/dist/call-graph/analysis/dead-code-detector.d.ts +145 -0
- package/dist/call-graph/analysis/dead-code-detector.d.ts.map +1 -0
- package/dist/call-graph/analysis/dead-code-detector.js +391 -0
- package/dist/call-graph/analysis/dead-code-detector.js.map +1 -0
- package/dist/call-graph/analysis/graph-builder.d.ts +142 -0
- package/dist/call-graph/analysis/graph-builder.d.ts.map +1 -0
- package/dist/call-graph/analysis/graph-builder.js +624 -0
- package/dist/call-graph/analysis/graph-builder.js.map +1 -0
- package/dist/call-graph/analysis/impact-analyzer.d.ts +150 -0
- package/dist/call-graph/analysis/impact-analyzer.d.ts.map +1 -0
- package/dist/call-graph/analysis/impact-analyzer.js +329 -0
- package/dist/call-graph/analysis/impact-analyzer.js.map +1 -0
- package/dist/call-graph/analysis/index.d.ts +11 -0
- package/dist/call-graph/analysis/index.d.ts.map +1 -0
- package/dist/call-graph/analysis/index.js +9 -0
- package/dist/call-graph/analysis/index.js.map +1 -0
- package/dist/call-graph/analysis/path-finder.d.ts +117 -0
- package/dist/call-graph/analysis/path-finder.d.ts.map +1 -0
- package/dist/call-graph/analysis/path-finder.js +360 -0
- package/dist/call-graph/analysis/path-finder.js.map +1 -0
- package/dist/call-graph/analysis/reachability.d.ts +56 -0
- package/dist/call-graph/analysis/reachability.d.ts.map +1 -0
- package/dist/call-graph/analysis/reachability.js +357 -0
- package/dist/call-graph/analysis/reachability.js.map +1 -0
- package/dist/call-graph/demo.d.ts +11 -0
- package/dist/call-graph/demo.d.ts.map +1 -0
- package/dist/call-graph/demo.js +339 -0
- package/dist/call-graph/demo.js.map +1 -0
- package/dist/call-graph/enrichment/enrichment-engine.d.ts +126 -0
- package/dist/call-graph/enrichment/enrichment-engine.d.ts.map +1 -0
- package/dist/call-graph/enrichment/enrichment-engine.js +760 -0
- package/dist/call-graph/enrichment/enrichment-engine.js.map +1 -0
- package/dist/call-graph/enrichment/impact-scorer.d.ts +59 -0
- package/dist/call-graph/enrichment/impact-scorer.d.ts.map +1 -0
- package/dist/call-graph/enrichment/impact-scorer.js +328 -0
- package/dist/call-graph/enrichment/impact-scorer.js.map +1 -0
- package/dist/call-graph/enrichment/index.d.ts +12 -0
- package/dist/call-graph/enrichment/index.d.ts.map +1 -0
- package/dist/call-graph/enrichment/index.js +15 -0
- package/dist/call-graph/enrichment/index.js.map +1 -0
- package/dist/call-graph/enrichment/remediation-generator.d.ts +41 -0
- package/dist/call-graph/enrichment/remediation-generator.d.ts.map +1 -0
- package/dist/call-graph/enrichment/remediation-generator.js +609 -0
- package/dist/call-graph/enrichment/remediation-generator.js.map +1 -0
- package/dist/call-graph/enrichment/sensitivity-classifier.d.ts +71 -0
- package/dist/call-graph/enrichment/sensitivity-classifier.d.ts.map +1 -0
- package/dist/call-graph/enrichment/sensitivity-classifier.js +454 -0
- package/dist/call-graph/enrichment/sensitivity-classifier.js.map +1 -0
- package/dist/call-graph/enrichment/types.d.ts +402 -0
- package/dist/call-graph/enrichment/types.d.ts.map +1 -0
- package/dist/call-graph/enrichment/types.js +9 -0
- package/dist/call-graph/enrichment/types.js.map +1 -0
- package/dist/call-graph/extractors/base-extractor.d.ts +112 -0
- package/dist/call-graph/extractors/base-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/base-extractor.js +140 -0
- package/dist/call-graph/extractors/base-extractor.js.map +1 -0
- package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts +76 -0
- package/dist/call-graph/extractors/csharp-data-access-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/csharp-data-access-extractor.js +387 -0
- package/dist/call-graph/extractors/csharp-data-access-extractor.js.map +1 -0
- package/dist/call-graph/extractors/csharp-extractor.d.ts +87 -0
- package/dist/call-graph/extractors/csharp-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/csharp-extractor.js +470 -0
- package/dist/call-graph/extractors/csharp-extractor.js.map +1 -0
- package/dist/call-graph/extractors/data-access-extractor.d.ts +76 -0
- package/dist/call-graph/extractors/data-access-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/data-access-extractor.js +234 -0
- package/dist/call-graph/extractors/data-access-extractor.js.map +1 -0
- package/dist/call-graph/extractors/index.d.ts +26 -0
- package/dist/call-graph/extractors/index.d.ts.map +1 -0
- package/dist/call-graph/extractors/index.js +36 -0
- package/dist/call-graph/extractors/index.js.map +1 -0
- package/dist/call-graph/extractors/java-data-access-extractor.d.ts +101 -0
- package/dist/call-graph/extractors/java-data-access-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/java-data-access-extractor.js +611 -0
- package/dist/call-graph/extractors/java-data-access-extractor.js.map +1 -0
- package/dist/call-graph/extractors/java-extractor.d.ts +87 -0
- package/dist/call-graph/extractors/java-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/java-extractor.js +510 -0
- package/dist/call-graph/extractors/java-extractor.js.map +1 -0
- package/dist/call-graph/extractors/php-data-access-extractor.d.ts +93 -0
- package/dist/call-graph/extractors/php-data-access-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/php-data-access-extractor.js +589 -0
- package/dist/call-graph/extractors/php-data-access-extractor.js.map +1 -0
- package/dist/call-graph/extractors/php-extractor.d.ts +104 -0
- package/dist/call-graph/extractors/php-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/php-extractor.js +619 -0
- package/dist/call-graph/extractors/php-extractor.js.map +1 -0
- package/dist/call-graph/extractors/python-data-access-extractor.d.ts +90 -0
- package/dist/call-graph/extractors/python-data-access-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/python-data-access-extractor.js +537 -0
- package/dist/call-graph/extractors/python-data-access-extractor.js.map +1 -0
- package/dist/call-graph/extractors/python-extractor.d.ts +98 -0
- package/dist/call-graph/extractors/python-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/python-extractor.js +681 -0
- package/dist/call-graph/extractors/python-extractor.js.map +1 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts +91 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.d.ts.map +1 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.js +498 -0
- package/dist/call-graph/extractors/semantic-data-access-scanner.js.map +1 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts +122 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.js +788 -0
- package/dist/call-graph/extractors/typescript-data-access-extractor.js.map +1 -0
- package/dist/call-graph/extractors/typescript-extractor.d.ts +145 -0
- package/dist/call-graph/extractors/typescript-extractor.d.ts.map +1 -0
- package/dist/call-graph/extractors/typescript-extractor.js +904 -0
- package/dist/call-graph/extractors/typescript-extractor.js.map +1 -0
- package/dist/call-graph/index.d.ts +127 -0
- package/dist/call-graph/index.d.ts.map +1 -0
- package/dist/call-graph/index.js +247 -0
- package/dist/call-graph/index.js.map +1 -0
- package/dist/call-graph/store/call-graph-store.d.ts +70 -0
- package/dist/call-graph/store/call-graph-store.d.ts.map +1 -0
- package/dist/call-graph/store/call-graph-store.js +210 -0
- package/dist/call-graph/store/call-graph-store.js.map +1 -0
- package/dist/call-graph/store/index.d.ts +7 -0
- package/dist/call-graph/store/index.d.ts.map +1 -0
- package/dist/call-graph/store/index.js +7 -0
- package/dist/call-graph/store/index.js.map +1 -0
- package/dist/call-graph/types.d.ts +376 -0
- package/dist/call-graph/types.d.ts.map +1 -0
- package/dist/call-graph/types.js +8 -0
- package/dist/call-graph/types.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/lake/callgraph-shard-store.d.ts +168 -0
- package/dist/lake/callgraph-shard-store.d.ts.map +1 -0
- package/dist/lake/callgraph-shard-store.js +466 -0
- package/dist/lake/callgraph-shard-store.js.map +1 -0
- package/dist/lake/examples-store.d.ts +127 -0
- package/dist/lake/examples-store.d.ts.map +1 -0
- package/dist/lake/examples-store.js +389 -0
- package/dist/lake/examples-store.js.map +1 -0
- package/dist/lake/index-store.d.ts +82 -0
- package/dist/lake/index-store.d.ts.map +1 -0
- package/dist/lake/index-store.js +359 -0
- package/dist/lake/index-store.js.map +1 -0
- package/dist/lake/index.d.ts +93 -0
- package/dist/lake/index.d.ts.map +1 -0
- package/dist/lake/index.js +138 -0
- package/dist/lake/index.js.map +1 -0
- package/dist/lake/lake.bak/index-store.d.ts +82 -0
- package/dist/lake/lake.bak/index-store.d.ts.map +1 -0
- package/dist/lake/lake.bak/index-store.js +357 -0
- package/dist/lake/lake.bak/index-store.js.map +1 -0
- package/dist/lake/lake.bak/index.d.ts +81 -0
- package/dist/lake/lake.bak/index.d.ts.map +1 -0
- package/dist/lake/lake.bak/index.js +114 -0
- package/dist/lake/lake.bak/index.js.map +1 -0
- package/dist/lake/lake.bak/manifest-store.d.ts +51 -0
- package/dist/lake/lake.bak/manifest-store.d.ts.map +1 -0
- package/dist/lake/lake.bak/manifest-store.js +347 -0
- package/dist/lake/lake.bak/manifest-store.js.map +1 -0
- package/dist/lake/lake.bak/query-engine.d.ts +112 -0
- package/dist/lake/lake.bak/query-engine.d.ts.map +1 -0
- package/dist/lake/lake.bak/query-engine.js +370 -0
- package/dist/lake/lake.bak/query-engine.js.map +1 -0
- package/dist/lake/lake.bak/types.d.ts +428 -0
- package/dist/lake/lake.bak/types.d.ts.map +1 -0
- package/dist/lake/lake.bak/types.js +46 -0
- package/dist/lake/lake.bak/types.js.map +1 -0
- package/dist/lake/lake.bak/view-materializer.d.ts +70 -0
- package/dist/lake/lake.bak/view-materializer.d.ts.map +1 -0
- package/dist/lake/lake.bak/view-materializer.js +314 -0
- package/dist/lake/lake.bak/view-materializer.js.map +1 -0
- package/dist/lake/lake.bak/view-store.d.ts +57 -0
- package/dist/lake/lake.bak/view-store.d.ts.map +1 -0
- package/dist/lake/lake.bak/view-store.js +348 -0
- package/dist/lake/lake.bak/view-store.js.map +1 -0
- package/dist/lake/manifest-store.d.ts +51 -0
- package/dist/lake/manifest-store.d.ts.map +1 -0
- package/dist/lake/manifest-store.js +348 -0
- package/dist/lake/manifest-store.js.map +1 -0
- package/dist/lake/pattern-shard-store.d.ts +87 -0
- package/dist/lake/pattern-shard-store.d.ts.map +1 -0
- package/dist/lake/pattern-shard-store.js +347 -0
- package/dist/lake/pattern-shard-store.js.map +1 -0
- package/dist/lake/query-engine.d.ts +124 -0
- package/dist/lake/query-engine.d.ts.map +1 -0
- package/dist/lake/query-engine.js +453 -0
- package/dist/lake/query-engine.js.map +1 -0
- package/dist/lake/security-shard-store.d.ts +156 -0
- package/dist/lake/security-shard-store.d.ts.map +1 -0
- package/dist/lake/security-shard-store.js +498 -0
- package/dist/lake/security-shard-store.js.map +1 -0
- package/dist/lake/types.d.ts +428 -0
- package/dist/lake/types.d.ts.map +1 -0
- package/dist/lake/types.js +46 -0
- package/dist/lake/types.js.map +1 -0
- package/dist/lake/view-materializer.d.ts +70 -0
- package/dist/lake/view-materializer.d.ts.map +1 -0
- package/dist/lake/view-materializer.js +314 -0
- package/dist/lake/view-materializer.js.map +1 -0
- package/dist/lake/view-store.d.ts +57 -0
- package/dist/lake/view-store.d.ts.map +1 -0
- package/dist/lake/view-store.js +348 -0
- package/dist/lake/view-store.js.map +1 -0
- package/dist/parsers/tree-sitter/index.d.ts +1 -0
- package/dist/parsers/tree-sitter/index.d.ts.map +1 -1
- package/dist/parsers/tree-sitter/index.js +4 -0
- package/dist/parsers/tree-sitter/index.js.map +1 -1
- package/dist/parsers/tree-sitter/typescript-loader.d.ts +58 -0
- package/dist/parsers/tree-sitter/typescript-loader.d.ts.map +1 -0
- package/dist/parsers/tree-sitter/typescript-loader.js +250 -0
- package/dist/parsers/tree-sitter/typescript-loader.js.map +1 -0
- package/dist/store/project-config.d.ts +154 -0
- package/dist/store/project-config.d.ts.map +1 -0
- package/dist/store/project-config.js +235 -0
- package/dist/store/project-config.js.map +1 -0
- package/dist/store/project-registry.d.ts +241 -0
- package/dist/store/project-registry.d.ts.map +1 -0
- package/dist/store/project-registry.js +557 -0
- package/dist/store/project-registry.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sensitive Data Coverage Analyzer
|
|
3
|
+
*
|
|
4
|
+
* Answers: "Which access paths to sensitive data are covered by tests?"
|
|
5
|
+
*
|
|
6
|
+
* Cross-references the call graph with test files to determine:
|
|
7
|
+
* - Which functions that access sensitive data are tested
|
|
8
|
+
* - Which access paths from entry points to sensitive data are covered
|
|
9
|
+
* - Coverage gaps for sensitive fields
|
|
10
|
+
*/
|
|
11
|
+
import type { CallGraph, CallPathNode } from '../types.js';
|
|
12
|
+
import type { SensitivityType } from '../../boundaries/types.js';
|
|
13
|
+
/**
|
|
14
|
+
* Coverage status for a sensitive field
|
|
15
|
+
*/
|
|
16
|
+
export type CoverageStatus = 'covered' | 'partial' | 'uncovered';
|
|
17
|
+
/**
|
|
18
|
+
* An access path to sensitive data
|
|
19
|
+
*/
|
|
20
|
+
export interface SensitiveAccessPath {
|
|
21
|
+
/** Unique path ID */
|
|
22
|
+
id: string;
|
|
23
|
+
/** The sensitive field being accessed */
|
|
24
|
+
field: string;
|
|
25
|
+
/** Table containing the field */
|
|
26
|
+
table: string;
|
|
27
|
+
/** Sensitivity classification */
|
|
28
|
+
sensitivity: SensitivityType;
|
|
29
|
+
/** Entry point that can reach this data */
|
|
30
|
+
entryPoint: {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
file: string;
|
|
34
|
+
line: number;
|
|
35
|
+
};
|
|
36
|
+
/** Function that directly accesses the data */
|
|
37
|
+
accessor: {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
file: string;
|
|
41
|
+
line: number;
|
|
42
|
+
};
|
|
43
|
+
/** Call path from entry point to accessor */
|
|
44
|
+
path: CallPathNode[];
|
|
45
|
+
/** Depth of the path */
|
|
46
|
+
depth: number;
|
|
47
|
+
/** Is this path covered by tests? */
|
|
48
|
+
isTested: boolean;
|
|
49
|
+
/** Test files that cover this path */
|
|
50
|
+
testFiles: string[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Coverage information for a sensitive field
|
|
54
|
+
*/
|
|
55
|
+
export interface FieldCoverage {
|
|
56
|
+
/** Field name (e.g., "password_hash") */
|
|
57
|
+
field: string;
|
|
58
|
+
/** Table name (e.g., "users") */
|
|
59
|
+
table: string;
|
|
60
|
+
/** Full field identifier (e.g., "users.password_hash") */
|
|
61
|
+
fullName: string;
|
|
62
|
+
/** Sensitivity classification */
|
|
63
|
+
sensitivity: SensitivityType;
|
|
64
|
+
/** Total access paths to this field */
|
|
65
|
+
totalPaths: number;
|
|
66
|
+
/** Number of tested paths */
|
|
67
|
+
testedPaths: number;
|
|
68
|
+
/** Coverage percentage */
|
|
69
|
+
coveragePercent: number;
|
|
70
|
+
/** Coverage status */
|
|
71
|
+
status: CoverageStatus;
|
|
72
|
+
/** All access paths */
|
|
73
|
+
paths: SensitiveAccessPath[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Complete coverage analysis result
|
|
77
|
+
*/
|
|
78
|
+
export interface CoverageAnalysisResult {
|
|
79
|
+
/** Summary statistics */
|
|
80
|
+
summary: {
|
|
81
|
+
totalSensitiveFields: number;
|
|
82
|
+
totalAccessPaths: number;
|
|
83
|
+
testedAccessPaths: number;
|
|
84
|
+
coveragePercent: number;
|
|
85
|
+
bySensitivity: Record<SensitivityType, {
|
|
86
|
+
fields: number;
|
|
87
|
+
paths: number;
|
|
88
|
+
testedPaths: number;
|
|
89
|
+
coveragePercent: number;
|
|
90
|
+
}>;
|
|
91
|
+
};
|
|
92
|
+
/** Coverage by field */
|
|
93
|
+
fields: FieldCoverage[];
|
|
94
|
+
/** Uncovered paths (highest priority) */
|
|
95
|
+
uncoveredPaths: SensitiveAccessPath[];
|
|
96
|
+
/** Test files analyzed */
|
|
97
|
+
testFiles: string[];
|
|
98
|
+
/** Functions in test files */
|
|
99
|
+
testFunctions: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Custom sensitivity pattern configuration
|
|
103
|
+
*/
|
|
104
|
+
export interface SensitivityPatternConfig {
|
|
105
|
+
/** Pattern name for display */
|
|
106
|
+
name: string;
|
|
107
|
+
/** Regex patterns to match table/field names */
|
|
108
|
+
patterns: string[];
|
|
109
|
+
/** Sensitivity type to assign */
|
|
110
|
+
sensitivity: SensitivityType;
|
|
111
|
+
/** Priority (lower = higher priority, checked first) */
|
|
112
|
+
priority?: number;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Options for coverage analysis
|
|
116
|
+
*/
|
|
117
|
+
export interface CoverageAnalysisOptions {
|
|
118
|
+
/** Test file patterns (default: common test patterns) */
|
|
119
|
+
testPatterns?: RegExp[];
|
|
120
|
+
/** Custom sensitivity patterns (merged with defaults) */
|
|
121
|
+
sensitivityPatterns?: SensitivityPatternConfig[];
|
|
122
|
+
/** Replace default sensitivity patterns entirely */
|
|
123
|
+
replaceSensitivityPatterns?: boolean;
|
|
124
|
+
/** Minimum sensitivity to include (default: all) */
|
|
125
|
+
minSensitivity?: SensitivityType;
|
|
126
|
+
/** Maximum path depth (default: 10) */
|
|
127
|
+
maxDepth?: number;
|
|
128
|
+
/** Include partial coverage details */
|
|
129
|
+
includePartial?: boolean;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Analyzes test coverage for sensitive data access paths
|
|
133
|
+
*/
|
|
134
|
+
export declare class CoverageAnalyzer {
|
|
135
|
+
private graph;
|
|
136
|
+
private entryPointSet;
|
|
137
|
+
private testFunctions;
|
|
138
|
+
private testFiles;
|
|
139
|
+
private testedFunctions;
|
|
140
|
+
private sensitivityPatterns;
|
|
141
|
+
constructor(graph: CallGraph);
|
|
142
|
+
/**
|
|
143
|
+
* Analyze coverage for sensitive data access
|
|
144
|
+
*/
|
|
145
|
+
analyze(options?: CoverageAnalysisOptions): CoverageAnalysisResult;
|
|
146
|
+
/**
|
|
147
|
+
* Get default test file patterns
|
|
148
|
+
* Covers common conventions across languages and frameworks
|
|
149
|
+
*/
|
|
150
|
+
private getDefaultTestPatterns;
|
|
151
|
+
/**
|
|
152
|
+
* Get default sensitivity patterns
|
|
153
|
+
* Covers common sensitive data across ORMs and databases
|
|
154
|
+
*/
|
|
155
|
+
private getDefaultSensitivityPatterns;
|
|
156
|
+
/**
|
|
157
|
+
* Identify test files and test functions
|
|
158
|
+
*/
|
|
159
|
+
private identifyTestCode;
|
|
160
|
+
/**
|
|
161
|
+
* Find all functions that are called by tests (directly or transitively)
|
|
162
|
+
*/
|
|
163
|
+
private findTestedFunctions;
|
|
164
|
+
/**
|
|
165
|
+
* Find all sensitive data access points
|
|
166
|
+
*/
|
|
167
|
+
private findSensitiveAccess;
|
|
168
|
+
/**
|
|
169
|
+
* Build access paths from entry points to sensitive data
|
|
170
|
+
*/
|
|
171
|
+
private buildAccessPaths;
|
|
172
|
+
/**
|
|
173
|
+
* Find all paths from entry points to a target function
|
|
174
|
+
*/
|
|
175
|
+
private findPathsFromEntryPoints;
|
|
176
|
+
/**
|
|
177
|
+
* Mark which paths are tested
|
|
178
|
+
*/
|
|
179
|
+
private markTestedPaths;
|
|
180
|
+
/**
|
|
181
|
+
* Calculate coverage by field
|
|
182
|
+
*/
|
|
183
|
+
private calculateFieldCoverage;
|
|
184
|
+
/**
|
|
185
|
+
* Build summary statistics
|
|
186
|
+
*/
|
|
187
|
+
private buildSummary;
|
|
188
|
+
/**
|
|
189
|
+
* Classify sensitivity of a data access point using configurable patterns
|
|
190
|
+
*/
|
|
191
|
+
private classifySensitivity;
|
|
192
|
+
/**
|
|
193
|
+
* Extract sensitive field names from an access point using configurable patterns
|
|
194
|
+
*/
|
|
195
|
+
private extractSensitiveFields;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Create a coverage analyzer
|
|
199
|
+
*/
|
|
200
|
+
export declare function createCoverageAnalyzer(graph: CallGraph): CoverageAnalyzer;
|
|
201
|
+
//# sourceMappingURL=coverage-analyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage-analyzer.d.ts","sourceRoot":"","sources":["../../../src/call-graph/analysis/coverage-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAmB,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAMlF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IAC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