circle-ir 4.17.0 → 4.18.1
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/analysis/advisories.d.ts +186 -0
- package/dist/analysis/advisories.d.ts.map +1 -0
- package/dist/analysis/advisories.js +391 -0
- package/dist/analysis/advisories.js.map +1 -0
- package/dist/analysis/comment-lines.d.ts +14 -0
- package/dist/analysis/comment-lines.d.ts.map +1 -0
- package/dist/analysis/comment-lines.js +34 -0
- package/dist/analysis/comment-lines.js.map +1 -0
- package/dist/analysis/config-loader.d.ts.map +1 -1
- package/dist/analysis/config-loader.js +59 -5
- package/dist/analysis/config-loader.js.map +1 -1
- package/dist/analysis/constant-caller-gate.d.ts +2 -2
- package/dist/analysis/constant-caller-gate.d.ts.map +1 -1
- package/dist/analysis/constant-caller-gate.js +205 -29
- package/dist/analysis/constant-caller-gate.js.map +1 -1
- package/dist/analysis/constant-propagation/propagator.d.ts +4 -0
- package/dist/analysis/constant-propagation/propagator.d.ts.map +1 -1
- package/dist/analysis/constant-propagation/propagator.js +99 -0
- package/dist/analysis/constant-propagation/propagator.js.map +1 -1
- package/dist/analysis/entry-point-detection.d.ts.map +1 -1
- package/dist/analysis/entry-point-detection.js +72 -0
- package/dist/analysis/entry-point-detection.js.map +1 -1
- package/dist/analysis/interprocedural.d.ts.map +1 -1
- package/dist/analysis/interprocedural.js +75 -8
- package/dist/analysis/interprocedural.js.map +1 -1
- package/dist/analysis/maven-declared.d.ts +72 -0
- package/dist/analysis/maven-declared.d.ts.map +1 -0
- package/dist/analysis/maven-declared.js +216 -0
- package/dist/analysis/maven-declared.js.map +1 -0
- package/dist/analysis/maven-version.d.ts +28 -0
- package/dist/analysis/maven-version.d.ts.map +1 -0
- package/dist/analysis/maven-version.js +172 -0
- package/dist/analysis/maven-version.js.map +1 -0
- package/dist/analysis/passes/constant-propagation-pass.d.ts.map +1 -1
- package/dist/analysis/passes/constant-propagation-pass.js +29 -1
- package/dist/analysis/passes/constant-propagation-pass.js.map +1 -1
- package/dist/analysis/passes/cross-file-pass.d.ts.map +1 -1
- package/dist/analysis/passes/cross-file-pass.js +81 -1
- package/dist/analysis/passes/cross-file-pass.js.map +1 -1
- package/dist/analysis/passes/csharp-sanitizer-credit.d.ts +7 -0
- package/dist/analysis/passes/csharp-sanitizer-credit.d.ts.map +1 -1
- package/dist/analysis/passes/csharp-sanitizer-credit.js +44 -1
- package/dist/analysis/passes/csharp-sanitizer-credit.js.map +1 -1
- package/dist/analysis/passes/insecure-cookie-pass.d.ts +2 -0
- package/dist/analysis/passes/insecure-cookie-pass.d.ts.map +1 -1
- package/dist/analysis/passes/insecure-cookie-pass.js +25 -3
- package/dist/analysis/passes/insecure-cookie-pass.js.map +1 -1
- package/dist/analysis/passes/interprocedural-pass.d.ts +11 -14
- package/dist/analysis/passes/interprocedural-pass.d.ts.map +1 -1
- package/dist/analysis/passes/interprocedural-pass.js +562 -0
- package/dist/analysis/passes/interprocedural-pass.js.map +1 -1
- package/dist/analysis/passes/language-sources-pass.d.ts +18 -1
- package/dist/analysis/passes/language-sources-pass.d.ts.map +1 -1
- package/dist/analysis/passes/language-sources-pass.js +1057 -14
- package/dist/analysis/passes/language-sources-pass.js.map +1 -1
- package/dist/analysis/passes/param-source-flow-gate-pass.d.ts.map +1 -1
- package/dist/analysis/passes/param-source-flow-gate-pass.js +66 -3
- package/dist/analysis/passes/param-source-flow-gate-pass.js.map +1 -1
- package/dist/analysis/passes/sink-filter-pass.d.ts +44 -2
- package/dist/analysis/passes/sink-filter-pass.d.ts.map +1 -1
- package/dist/analysis/passes/sink-filter-pass.js +690 -12
- package/dist/analysis/passes/sink-filter-pass.js.map +1 -1
- package/dist/analysis/passes/taint-propagation-pass.d.ts.map +1 -1
- package/dist/analysis/passes/taint-propagation-pass.js +133 -10
- package/dist/analysis/passes/taint-propagation-pass.js.map +1 -1
- package/dist/analysis/passes/tls-verify-disabled-pass.d.ts +18 -0
- package/dist/analysis/passes/tls-verify-disabled-pass.d.ts.map +1 -1
- package/dist/analysis/passes/tls-verify-disabled-pass.js +161 -0
- package/dist/analysis/passes/tls-verify-disabled-pass.js.map +1 -1
- package/dist/analysis/passes/weak-random-pass.d.ts +6 -0
- package/dist/analysis/passes/weak-random-pass.d.ts.map +1 -1
- package/dist/analysis/passes/weak-random-pass.js +29 -0
- package/dist/analysis/passes/weak-random-pass.js.map +1 -1
- package/dist/analysis/promote-cross-file-flows.d.ts +17 -0
- package/dist/analysis/promote-cross-file-flows.d.ts.map +1 -0
- package/dist/analysis/promote-cross-file-flows.js +32 -0
- package/dist/analysis/promote-cross-file-flows.js.map +1 -0
- package/dist/analysis/sbom.d.ts +100 -0
- package/dist/analysis/sbom.d.ts.map +1 -1
- package/dist/analysis/sbom.js +514 -3
- package/dist/analysis/sbom.js.map +1 -1
- package/dist/analysis/semver-version.d.ts +30 -0
- package/dist/analysis/semver-version.d.ts.map +1 -0
- package/dist/analysis/semver-version.js +76 -0
- package/dist/analysis/semver-version.js.map +1 -0
- package/dist/analysis/taint-matcher.d.ts +5 -0
- package/dist/analysis/taint-matcher.d.ts.map +1 -1
- package/dist/analysis/taint-matcher.js +225 -4
- package/dist/analysis/taint-matcher.js.map +1 -1
- package/dist/analyzer.d.ts +57 -0
- package/dist/analyzer.d.ts.map +1 -1
- package/dist/analyzer.js +69 -6
- package/dist/analyzer.js.map +1 -1
- package/dist/browser/circle-ir.js +2936 -291
- package/dist/core/circle-ir-core.cjs +634 -203
- package/dist/core/circle-ir-core.js +634 -203
- package/dist/core/extractors/dfg.js +205 -2
- package/dist/core/extractors/dfg.js.map +1 -1
- package/dist/core/extractors/ts-declaration-detail.d.ts +39 -0
- package/dist/core/extractors/ts-declaration-detail.d.ts.map +1 -0
- package/dist/core/extractors/ts-declaration-detail.js +266 -0
- package/dist/core/extractors/ts-declaration-detail.js.map +1 -0
- package/dist/graph/analysis-pass.d.ts +4 -1
- package/dist/graph/analysis-pass.d.ts.map +1 -1
- package/dist/graph/analysis-pass.js +4 -1
- package/dist/graph/analysis-pass.js.map +1 -1
- package/dist/graph-facts/dead-code.d.ts +62 -0
- package/dist/graph-facts/dead-code.d.ts.map +1 -0
- package/dist/graph-facts/dead-code.js +90 -0
- package/dist/graph-facts/dead-code.js.map +1 -0
- package/dist/graph-facts/dependency-calls.d.ts +86 -0
- package/dist/graph-facts/dependency-calls.d.ts.map +1 -0
- package/dist/graph-facts/dependency-calls.js +93 -0
- package/dist/graph-facts/dependency-calls.js.map +1 -0
- package/dist/graph-facts/index.d.ts +10 -0
- package/dist/graph-facts/index.d.ts.map +1 -0
- package/dist/graph-facts/index.js +10 -0
- package/dist/graph-facts/index.js.map +1 -0
- package/dist/graph-facts/maven-packages.d.ts +42 -0
- package/dist/graph-facts/maven-packages.d.ts.map +1 -0
- package/dist/graph-facts/maven-packages.js +133 -0
- package/dist/graph-facts/maven-packages.js.map +1 -0
- package/dist/graph-facts/reach.d.ts +203 -0
- package/dist/graph-facts/reach.d.ts.map +1 -0
- package/dist/graph-facts/reach.js +219 -0
- package/dist/graph-facts/reach.js.map +1 -0
- package/dist/graph-facts/removal-reach.d.ts +73 -0
- package/dist/graph-facts/removal-reach.d.ts.map +1 -0
- package/dist/graph-facts/removal-reach.js +64 -0
- package/dist/graph-facts/removal-reach.js.map +1 -0
- package/dist/index.d.ts +21 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/dist/navigation/go-graph.d.ts +68 -0
- package/dist/navigation/go-graph.d.ts.map +1 -0
- package/dist/navigation/go-graph.js +753 -0
- package/dist/navigation/go-graph.js.map +1 -0
- package/dist/navigation/index.d.ts +7 -1
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +6 -0
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/java-entry-tables.d.ts +43 -0
- package/dist/navigation/java-entry-tables.d.ts.map +1 -0
- package/dist/navigation/java-entry-tables.js +56 -0
- package/dist/navigation/java-entry-tables.js.map +1 -0
- package/dist/navigation/java-graph.d.ts +64 -0
- package/dist/navigation/java-graph.d.ts.map +1 -0
- package/dist/navigation/java-graph.js +466 -0
- package/dist/navigation/java-graph.js.map +1 -0
- package/dist/navigation/navigation-index.d.ts +51 -1
- package/dist/navigation/navigation-index.d.ts.map +1 -1
- package/dist/navigation/navigation-index.js +72 -0
- package/dist/navigation/navigation-index.js.map +1 -1
- package/dist/navigation/python-graph.d.ts +73 -0
- package/dist/navigation/python-graph.d.ts.map +1 -0
- package/dist/navigation/python-graph.js +867 -0
- package/dist/navigation/python-graph.js.map +1 -0
- package/dist/navigation/ts-call-edges.d.ts +193 -0
- package/dist/navigation/ts-call-edges.d.ts.map +1 -0
- package/dist/navigation/ts-call-edges.js +2089 -0
- package/dist/navigation/ts-call-edges.js.map +1 -0
- package/dist/navigation/ts-entry-tables.d.ts +88 -0
- package/dist/navigation/ts-entry-tables.d.ts.map +1 -0
- package/dist/navigation/ts-entry-tables.js +50 -0
- package/dist/navigation/ts-entry-tables.js.map +1 -0
- package/dist/path-set/branches.d.ts +52 -0
- package/dist/path-set/branches.d.ts.map +1 -0
- package/dist/path-set/branches.js +124 -0
- package/dist/path-set/branches.js.map +1 -0
- package/dist/path-set/finding-diff.d.ts +63 -0
- package/dist/path-set/finding-diff.d.ts.map +1 -0
- package/dist/path-set/finding-diff.js +150 -0
- package/dist/path-set/finding-diff.js.map +1 -0
- package/dist/path-set/index.d.ts +18 -0
- package/dist/path-set/index.d.ts.map +1 -0
- package/dist/path-set/index.js +12 -0
- package/dist/path-set/index.js.map +1 -0
- package/dist/path-set/line-diff.d.ts +19 -0
- package/dist/path-set/line-diff.d.ts.map +1 -0
- package/dist/path-set/line-diff.js +98 -0
- package/dist/path-set/line-diff.js.map +1 -0
- package/dist/path-set/path-set.d.ts +88 -0
- package/dist/path-set/path-set.d.ts.map +1 -0
- package/dist/path-set/path-set.js +716 -0
- package/dist/path-set/path-set.js.map +1 -0
- package/dist/path-set/templates.d.ts +42 -0
- package/dist/path-set/templates.d.ts.map +1 -0
- package/dist/path-set/templates.js +119 -0
- package/dist/path-set/templates.js.map +1 -0
- package/dist/path-set/types.d.ts +195 -0
- package/dist/path-set/types.d.ts.map +1 -0
- package/dist/path-set/types.js +8 -0
- package/dist/path-set/types.js.map +1 -0
- package/dist/remedy-class/index.d.ts +12 -0
- package/dist/remedy-class/index.d.ts.map +1 -0
- package/dist/remedy-class/index.js +9 -0
- package/dist/remedy-class/index.js.map +1 -0
- package/dist/remedy-class/match.d.ts +165 -0
- package/dist/remedy-class/match.d.ts.map +1 -0
- package/dist/remedy-class/match.js +705 -0
- package/dist/remedy-class/match.js.map +1 -0
- package/dist/remedy-class/output-context.d.ts +25 -0
- package/dist/remedy-class/output-context.d.ts.map +1 -0
- package/dist/remedy-class/output-context.js +150 -0
- package/dist/remedy-class/output-context.js.map +1 -0
- package/dist/remedy-class/sha256.d.ts +18 -0
- package/dist/remedy-class/sha256.d.ts.map +1 -0
- package/dist/remedy-class/sha256.js +89 -0
- package/dist/remedy-class/sha256.js.map +1 -0
- package/dist/remedy-class/table.d.ts +130 -0
- package/dist/remedy-class/table.d.ts.map +1 -0
- package/dist/remedy-class/table.js +457 -0
- package/dist/remedy-class/table.js.map +1 -0
- package/dist/resolution/cross-file.d.ts +9 -0
- package/dist/resolution/cross-file.d.ts.map +1 -1
- package/dist/resolution/cross-file.js +60 -5
- package/dist/resolution/cross-file.js.map +1 -1
- package/dist/stable-ids/builder.d.ts +20 -0
- package/dist/stable-ids/builder.d.ts.map +1 -0
- package/dist/stable-ids/builder.js +65 -0
- package/dist/stable-ids/builder.js.map +1 -0
- package/dist/stable-ids/diff.d.ts +18 -0
- package/dist/stable-ids/diff.d.ts.map +1 -0
- package/dist/stable-ids/diff.js +37 -0
- package/dist/stable-ids/diff.js.map +1 -0
- package/dist/stable-ids/go.d.ts +28 -0
- package/dist/stable-ids/go.d.ts.map +1 -0
- package/dist/stable-ids/go.js +160 -0
- package/dist/stable-ids/go.js.map +1 -0
- package/dist/stable-ids/hash.d.ts +22 -0
- package/dist/stable-ids/hash.d.ts.map +1 -0
- package/dist/stable-ids/hash.js +167 -0
- package/dist/stable-ids/hash.js.map +1 -0
- package/dist/stable-ids/index.d.ts +30 -0
- package/dist/stable-ids/index.d.ts.map +1 -0
- package/dist/stable-ids/index.js +59 -0
- package/dist/stable-ids/index.js.map +1 -0
- package/dist/stable-ids/java.d.ts +28 -0
- package/dist/stable-ids/java.d.ts.map +1 -0
- package/dist/stable-ids/java.js +224 -0
- package/dist/stable-ids/java.js.map +1 -0
- package/dist/stable-ids/moves.d.ts +87 -0
- package/dist/stable-ids/moves.d.ts.map +1 -0
- package/dist/stable-ids/moves.js +222 -0
- package/dist/stable-ids/moves.js.map +1 -0
- package/dist/stable-ids/nodes.d.ts +32 -0
- package/dist/stable-ids/nodes.d.ts.map +1 -0
- package/dist/stable-ids/nodes.js +92 -0
- package/dist/stable-ids/nodes.js.map +1 -0
- package/dist/stable-ids/normalize.d.ts +35 -0
- package/dist/stable-ids/normalize.d.ts.map +1 -0
- package/dist/stable-ids/normalize.js +174 -0
- package/dist/stable-ids/normalize.js.map +1 -0
- package/dist/stable-ids/parse-errors.d.ts +24 -0
- package/dist/stable-ids/parse-errors.d.ts.map +1 -0
- package/dist/stable-ids/parse-errors.js +46 -0
- package/dist/stable-ids/parse-errors.js.map +1 -0
- package/dist/stable-ids/python.d.ts +27 -0
- package/dist/stable-ids/python.d.ts.map +1 -0
- package/dist/stable-ids/python.js +212 -0
- package/dist/stable-ids/python.js.map +1 -0
- package/dist/stable-ids/ts-parse-errors.d.ts +27 -0
- package/dist/stable-ids/ts-parse-errors.d.ts.map +1 -0
- package/dist/stable-ids/ts-parse-errors.js +75 -0
- package/dist/stable-ids/ts-parse-errors.js.map +1 -0
- package/dist/stable-ids/types.d.ts +106 -0
- package/dist/stable-ids/types.d.ts.map +1 -0
- package/dist/stable-ids/types.js +16 -0
- package/dist/stable-ids/types.js.map +1 -0
- package/dist/stable-ids/typescript.d.ts +30 -0
- package/dist/stable-ids/typescript.d.ts.map +1 -0
- package/dist/stable-ids/typescript.js +362 -0
- package/dist/stable-ids/typescript.js.map +1 -0
- package/dist/types/config.d.ts +9 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.d.ts +35 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reach core (`reach@0.1`): from a set of entry points to every
|
|
3
|
+
* declaration, one path per class and the unresolved sites that could add
|
|
4
|
+
* more.
|
|
5
|
+
*
|
|
6
|
+
* - **strong** path: from a `declared` or `conventional` entry over strong
|
|
7
|
+
* edges only — `exact` and `polymorphic` calls, and the structural edges
|
|
8
|
+
* that hold whenever their source runs (`contains`: a body creates its
|
|
9
|
+
* nested functions, a module its top-level values, a class its fields and
|
|
10
|
+
* constructor; `loads`: running a declaration loads its module; `import`:
|
|
11
|
+
* loading a module loads what it imports; `field`: a body that runs uses
|
|
12
|
+
* the fields it reads or writes through `this`; `loads` also covers a
|
|
13
|
+
* body that loads a module with `import()` or `require()`).
|
|
14
|
+
* - **weak** path: any other path — through an `inferred` call, a
|
|
15
|
+
* `reference` (a function or class passed, stored, returned or rendered:
|
|
16
|
+
* it may run, nothing proves it does) or an `inferred` entry.
|
|
17
|
+
* - **unresolved**: call sites in reached bodies that the call graph could
|
|
18
|
+
* not bind and that could bind to the declaration — same method name, or a
|
|
19
|
+
* computed callee — plus registrations whose handler was not resolved.
|
|
20
|
+
* A module is reached this way only by a module load with a computed
|
|
21
|
+
* specifier (`import(name)`, methodName `<module>`).
|
|
22
|
+
*
|
|
23
|
+
* Each path is the shortest of its class (breadth-first, deterministic:
|
|
24
|
+
* adjacency in id order). `partial[]` lists files that did not parse; their
|
|
25
|
+
* call sites are missing, so any answer that relies on absence is not final.
|
|
26
|
+
*/
|
|
27
|
+
export const REACH_SCHEME = 'reach@0.1';
|
|
28
|
+
/**
|
|
29
|
+
* `partial` paths with their first blocking parse error, read from the
|
|
30
|
+
* files' `parseError`, sorted by path. A path with no error recorded (an
|
|
31
|
+
* older `StableIdFile`) keeps only `file`.
|
|
32
|
+
*/
|
|
33
|
+
export function partialFileDetails(partial, files) {
|
|
34
|
+
const byFile = new Map(files.map(f => [f.file, f]));
|
|
35
|
+
return [...new Set(partial)].sort().map(file => {
|
|
36
|
+
const e = byFile.get(file)?.parseError;
|
|
37
|
+
return e ? { file, line: e.line, column: e.column, nodeKind: e.nodeKind, parent: e.parent } : { file };
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export const ALL_ENTRY_KINDS = [
|
|
41
|
+
'route', 'listener', 'scheduled', 'main', 'export', 'bean', 'reflection', 'lifecycle', 'test',
|
|
42
|
+
];
|
|
43
|
+
/** The adjacency the walk uses: call graph edges plus the structural ones. */
|
|
44
|
+
export class ReachGraph {
|
|
45
|
+
input;
|
|
46
|
+
decls = new Map();
|
|
47
|
+
out = new Map();
|
|
48
|
+
constructor(input) {
|
|
49
|
+
this.input = input;
|
|
50
|
+
for (const f of input.files)
|
|
51
|
+
for (const d of f.decls)
|
|
52
|
+
this.decls.set(d.id, { decl: d, file: f.file });
|
|
53
|
+
const add = (from, e) => {
|
|
54
|
+
if (!this.decls.has(from) || !this.decls.has(e.to) || from === e.to)
|
|
55
|
+
return;
|
|
56
|
+
const list = this.out.get(from);
|
|
57
|
+
if (list)
|
|
58
|
+
list.push(e);
|
|
59
|
+
else
|
|
60
|
+
this.out.set(from, [e]);
|
|
61
|
+
};
|
|
62
|
+
for (const e of input.edges)
|
|
63
|
+
add(e.from, { to: e.to, relation: 'call', strong: e.tier !== 'inferred', tier: e.tier, site: e.site });
|
|
64
|
+
for (const r of input.references ?? [])
|
|
65
|
+
add(r.from, { to: r.to, relation: 'reference', strong: false, site: r.site });
|
|
66
|
+
for (const u of input.fieldUses ?? [])
|
|
67
|
+
add(u.from, { to: u.to, relation: 'field', strong: true, site: u.site });
|
|
68
|
+
for (const i of input.imports ?? [])
|
|
69
|
+
add(i.from, { to: i.to, relation: 'import', strong: true });
|
|
70
|
+
for (const l of input.loads ?? [])
|
|
71
|
+
add(l.from, { to: l.to, relation: 'loads', strong: true, site: l.site });
|
|
72
|
+
for (const f of input.files) {
|
|
73
|
+
const module = f.decls[0];
|
|
74
|
+
for (const d of f.decls) {
|
|
75
|
+
if (d === module || !module)
|
|
76
|
+
continue;
|
|
77
|
+
add(d.id, { to: module.id, relation: 'loads', strong: true });
|
|
78
|
+
const parent = d.parent === null ? undefined : this.decls.get(d.parent)?.decl;
|
|
79
|
+
if (!parent)
|
|
80
|
+
continue;
|
|
81
|
+
const nested = d.flags.includes('unstable:anonymous');
|
|
82
|
+
const topValue = parent === module && d.kind === 'field';
|
|
83
|
+
// A class creates its fields and runs its static initializer; in
|
|
84
|
+
// TypeScript a class used as a value may also be constructed, while
|
|
85
|
+
// a Java constructor runs only when called (the call graph has it).
|
|
86
|
+
const ctor = d.kind === 'method' && (d.name === '<clinit>' || (d.name === 'constructor' && f.language !== 'java'));
|
|
87
|
+
const classPart = parent.kind === 'type' && (d.kind === 'field' || ctor);
|
|
88
|
+
if (nested || topValue || classPart)
|
|
89
|
+
add(parent.id, { to: d.id, relation: 'contains', strong: true });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const order = (a, b) => a.to < b.to ? -1 : a.to > b.to ? 1 : a.relation < b.relation ? -1 : a.relation > b.relation ? 1
|
|
93
|
+
: (a.site?.line ?? 0) - (b.site?.line ?? 0) || (a.site?.col ?? 0) - (b.site?.col ?? 0);
|
|
94
|
+
for (const list of this.out.values())
|
|
95
|
+
list.sort(order);
|
|
96
|
+
}
|
|
97
|
+
edgesFrom(id) {
|
|
98
|
+
return this.out.get(id) ?? [];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Breadth-first over (declaration, weak-so-far) states from the given roots.
|
|
103
|
+
* A state's first visit is its shortest path.
|
|
104
|
+
*/
|
|
105
|
+
export function walkFrom(g, roots) {
|
|
106
|
+
const seen = new Map();
|
|
107
|
+
const queue = [];
|
|
108
|
+
roots.forEach((r, i) => {
|
|
109
|
+
const key = `${r.weak ? 1 : 0}${r.id}`;
|
|
110
|
+
if (!g.decls.has(r.id) || seen.has(key))
|
|
111
|
+
return;
|
|
112
|
+
seen.set(key, { prev: null, edge: null, root: i });
|
|
113
|
+
queue.push(key);
|
|
114
|
+
});
|
|
115
|
+
for (let head = 0; head < queue.length; head++) {
|
|
116
|
+
const key = queue[head];
|
|
117
|
+
const weak = key[0] === '1';
|
|
118
|
+
const id = key.slice(1);
|
|
119
|
+
const root = seen.get(key).root;
|
|
120
|
+
for (const e of g.edgesFrom(id)) {
|
|
121
|
+
const next = `${weak || !e.strong ? 1 : 0}${e.to}`;
|
|
122
|
+
if (seen.has(next))
|
|
123
|
+
continue;
|
|
124
|
+
seen.set(next, { prev: key, edge: e, root });
|
|
125
|
+
queue.push(next);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return seen;
|
|
129
|
+
}
|
|
130
|
+
function pathTo(visits, key, roots) {
|
|
131
|
+
const v = visits.get(key);
|
|
132
|
+
if (!v)
|
|
133
|
+
return null;
|
|
134
|
+
const steps = [];
|
|
135
|
+
for (let k = key; k !== null;) {
|
|
136
|
+
const at = visits.get(k);
|
|
137
|
+
const step = { decl: k.slice(1), via: at.edge ? at.edge.relation : 'entry' };
|
|
138
|
+
if (at.edge?.tier)
|
|
139
|
+
step.tier = at.edge.tier;
|
|
140
|
+
if (at.edge?.site)
|
|
141
|
+
step.site = at.edge.site;
|
|
142
|
+
steps.push(step);
|
|
143
|
+
k = at.prev;
|
|
144
|
+
}
|
|
145
|
+
steps.reverse();
|
|
146
|
+
const e = roots[v.root];
|
|
147
|
+
const entry = { id: e.id, kind: e.kind, certainty: e.certainty };
|
|
148
|
+
if (e.method)
|
|
149
|
+
entry.method = e.method;
|
|
150
|
+
if (e.path)
|
|
151
|
+
entry.path = e.path;
|
|
152
|
+
return { class: key[0] === '1' ? 'weak' : 'strong', entry, steps };
|
|
153
|
+
}
|
|
154
|
+
const bySite = (a, b) => a.site.file < b.site.file ? -1 : a.site.file > b.site.file ? 1 : a.site.line - b.site.line || a.site.col - b.site.col;
|
|
155
|
+
/** Declarations reached in any class from `visits`. */
|
|
156
|
+
export function reachedIds(visits) {
|
|
157
|
+
return new Set([...visits.keys()].map(k => k.slice(1)));
|
|
158
|
+
}
|
|
159
|
+
/** `methodName` of an unresolved site that loads a module by a computed specifier. */
|
|
160
|
+
export const COMPUTED_LOAD = '<module>';
|
|
161
|
+
/**
|
|
162
|
+
* Unresolved sites in reached bodies that could bind to `d`: a non-external
|
|
163
|
+
* site with `d`'s name, a computed callee, or an unresolved registration.
|
|
164
|
+
* For a module: a module load with a computed specifier.
|
|
165
|
+
*/
|
|
166
|
+
export function couldReach(input, reached, d) {
|
|
167
|
+
if (d.kind === 'field')
|
|
168
|
+
return [];
|
|
169
|
+
const isModule = d.kind === 'module';
|
|
170
|
+
const out = [];
|
|
171
|
+
for (const u of input.unresolved) {
|
|
172
|
+
if (u.reason === 'external' || !reached.has(u.from))
|
|
173
|
+
continue;
|
|
174
|
+
const load = u.methodName === COMPUTED_LOAD;
|
|
175
|
+
if (isModule !== load)
|
|
176
|
+
continue;
|
|
177
|
+
const computed = u.methodName.startsWith('<') || u.methodName.startsWith('(');
|
|
178
|
+
if (computed || u.methodName === d.name)
|
|
179
|
+
out.push({ kind: 'call', from: u.from, methodName: u.methodName, reason: u.reason, site: u.site });
|
|
180
|
+
}
|
|
181
|
+
if (isModule)
|
|
182
|
+
return out.sort(bySite);
|
|
183
|
+
for (const r of input.unresolvedRegistrations ?? []) {
|
|
184
|
+
if (r.reason === 'handler-unresolved')
|
|
185
|
+
out.push({ kind: 'registration', reason: r.reason, site: r.site });
|
|
186
|
+
}
|
|
187
|
+
return out.sort(bySite);
|
|
188
|
+
}
|
|
189
|
+
export function reach(input, options = {}) {
|
|
190
|
+
const rootKinds = [...(options.rootKinds ?? ALL_ENTRY_KINDS.filter(k => k !== 'test'))];
|
|
191
|
+
const max = options.maxUnresolved ?? 5;
|
|
192
|
+
const g = new ReachGraph(input);
|
|
193
|
+
const roots = input.entries.filter(e => rootKinds.includes(e.kind));
|
|
194
|
+
const visits = walkFrom(g, roots.map(e => ({ id: e.id, weak: e.certainty === 'inferred' })));
|
|
195
|
+
const reached = reachedIds(visits);
|
|
196
|
+
const wanted = options.targets ? new Set(options.targets) : null;
|
|
197
|
+
const facts = [];
|
|
198
|
+
for (const f of input.files) {
|
|
199
|
+
for (const d of f.decls) {
|
|
200
|
+
if (wanted && !wanted.has(d.id))
|
|
201
|
+
continue;
|
|
202
|
+
const strong = pathTo(visits, `0${d.id}`, roots);
|
|
203
|
+
const weak = pathTo(visits, `1${d.id}`, roots);
|
|
204
|
+
const sites = strong ? [] : couldReach(input, reached, d);
|
|
205
|
+
facts.push({
|
|
206
|
+
id: d.id,
|
|
207
|
+
qualified_name: d.qualified_name,
|
|
208
|
+
kind: d.kind,
|
|
209
|
+
file: f.file,
|
|
210
|
+
strong,
|
|
211
|
+
weak,
|
|
212
|
+
unresolved: sites.slice(0, max),
|
|
213
|
+
unresolvedCount: sites.length,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return { scheme: REACH_SCHEME, ids: 'ids@0.1', rootKinds, partial: [...input.partial], partialFiles: partialFileDetails(input.partial, input.files), facts };
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=reach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reach.js","sourceRoot":"","sources":["../../src/graph-facts/reach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH,MAAM,CAAC,MAAM,YAAY,GAAG,WAAoB,CAAC;AA0FjD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA0B,EAAE,KAA8B;IAC3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CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;AAC/J,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SR-G2 `removal-reach` (`removal-reach@0.1`): for each declaration removed
|
|
3
|
+
* between a base and a head, whether the base could reach it.
|
|
4
|
+
*
|
|
5
|
+
* Removed = `diffStableIds(base, head)` minus settled moves and renames
|
|
6
|
+
* (`detectMoves`): a declaration that moved is not a removal. A removal that
|
|
7
|
+
* only a move *candidate* explains stays a removal and carries the candidate.
|
|
8
|
+
*
|
|
9
|
+
* Per removed declaration, at the **base**: one strong path if any, one weak
|
|
10
|
+
* path if any, and the unresolved sites that could reach it. The consumer
|
|
11
|
+
* decides: a strong path means live code was removed; no strong path but a
|
|
12
|
+
* weak path or an unresolved site means "may be live"; nothing means the
|
|
13
|
+
* removal was unreachable. Files that do not parse at either pin are listed
|
|
14
|
+
* in `partial[]`.
|
|
15
|
+
*/
|
|
16
|
+
import { type MoveCandidate, type MoveOptions } from '../stable-ids/moves.js';
|
|
17
|
+
import type { StableIdFile } from '../stable-ids/types.js';
|
|
18
|
+
import type { EntryKind } from '../navigation/ts-entry-tables.js';
|
|
19
|
+
import { type CouldReachSite, type PartialFile, type ReachInput, type ReachPath } from './reach.js';
|
|
20
|
+
export declare const REMOVAL_REACH_SCHEME: 'removal-reach@0.1';
|
|
21
|
+
export interface RemovedDeclaration {
|
|
22
|
+
id: string;
|
|
23
|
+
qualified_name: string;
|
|
24
|
+
kind: string;
|
|
25
|
+
file: string;
|
|
26
|
+
strong: ReachPath | null;
|
|
27
|
+
weak: ReachPath | null;
|
|
28
|
+
unresolved: CouldReachSite[];
|
|
29
|
+
unresolvedCount: number;
|
|
30
|
+
/** Move or rename candidates (signal) that could explain the removal. */
|
|
31
|
+
moveCandidates: MoveCandidateRef[];
|
|
32
|
+
}
|
|
33
|
+
export interface MoveCandidateRef {
|
|
34
|
+
to: string;
|
|
35
|
+
relation: MoveCandidate['relation'];
|
|
36
|
+
evidence: MoveCandidate['evidence'];
|
|
37
|
+
similarity: number;
|
|
38
|
+
}
|
|
39
|
+
export interface RemovalReachOptions {
|
|
40
|
+
/** Root kinds at the base. Default: every kind except `test`. */
|
|
41
|
+
rootKinds?: readonly EntryKind[];
|
|
42
|
+
/** Passed to `detectMoves`. */
|
|
43
|
+
moves?: MoveOptions;
|
|
44
|
+
/** Most unresolved sites listed per declaration. Default 5. */
|
|
45
|
+
maxUnresolved?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface RemovalReachResult {
|
|
48
|
+
scheme: typeof REMOVAL_REACH_SCHEME;
|
|
49
|
+
ids: 'ids@0.1';
|
|
50
|
+
rootKinds: EntryKind[];
|
|
51
|
+
/** Digest of the base's entry index (sorted entries), so a record can name what it was decided against. */
|
|
52
|
+
entryIndexDigest: string;
|
|
53
|
+
/** Files that do not parse at the base or the head. */
|
|
54
|
+
partial: string[];
|
|
55
|
+
/** One row per `partial` file: where its first blocking parse error (at the head, else the base) is. */
|
|
56
|
+
partialFiles: PartialFile[];
|
|
57
|
+
/** Declarations that moved or were renamed (not removals), as `from → to` ids. */
|
|
58
|
+
moved: {
|
|
59
|
+
from: string;
|
|
60
|
+
to: string;
|
|
61
|
+
relation: string;
|
|
62
|
+
evidence: string;
|
|
63
|
+
}[];
|
|
64
|
+
removed: RemovedDeclaration[];
|
|
65
|
+
}
|
|
66
|
+
/** A stable digest of an entry list: order-independent, 26 base32 characters. */
|
|
67
|
+
export declare function entryIndexDigest(entries: ReachInput['entries']): string;
|
|
68
|
+
/**
|
|
69
|
+
* `base` is the reach input at the base pin (e.g. `buildTsCallGraph` over
|
|
70
|
+
* the base files); `head` is the stable ids at the head pin.
|
|
71
|
+
*/
|
|
72
|
+
export declare function removalReach(base: ReachInput, head: readonly StableIdFile[], options?: RemovalReachOptions): RemovalReachResult;
|
|
73
|
+
//# sourceMappingURL=removal-reach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remov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,oBAAoB,CAAC;IACpC,GAAG,EAAE,SAAS,CAAC;IACf,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,2GAA2G;IAC3G,gBAAgB,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wGAAwG;IACxG,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,kFAAkF;IAClF,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1E,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,MAAM,CAKvE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,SAAS,YAAY,EAAE,EAC7B,OAAO,GAAE,mBAAwB,GAChC,kBAAkB,CAgCpB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SR-G2 `removal-reach` (`removal-reach@0.1`): for each declaration removed
|
|
3
|
+
* between a base and a head, whether the base could reach it.
|
|
4
|
+
*
|
|
5
|
+
* Removed = `diffStableIds(base, head)` minus settled moves and renames
|
|
6
|
+
* (`detectMoves`): a declaration that moved is not a removal. A removal that
|
|
7
|
+
* only a move *candidate* explains stays a removal and carries the candidate.
|
|
8
|
+
*
|
|
9
|
+
* Per removed declaration, at the **base**: one strong path if any, one weak
|
|
10
|
+
* path if any, and the unresolved sites that could reach it. The consumer
|
|
11
|
+
* decides: a strong path means live code was removed; no strong path but a
|
|
12
|
+
* weak path or an unresolved site means "may be live"; nothing means the
|
|
13
|
+
* removal was unreachable. Files that do not parse at either pin are listed
|
|
14
|
+
* in `partial[]`.
|
|
15
|
+
*/
|
|
16
|
+
import { digest128 } from '../stable-ids/hash.js';
|
|
17
|
+
import { detectMoves } from '../stable-ids/moves.js';
|
|
18
|
+
import { ALL_ENTRY_KINDS, partialFileDetails, reach } from './reach.js';
|
|
19
|
+
export const REMOVAL_REACH_SCHEME = 'removal-reach@0.1';
|
|
20
|
+
/** A stable digest of an entry list: order-independent, 26 base32 characters. */
|
|
21
|
+
export function entryIndexDigest(entries) {
|
|
22
|
+
const rows = entries
|
|
23
|
+
.map(e => [e.id, e.kind, e.certainty, e.method ?? '', e.path ?? '', e.file, String(e.line)].join('\u0001'))
|
|
24
|
+
.sort();
|
|
25
|
+
return digest128(['entry-index@0.1', ...rows]);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* `base` is the reach input at the base pin (e.g. `buildTsCallGraph` over
|
|
29
|
+
* the base files); `head` is the stable ids at the head pin.
|
|
30
|
+
*/
|
|
31
|
+
export function removalReach(base, head, options = {}) {
|
|
32
|
+
const rootKinds = [...(options.rootKinds ?? ALL_ENTRY_KINDS.filter(k => k !== 'test'))];
|
|
33
|
+
const moves = detectMoves(base.files, head, options.moves);
|
|
34
|
+
const removedIds = moves.diff.removed.map(d => d.id);
|
|
35
|
+
const facts = reach(base, { rootKinds, targets: removedIds, maxUnresolved: options.maxUnresolved });
|
|
36
|
+
const candidates = new Map();
|
|
37
|
+
for (const c of moves.candidates) {
|
|
38
|
+
const list = candidates.get(c.from.id) ?? [];
|
|
39
|
+
list.push({ evidence: c.evidence, relation: c.relation, similarity: c.similarity, to: c.to.id });
|
|
40
|
+
candidates.set(c.from.id, list);
|
|
41
|
+
}
|
|
42
|
+
const partial = [...new Set([...base.partial, ...head.filter(f => f.partial).map(f => f.file)])].sort();
|
|
43
|
+
return {
|
|
44
|
+
scheme: REMOVAL_REACH_SCHEME,
|
|
45
|
+
ids: 'ids@0.1',
|
|
46
|
+
rootKinds,
|
|
47
|
+
entryIndexDigest: entryIndexDigest(base.entries),
|
|
48
|
+
partial,
|
|
49
|
+
partialFiles: partialFileDetails(partial, [...base.files, ...head.filter(f => f.partial)]),
|
|
50
|
+
moved: moves.moves.map(m => ({ from: m.from.id, to: m.to.id, relation: m.relation, evidence: m.evidence })),
|
|
51
|
+
removed: facts.facts.map(f => ({
|
|
52
|
+
id: f.id,
|
|
53
|
+
qualified_name: f.qualified_name,
|
|
54
|
+
kind: f.kind,
|
|
55
|
+
file: f.file,
|
|
56
|
+
strong: f.strong,
|
|
57
|
+
weak: f.weak,
|
|
58
|
+
unresolved: f.unresolved,
|
|
59
|
+
unresolvedCount: f.unresolvedCount,
|
|
60
|
+
moveCandidates: candidates.get(f.id) ?? [],
|
|
61
|
+
})),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=removal-reach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removal-reach.js","sourceRoot":"","sources":["../../src/graph-facts/removal-reach.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAwC,MAAM,wBAAwB,CAAC;AAG3F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,KAAK,EAA0E,MAAM,YAAY,CAAC;AAEhJ,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAA4B,CAAC;AA8CjE,iFAAiF;AACjF,MAAM,UAAU,gBAAgB,CAAC,OAA8B;IAC7D,MAAM,IAAI,GAAG,OAAO;SACjB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC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Ae,EAAE,CAAC,CAAC,eAAe;YAClC,cAAc,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE;SAC3C,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,14 +3,21 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A universal library for static analysis and taint tracking.
|
|
5
5
|
*/
|
|
6
|
-
export { initAnalyzer, analyze, analyzeForAPI, analyzeProject, isAnalyzerInitialized, resetAnalyzer, type AnalyzerOptions, } from './analyzer.js';
|
|
7
|
-
export { parseNpmDependencies, parseNpmLockDependencies, parsePypiDependencies, parsePyprojectDependencies, parseMavenDependencies, parseGradleDependencies, parseCargoDependencies, parseCargoLockDependencies, parsePoetryLockDependencies, parseGoDependencies, collectDependencies, toCycloneDx, toSpdx, } from './analysis/sbom.js';
|
|
8
|
-
export type { Dependency, Ecosystem, DependencyScope, SbomMetadata, } from './analysis/sbom.js';
|
|
6
|
+
export { initAnalyzer, analyze, analyzeForAPI, analyzeProject, isAnalyzerInitialized, AnalysisTimeoutError, resetAnalyzer, type AnalyzerOptions, } from './analyzer.js';
|
|
7
|
+
export { parseNpmDependencies, parseNpmLockDependencies, parsePnpmLockDependencies, parseYarnLockDependencies, pnpmLockImporters, parsePypiDependencies, parsePyprojectDependencies, parseMavenDependencies, parseGradleDependencies, parseGradleLockfile, parseMavenResolvedDependencies, parseCargoDependencies, parseCargoLockDependencies, parsePoetryLockDependencies, parseGoDependencies, collectDependencies, licenseFromPackageJson, applyLicenses, toCycloneDx, toSpdx, } from './analysis/sbom.js';
|
|
8
|
+
export type { Dependency, Ecosystem, DependencyScope, SbomMetadata, LicenseMap, } from './analysis/sbom.js';
|
|
9
|
+
export { compareMavenVersions, canonicalMavenVersion } from './analysis/maven-version.js';
|
|
10
|
+
export { compareSemver, parseSemver } from './analysis/semver-version.js';
|
|
11
|
+
export type { ParsedSemver } from './analysis/semver-version.js';
|
|
12
|
+
export { MavenDeclaredIndex } from './analysis/maven-declared.js';
|
|
13
|
+
export type { DeclaredVersion, DeclaredOrigin, PomFile } from './analysis/maven-declared.js';
|
|
14
|
+
export { parseOsvRecord, buildAdvisoryIndex, matchAdvisories, rangeIntervals, isConcreteVersion, diffAdvisoryMatches, diffDependencySets, ADVISORY_ECOSYSTEMS, } from './analysis/advisories.js';
|
|
15
|
+
export type { OsvRecord, OsvAffected, OsvRange, OsvEvent, AdvisoryGroup, AdvisoryIndex, AdvisoryRef, AdvisoryMatch, AffectedInterval, DeltaMatch, AdvisoryDelta, DependencyDelta, AdvisoryEcosystem, } from './analysis/advisories.js';
|
|
9
16
|
export type { NamingConventionOptions } from './analysis/passes/naming-convention-pass.js';
|
|
10
17
|
export type { DependencyFanOutOptions } from './analysis/passes/dependency-fan-out-pass.js';
|
|
11
18
|
export type { UnboundedCollectionOptions } from './analysis/passes/unbounded-collection-pass.js';
|
|
12
19
|
export type { PassOptions } from './analyzer.js';
|
|
13
|
-
export type { CircleIR, Meta, TypeInfo, MethodInfo, ParameterInfo, FieldInfo, CallInfo, ArgumentInfo, CallResolution, CFG, CFGBlock, CFGEdge, DFG, DFGDef, DFGUse, DFGChain, Taint, TaintSource, TaintSink, TaintSanitizer, ImportInfo, ExportInfo, UnresolvedItem, Enriched, EnrichedFunction, ResolvedCall, Finding, TaintHop, Vulnerability, AnalysisResponse, SourceType, SinkType, Severity, ProjectShape, ProjectEnv, ProjectProfile, ProjectProfileSummary, PassCategory, SarifLevel, SastFinding, MetricCategory, MetricValue, FileMetrics, ProjectAnalysis, ProjectMeta, FileAnalysis, TypeHierarchy, ClassHierarchyInfo, InterfaceHierarchyInfo, CrossFileCall, ArgMapping, TaintPath, } from './types/index.js';
|
|
20
|
+
export type { CircleIR, Meta, TypeInfo, MethodInfo, ParameterInfo, FieldInfo, DecoratorInfo, CallInfo, ArgumentInfo, CallResolution, CFG, CFGBlock, CFGEdge, DFG, DFGDef, DFGUse, DFGChain, Taint, TaintSource, TaintSink, TaintSanitizer, ImportInfo, ExportInfo, UnresolvedItem, Enriched, EnrichedFunction, ResolvedCall, Finding, TaintHop, Vulnerability, AnalysisResponse, SourceType, SinkType, Severity, ProjectShape, ProjectEnv, ProjectProfile, ProjectProfileSummary, PassCategory, SarifLevel, SastFinding, MetricCategory, MetricValue, FileMetrics, ProjectAnalysis, ProjectMeta, FileAnalysis, TypeHierarchy, ClassHierarchyInfo, InterfaceHierarchyInfo, CrossFileCall, ArgMapping, TaintPath, } from './types/index.js';
|
|
14
21
|
export { SOURCE_TYPES, SINK_TYPES } from './types/index.js';
|
|
15
22
|
export { getModelledCwes, isModelledCwe, RELATED_CWE, type ModelledCwes, } from './analysis/modelled-cwes.js';
|
|
16
23
|
export type { SourceConfig, SinkConfig, TaintConfig, SourcePattern, SinkPattern, SanitizerPattern, } from './types/config.js';
|
|
@@ -21,8 +28,16 @@ export { getRuleInfo, RULE_DEFINITIONS, type RuleInfo, } from './analysis/rules.
|
|
|
21
28
|
export { DominatorGraph } from './graph/dominator-graph.js';
|
|
22
29
|
export { ExceptionFlowGraph, type TryCatchInfo } from './graph/exception-flow-graph.js';
|
|
23
30
|
export { TypeHierarchyResolver, createWithJdkTypes, SymbolTable, buildSymbolTable, CrossFileResolver, buildCrossFileResolver, } from './resolution/index.js';
|
|
24
|
-
export { buildNavigationIndex, NavigationIndex, } from './navigation/index.js';
|
|
25
|
-
export type { NavigationFile, BuildOptions as NavigationBuildOptions, NavigationAnswer, AnswerEntry, UnresolvedEntry, UnresolvedReason, CallSite, Tier, Query as NavigationQuery, QueryKind, QueryOptions as NavigationQueryOptions, Scope as NavigationScope, Timing as NavigationTiming, } from './navigation/index.js';
|
|
31
|
+
export { buildNavigationIndex, NavigationIndex, buildTsCallGraph, TS_CALL_EDGES_SCHEME, COMPUTED_MODULE_LOAD, DEFAULT_ENTRY_TABLES, buildJavaGraph, JAVA_GRAPH_SCHEME, DEFAULT_JAVA_ENTRY_TABLES, buildPythonGraph, PYTHON_GRAPH_SCHEME, buildGoGraph, GO_GRAPH_SCHEME, } from './navigation/index.js';
|
|
32
|
+
export type { NavigationFile, BuildOptions as NavigationBuildOptions, NavigationAnswer, AnswerEntry, UnresolvedEntry, UnresolvedReason, CallSite, Tier, Query as NavigationQuery, QueryKind, QueryOptions as NavigationQueryOptions, Scope as NavigationScope, Timing as NavigationTiming, TsSourceFile, TsCallGraphOptions, TsCallGraph, CallEdge, CallEdgeSite, UnresolvedCall, TsPackageManifest, TsEntry, UnresolvedRegistration, ReferenceEdge, FieldUseEdge, ImportEdge, LoadEdge, EntryKind, EntryCertainty, EntryTables, ScriptTable, ToolFileRow, ExpoTable, JavaSourceFile, JavaGraphOptions, JavaGraph, JavaEntryTables, PythonSourceFile, PythonGraphOptions, PythonGraph, GoSourceFile, GoGraphOptions, GoGraph, IndexedCallSite, IndexedTarget, } from './navigation/index.js';
|
|
33
|
+
export { REACH_SCHEME, reach, DEAD_CODE_SCHEME, deadCode, REMOVAL_REACH_SCHEME, removalReach, entryIndexDigest, partialFileDetails, DEPENDENCY_CALLS_SCHEME, dependencyCalls, MAVEN_PACKAGE_FALLBACK, UnknownArtifact, jarPackages, mavenArtifact, mavenPackages, zipEntryNames } from './graph-facts/index.js';
|
|
34
|
+
export type { DependencyCallsOptions, DependencyCall, DependencyCallTest, DependencyCallsResult, DependencyUnattributedSite, MavenPackages, MavenPackageSource, ReachInput, ReachOptions, ReachResult, ReachFact, ReachPath, PathStep, CouldReachSite, DeadCodeVerdict, DeadCodeFact, DeadCodeOptions, DeadCodeResult, RemovedDeclaration, MoveCandidateRef, RemovalReachOptions, RemovalReachResult, PartialFile, } from './graph-facts/index.js';
|
|
35
|
+
export { STABLE_ID_SCHEME, deriveStableIds, deriveTypeScriptIds, stableIdsSupport, moduleNameFor, assignNodeIds, diffStableIds, deriveJavaIds, eraseJavaType, derivePythonIds, pythonModuleName, deriveGoIds, goPackageDir, detectMoves, bodySimilarity, } from './stable-ids/index.js';
|
|
36
|
+
export type { StableIdScheme, StableDecl, StableDeclKind, StableIdFlag, StableIdFile, StableIdOptions, StableNodeIds, ParseErrorSite, NodeIdSource, StableIdDiff, MoveRelation, MoveEvidence, CandidateEvidence, StableIdMove, MoveCandidate, MoveOptions, MoveDetection, } from './stable-ids/index.js';
|
|
37
|
+
export { SAFE_CONSTRUCT_TABLE_FORMAT, loadSafeConstructTable, sha256Bytes, sha256Digest, remedyClassOf, TableRefused, htmlContextAt, markupBefore, javaStringLiterals, } from './remedy-class/index.js';
|
|
38
|
+
export type { ArgPosition, ArgIs, StepRole, MatchStep, TableCall, TableTemplate, TableSink, TableSource, ConstructClass, ConstructRow, SafeConstructTable, TableProblem, TableProblemCode, LoadTableResult, TypeMatch, StepObservation, MatchedRow, RemedyMatch, RemedyReason, RemedySinkObservation, RemedyClassResult, RemedyClassOptions, OutputContext, } from './remedy-class/index.js';
|
|
39
|
+
export { PATH_KEY_SCHEME, pathSetOf, pathSetDiff, diffPathSets, pinFacts, pathKey, declAt, changeOf, normalizeCwe, lineDominates, deriveBranchFacts, sideOf, deriveTemplateFacts, templateEngineOf, expressionNames, handedNames, findingDiff, diffLines, splitLines, } from './path-set/index.js';
|
|
40
|
+
export type { FindingDiff, FindingDiffSide, NewFinding, MatchedBy, LineDiff, PathSetInput, PathSetOptions, DeclKeyScheme, DeclRef, PathHop, PathEnd, PathSource, PathSink, PathGuard, PathUnresolved, UnresolvedSite, PathState, PathEntry, BranchFact, BranchCall, BranchRange, BranchSide, TemplateFact, TemplateEngine, TemplateUse, PathSet, PathChange, PathDiffEntry, PinFacts, PathSetDiff, } from './path-set/index.js';
|
|
26
41
|
export { getLanguageRegistry, registerLanguage, getLanguagePlugin, getLanguageForFile, detectLanguage, isLanguageSupported, registerBuiltinPlugins, JavaPlugin, JavaScriptPlugin, PythonPlugin, RustPlugin, HtmlPlugin, BaseLanguagePlugin, } from './languages/index.js';
|
|
27
42
|
export type { LanguagePlugin, LanguageRegistry, LanguageNodeTypes, ExtractionContext, FrameworkInfo, TaintSourcePattern, TaintSinkPattern, } from './languages/index.js';
|
|
28
43
|
export { logger, setLogger, configureLogger, setLogLevel, getLogLevel, type LogLevel, type LoggerConfig, type LoggerInstance, } from './utils/logger.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,YAAY,EACZ,OAAO,EACP,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,MAAM,GACP,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,YAAY,EACZ,OAAO,EACP,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,KAAK,eAAe,GACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,8BAA8B,EAC9B,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,EACb,WAAW,EACX,MAAM,GACP,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,UA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AAC;AAG9B,OAAO,EACL,MAAM,EACN,SAAS,EACT,eAAe,EACf,WAAW,EACX,WAAW,EACX,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
* A universal library for static analysis and taint tracking.
|
|
5
5
|
*/
|
|
6
6
|
// Main analyzer
|
|
7
|
-
export { initAnalyzer, analyze, analyzeForAPI, analyzeProject, isAnalyzerInitialized, resetAnalyzer, } from './analyzer.js';
|
|
7
|
+
export { initAnalyzer, analyze, analyzeForAPI, analyzeProject, isAnalyzerInitialized, AnalysisTimeoutError, resetAnalyzer, } from './analyzer.js';
|
|
8
8
|
// SBOM generation (deterministic — CycloneDX 1.5 / SPDX 2.3 from manifests)
|
|
9
|
-
export { parseNpmDependencies, parseNpmLockDependencies, parsePypiDependencies, parsePyprojectDependencies, parseMavenDependencies, parseGradleDependencies, parseCargoDependencies, parseCargoLockDependencies, parsePoetryLockDependencies, parseGoDependencies, collectDependencies, toCycloneDx, toSpdx, } from './analysis/sbom.js';
|
|
9
|
+
export { parseNpmDependencies, parseNpmLockDependencies, parsePnpmLockDependencies, parseYarnLockDependencies, pnpmLockImporters, parsePypiDependencies, parsePyprojectDependencies, parseMavenDependencies, parseGradleDependencies, parseGradleLockfile, parseMavenResolvedDependencies, parseCargoDependencies, parseCargoLockDependencies, parsePoetryLockDependencies, parseGoDependencies, collectDependencies, licenseFromPackageJson, applyLicenses, toCycloneDx, toSpdx, } from './analysis/sbom.js';
|
|
10
|
+
// Known-vulnerability matching against caller-supplied OSV records (deterministic)
|
|
11
|
+
export { compareMavenVersions, canonicalMavenVersion } from './analysis/maven-version.js';
|
|
12
|
+
export { compareSemver, parseSemver } from './analysis/semver-version.js';
|
|
13
|
+
export { MavenDeclaredIndex } from './analysis/maven-declared.js';
|
|
14
|
+
export { parseOsvRecord, buildAdvisoryIndex, matchAdvisories, rangeIntervals, isConcreteVersion, diffAdvisoryMatches, diffDependencySets, ADVISORY_ECOSYSTEMS, } from './analysis/advisories.js';
|
|
10
15
|
// Runtime values, not just types. `SourceType` / `SinkType` above are
|
|
11
16
|
// `export type`, so re-exporting the unions alone gives consumers nothing to
|
|
12
17
|
// import at runtime — which is exactly what happened in 3.197.0, where the
|
|
@@ -35,7 +40,19 @@ export { TypeHierarchyResolver, createWithJdkTypes, SymbolTable, buildSymbolTabl
|
|
|
35
40
|
// Navigation queries — callers and callees, each answer carrying its tier and
|
|
36
41
|
// each non-answer its reason. Additive: nothing in the resolution path above
|
|
37
42
|
// changes, because the SAST passes and the taint corpora depend on it exactly.
|
|
38
|
-
export { buildNavigationIndex, NavigationIndex, } from './navigation/index.js';
|
|
43
|
+
export { buildNavigationIndex, NavigationIndex, buildTsCallGraph, TS_CALL_EDGES_SCHEME, COMPUTED_MODULE_LOAD, DEFAULT_ENTRY_TABLES, buildJavaGraph, JAVA_GRAPH_SCHEME, DEFAULT_JAVA_ENTRY_TABLES, buildPythonGraph, PYTHON_GRAPH_SCHEME, buildGoGraph, GO_GRAPH_SCHEME, } from './navigation/index.js';
|
|
44
|
+
// Graph facts over stable ids (experimental): the reach core and dead code.
|
|
45
|
+
export { REACH_SCHEME, reach, DEAD_CODE_SCHEME, deadCode, REMOVAL_REACH_SCHEME, removalReach, entryIndexDigest, partialFileDetails, DEPENDENCY_CALLS_SCHEME, dependencyCalls, MAVEN_PACKAGE_FALLBACK, UnknownArtifact, jarPackages, mavenArtifact, mavenPackages, zipEntryNames } from './graph-facts/index.js';
|
|
46
|
+
// Stable code ids (ids@0.1, experimental and opt-in): declaration ids from
|
|
47
|
+
// qualified name + signature, body ids from a normalized body hash, node ids
|
|
48
|
+
// scoped to one body. TypeScript/JavaScript only; analyze() does not call it.
|
|
49
|
+
export { STABLE_ID_SCHEME, deriveStableIds, deriveTypeScriptIds, stableIdsSupport, moduleNameFor, assignNodeIds, diffStableIds, deriveJavaIds, eraseJavaType, derivePythonIds, pythonModuleName, deriveGoIds, goPackageDir, detectMoves, bodySimilarity, } from './stable-ids/index.js';
|
|
50
|
+
// Remedy-class tables: reader and digest for caller-supplied
|
|
51
|
+
// `safe-construct-table@0.1` inputs (the library ships no table).
|
|
52
|
+
export { SAFE_CONSTRUCT_TABLE_FORMAT, loadSafeConstructTable, sha256Bytes, sha256Digest, remedyClassOf, TableRefused, htmlContextAt, markupBefore, javaStringLiterals, } from './remedy-class/index.js';
|
|
53
|
+
// Path sets: every source-to-sink path of one CWE, keyed across versions of a
|
|
54
|
+
// tree, and the difference between two versions.
|
|
55
|
+
export { PATH_KEY_SCHEME, pathSetOf, pathSetDiff, diffPathSets, pinFacts, pathKey, declAt, changeOf, normalizeCwe, lineDominates, deriveBranchFacts, sideOf, deriveTemplateFacts, templateEngineOf, expressionNames, handedNames, findingDiff, diffLines, splitLines, } from './path-set/index.js';
|
|
39
56
|
// Language plugins
|
|
40
57
|
export { getLanguageRegistry, registerLanguage, getLanguagePlugin, getLanguageForFile, detectLanguage, isLanguageSupported, registerBuiltinPlugins, JavaPlugin, JavaScriptPlugin, PythonPlugin, RustPlugin, HtmlPlugin, BaseLanguagePlugin, } from './languages/index.js';
|
|
41
58
|
// Logger (dependency injection)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gBAAgB;AAChB,OAAO,EACL,YAAY,EACZ,OAAO,EACP,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,aAAa,GAEd,MAAM,eAAe,CAAC;AAEvB,4EAA4E;AAC5E,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,MAAM,GACP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AmB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Go graph facts keyed by stable ids (`go-graph@0.1`): the reach core's
|
|
3
|
+
* input for Go.
|
|
4
|
+
*
|
|
5
|
+
* - **Declarations** from `deriveGoIds` (`ids@0.1`); a package is a directory.
|
|
6
|
+
* - **Call edges**, resolved from the syntax tree:
|
|
7
|
+
* - `exact`: a function of the same package, `pkg.F` through an import of
|
|
8
|
+
* a project package, `recv.M` on the method's own receiver, `T.M` method
|
|
9
|
+
* expressions, and `T{}` / `&T{}` composite literals (a reference to `T`).
|
|
10
|
+
* - `inferred`: `x.M` on a value of unknown type reaches every project
|
|
11
|
+
* method named `M`, up to `maxInferred`; beyond it the site is unresolved.
|
|
12
|
+
* A target outside the project (the standard library, modules) is an
|
|
13
|
+
* unresolved `external` site, never dropped.
|
|
14
|
+
* - **References**: a project function or method used as a value (a handler
|
|
15
|
+
* passed to a router, a callback).
|
|
16
|
+
* - **Imports**: a file loads the project packages it imports; a package's
|
|
17
|
+
* files load each other.
|
|
18
|
+
* - **Entries** (`entry-index@0.1`): `main` in package `main`, `init`,
|
|
19
|
+
* net/http (`HandleFunc`, `Handle`, Go 1.22 method patterns), gin, echo and
|
|
20
|
+
* chi routes with group and route prefixes composed, `_test.go` tests,
|
|
21
|
+
* benchmarks, examples and fuzz targets, and the exported API of packages
|
|
22
|
+
* the caller names as libraries.
|
|
23
|
+
* - **typeOnly**: interface types.
|
|
24
|
+
*
|
|
25
|
+
* Library code: no file access; the caller passes the sources.
|
|
26
|
+
*/
|
|
27
|
+
import type { StableIdFile } from '../stable-ids/types.js';
|
|
28
|
+
import type { CallEdge, ImportEdge, ReferenceEdge, TsEntry, UnresolvedCall, UnresolvedRegistration } from './ts-call-edges.js';
|
|
29
|
+
export declare const GO_GRAPH_SCHEME: 'go-graph@0.1';
|
|
30
|
+
export interface GoSourceFile {
|
|
31
|
+
/** Repository-relative path, `/`-separated. */
|
|
32
|
+
path: string;
|
|
33
|
+
code: string;
|
|
34
|
+
}
|
|
35
|
+
export interface GoGraphOptions {
|
|
36
|
+
/** The module path from `go.mod` (`example.com/app`); imports under it map to directories. Without it, imports map by directory suffix. */
|
|
37
|
+
modulePath?: string;
|
|
38
|
+
/** Package directories whose exported functions, types and methods are `export` entries (a library's API). */
|
|
39
|
+
libraryPackages?: readonly string[];
|
|
40
|
+
/** Most `inferred` edges one site may carry; beyond it the site is unresolved. Default 16. */
|
|
41
|
+
maxInferred?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface GoGraph {
|
|
44
|
+
scheme: typeof GO_GRAPH_SCHEME;
|
|
45
|
+
ids: 'ids@0.1';
|
|
46
|
+
files: StableIdFile[];
|
|
47
|
+
edges: CallEdge[];
|
|
48
|
+
unresolved: UnresolvedCall[];
|
|
49
|
+
references: ReferenceEdge[];
|
|
50
|
+
imports: ImportEdge[];
|
|
51
|
+
loads: {
|
|
52
|
+
from: string;
|
|
53
|
+
to: string;
|
|
54
|
+
}[];
|
|
55
|
+
entryScheme: 'entry-index@0.1';
|
|
56
|
+
entries: TsEntry[];
|
|
57
|
+
unresolvedRegistrations: UnresolvedRegistration[];
|
|
58
|
+
partial: string[];
|
|
59
|
+
typeOnly: string[];
|
|
60
|
+
/** Call sites walked; equals the distinct sites over `edges` and `unresolved`. */
|
|
61
|
+
sites: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Build the Go graph facts for a set of files. Each file is parsed once;
|
|
65
|
+
* nothing is read from disk.
|
|
66
|
+
*/
|
|
67
|
+
export declare function buildGoGraph(files: readonly GoSourceFile[], options?: GoGraphOptions): Promise<GoGraph>;
|
|
68
|
+
//# sourceMappingURL=go-graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"go-graph.d.ts","sourceRoot":"","sources":["../../src/navigation/go-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAMH,OAAO,KAAK,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