@clear-capabilities/agentic-security-scanner 0.172.1 → 0.173.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/bin/agentic-security.js +37 -0
  3. package/dist/119.index.js +197 -0
  4. package/dist/128.index.js +129 -0
  5. package/dist/1293.index.js +5689 -0
  6. package/dist/1351.index.js +133 -0
  7. package/dist/1387.index.js +271 -0
  8. package/dist/1437.index.js +23 -0
  9. package/dist/1445.index.js +110 -0
  10. package/dist/1505.index.js +151 -0
  11. package/dist/1557.index.js +293 -0
  12. package/dist/1621.index.js +311 -0
  13. package/dist/1751.index.js +160 -0
  14. package/dist/1765.index.js +727 -0
  15. package/dist/1861.index.js +690 -0
  16. package/dist/1898.index.js +116 -0
  17. package/dist/1906.index.js +433 -0
  18. package/dist/1920.index.js +1 -291
  19. package/dist/208.index.js +1631 -0
  20. package/dist/2199.index.js +0 -239
  21. package/dist/2223.index.js +159 -0
  22. package/dist/2530.index.js +152 -0
  23. package/dist/2565.index.js +116 -0
  24. package/dist/2574.index.js +127 -0
  25. package/dist/2620.index.js +345 -0
  26. package/dist/2773.index.js +98 -0
  27. package/dist/2775.index.js +32 -0
  28. package/dist/2966.index.js +171 -0
  29. package/dist/2972.index.js +87 -0
  30. package/dist/2991.index.js +131 -0
  31. package/dist/3063.index.js +833 -0
  32. package/dist/3075.index.js +227 -0
  33. package/dist/3121.index.js +297 -0
  34. package/dist/3314.index.js +263 -0
  35. package/dist/3480.index.js +1822 -0
  36. package/dist/3481.index.js +24 -0
  37. package/dist/3506.index.js +268 -0
  38. package/dist/3533.index.js +591 -0
  39. package/dist/3653.index.js +450 -0
  40. package/dist/3822.index.js +131 -0
  41. package/dist/3868.index.js +292 -0
  42. package/dist/3917.index.js +152 -0
  43. package/dist/3918.index.js +192 -0
  44. package/dist/4090.index.js +288 -0
  45. package/dist/4121.index.js +1190 -0
  46. package/dist/4142.index.js +0 -239
  47. package/dist/4336.index.js +436 -0
  48. package/dist/4387.index.js +532 -0
  49. package/dist/4413.index.js +302 -0
  50. package/dist/4476.index.js +4510 -0
  51. package/dist/4491.index.js +133 -0
  52. package/dist/4538.index.js +185 -0
  53. package/dist/4684.index.js +319 -0
  54. package/dist/4740.index.js +165 -0
  55. package/dist/4780.index.js +209 -0
  56. package/dist/4802.index.js +225 -0
  57. package/dist/4812.index.js +379 -0
  58. package/dist/4835.index.js +126 -0
  59. package/dist/494.index.js +226 -0
  60. package/dist/4991.index.js +549 -0
  61. package/dist/5199.index.js +305 -0
  62. package/dist/5216.index.js +109 -0
  63. package/dist/5439.index.js +301 -0
  64. package/dist/5443.index.js +97 -0
  65. package/dist/5496.index.js +377 -0
  66. package/dist/550.index.js +2 -1
  67. package/dist/5801.index.js +588 -0
  68. package/dist/5858.index.js +223 -0
  69. package/dist/5933.index.js +143 -0
  70. package/dist/601.index.js +23 -0
  71. package/dist/6173.index.js +273 -0
  72. package/dist/6291.index.js +1871 -0
  73. package/dist/6312.index.js +666 -0
  74. package/dist/634.index.js +16182 -0
  75. package/dist/644.index.js +87 -0
  76. package/dist/6508.index.js +283 -0
  77. package/dist/6560.index.js +645 -0
  78. package/dist/6576.index.js +422 -0
  79. package/dist/6579.index.js +271 -0
  80. package/dist/6745.index.js +305 -0
  81. package/dist/6818.index.js +21642 -0
  82. package/dist/6972.index.js +167 -0
  83. package/dist/6995.index.js +163 -0
  84. package/dist/7249.index.js +191 -0
  85. package/dist/7372.index.js +1197 -0
  86. package/dist/7546.index.js +541 -0
  87. package/dist/76.index.js +448 -0
  88. package/dist/7879.index.js +163 -0
  89. package/dist/8025.index.js +130 -0
  90. package/dist/8054.index.js +248 -0
  91. package/dist/8097.index.js +201 -0
  92. package/dist/8126.index.js +191 -0
  93. package/dist/8178.index.js +78 -0
  94. package/dist/818.index.js +212 -0
  95. package/dist/8382.index.js +93 -0
  96. package/dist/8408.index.js +261 -0
  97. package/dist/8540.index.js +174 -0
  98. package/dist/8635.index.js +802 -0
  99. package/dist/8688.index.js +410 -0
  100. package/dist/8699.index.js +779 -0
  101. package/dist/8891.index.js +457 -0
  102. package/dist/8916.index.js +885 -0
  103. package/dist/9146.index.js +170 -0
  104. package/dist/9168.index.js +841 -0
  105. package/dist/9292.index.js +369 -0
  106. package/dist/9382.index.js +135 -11
  107. package/dist/9422.index.js +866 -0
  108. package/dist/9440.index.js +453 -0
  109. package/dist/9479.index.js +152 -0
  110. package/dist/9481.index.js +220 -0
  111. package/dist/9539.index.js +100 -0
  112. package/dist/9547.index.js +103 -0
  113. package/dist/9560.index.js +41 -61
  114. package/dist/9692.index.js +90 -0
  115. package/dist/9800.index.js +213 -1
  116. package/dist/9899.index.js +138 -0
  117. package/dist/9981.index.js +206 -0
  118. package/dist/999.index.js +117 -0
  119. package/dist/agentic-security.mjs +27 -27
  120. package/dist/agentic-security.mjs.sha256 +1 -1
  121. package/package.json +28 -3
  122. package/src/context-intelligence/candidates.js +2 -1
  123. package/src/context-intelligence/capabilities.js +2 -1
  124. package/src/context-intelligence/cli.js +2 -0
  125. package/src/context-intelligence/config.js +3 -1
  126. package/src/context-intelligence/controls.js +49 -1
  127. package/src/context-intelligence/counterexample.js +200 -0
  128. package/src/context-intelligence/cross-route.js +111 -0
  129. package/src/context-intelligence/findings.js +166 -0
  130. package/src/context-intelligence/invariants.js +197 -0
  131. package/src/context-intelligence/queue.js +6 -1
  132. package/src/context-intelligence/reachability.js +2 -2
  133. package/src/context-intelligence/review.js +68 -4
  134. package/src/dataflow/access-paths.js +11 -0
  135. package/src/dataflow/analysis-limits.js +66 -0
  136. package/src/dataflow/engine.js +272 -20
  137. package/src/dataflow/service-edges.js +174 -0
  138. package/src/dataflow/summaries.js +7 -1
  139. package/src/discovery/judge.js +2 -1
  140. package/src/engine.js +82 -14
  141. package/src/fix/apply-fix-service.js +55 -8
  142. package/src/fix/batch-journal.js +84 -0
  143. package/src/fix/exploit-replay.js +51 -0
  144. package/src/fix/footprint.js +65 -0
  145. package/src/fix/patch-policy.js +49 -0
  146. package/src/fix/secret-persistence.js +39 -0
  147. package/src/fix/test-commands.js +84 -0
  148. package/src/fix/verification-adapters.js +97 -0
  149. package/src/fix/verification-record.js +243 -0
  150. package/src/fix/verify-patch.js +89 -0
  151. package/src/ir/CLAUDE.md +5 -0
  152. package/src/ir/callgraph.js +23 -1
  153. package/src/ir/module-resolver.js +315 -0
  154. package/src/ir/parser-js.js +21 -2
  155. package/src/ir/semantic-graph.js +245 -0
  156. package/src/lineage/build-attested-correlation.js +63 -0
  157. package/src/lineage/deployment-identity.js +76 -0
  158. package/src/mcp/tools.js +13 -34
  159. package/src/pipeline/canonical-output.js +64 -0
  160. package/src/pipeline/detector-runner.js +7 -0
  161. package/src/pipeline/scan-health.js +14 -0
  162. package/src/pipeline/supervised-analyzers.js +125 -0
  163. package/src/pipeline/supervised-child.js +17 -0
  164. package/src/pipeline/telemetry.js +79 -0
  165. package/src/posture/accuracy-scorecard.js +98 -9
  166. package/src/posture/artifact-registry.js +5 -0
  167. package/src/posture/assurance/evidence-registry.js +215 -0
  168. package/src/posture/assurance/release-package-verify.js +135 -0
  169. package/src/posture/assurance/release-package.js +118 -0
  170. package/src/posture/assurance/release-verdict.js +94 -0
  171. package/src/posture/assurance/waiver.js +200 -0
  172. package/src/posture/compliance-truth.js +100 -0
  173. package/src/posture/evaluation/scan-child.js +3 -1
  174. package/src/posture/evaluation/why-missed.js +3 -1
  175. package/src/posture/exploitability-evidence.js +141 -0
  176. package/src/posture/fix-verify.js +4 -2
  177. package/src/posture/fleet/exposure-ranking.js +115 -0
  178. package/src/posture/fleet/service-chain-graph.js +150 -0
  179. package/src/posture/graph-reconciliation.js +154 -0
  180. package/src/posture/provenance/coverage.js +103 -0
  181. package/src/posture/provenance/git-evidence.js +84 -0
  182. package/src/posture/provenance/origin-resolver.js +7 -1
  183. package/src/posture/provenance/predicate-replay.js +14 -4
  184. package/src/posture/runtime-correlation.js +61 -15
  185. package/src/posture/runtime-explanation.js +116 -0
  186. package/src/posture/runtime-trace-ingest.js +194 -0
  187. package/src/posture/scan-checkpoint.js +38 -10
  188. package/src/posture/waf-ingest.js +7 -2
  189. package/src/report/index.js +4 -0
  190. package/src/report/oscal.js +38 -0
  191. package/src/report/perspectives.js +150 -0
  192. package/src/sast/_comment-strip.js +8 -1
  193. package/src/sast/ruby.js +26 -0
  194. package/src/util/string-memo.js +38 -0
@@ -0,0 +1,288 @@
1
+ export const id = 4090;
2
+ export const ids = [4090];
3
+ export const modules = {
4
+
5
+ /***/ 44090:
6
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7
+
8
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
+ /* harmony export */ augmentReachabilityViaImports: () => (/* binding */ augmentReachabilityViaImports)
10
+ /* harmony export */ });
11
+ /* unused harmony exports languageOfFile, pkgMatches, extractJsImports, extractPyImports, extractImports, findImportAwareCallSites */
12
+ /* harmony import */ var _sast_comment_strip_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98106);
13
+ // R7 — import-aware SCA function-reachability (JS/TS + Python).
14
+ //
15
+ // The default reachability pass (engine.js#markUsedVulnFunctions) is a regex
16
+ // over `pkg.fn` / bare function names. It has two documented failure modes:
17
+ // - FALSE NEGATIVE on aliased / namespace imports:
18
+ // import { merge as deepMerge } from 'lodash'; deepMerge(a, b) // missed
19
+ // import * as _ from 'lodash'; _.merge(a, b) // member ok
20
+ // - FALSE POSITIVE on coincidental names: a bare `parse(` in a file that never
21
+ // imports the vulnerable package is matched anyway.
22
+ //
23
+ // This module parses the import statements of each JS/TS and Python file into an
24
+ // alias map, then finds call sites of a package's vulnerable functions resolved
25
+ // THROUGH that map and GATED to files that actually import the package. It does
26
+ // not decide `functionReachable` itself — it augments `vulnerableFunctionCallSites`
27
+ // so the existing route-reachability classifier (which distinguishes
28
+ // reachable / unreachable / unknown) sees the calls the regex missed.
29
+ //
30
+ // Other ecosystems keep the regex pass (this module is a no-op for them).
31
+
32
+
33
+
34
+ const JS_RE = /\.(?:m|c)?[jt]sx?$/i;
35
+ const PY_RE = /\.py$/i;
36
+
37
+ function languageOfFile(file) {
38
+ if (JS_RE.test(file)) return 'js';
39
+ if (PY_RE.test(file)) return 'py';
40
+ return null;
41
+ }
42
+
43
+ // Normalize an import source to a package base name.
44
+ // '@scope/pkg/sub' -> '@scope/pkg' 'pkg/sub' -> 'pkg' (npm)
45
+ // 'pkg.sub.mod' -> 'pkg' (python)
46
+ function pkgBase(source, lang) {
47
+ let s = String(source || '').trim();
48
+ if (lang === 'py') return s.split('.')[0];
49
+ if (s.startsWith('@')) {
50
+ const parts = s.split('/');
51
+ return parts.slice(0, 2).join('/');
52
+ }
53
+ return s.split('/')[0];
54
+ }
55
+
56
+ // Loose package-name equivalence. npm is case-sensitive; PyPI dist names differ
57
+ // from import names by case and -/_ (PyYAML→yaml is NOT covered — that needs a
58
+ // dist→import table; documented limitation).
59
+ function pkgMatches(depName, importedPkg, lang) {
60
+ if (!depName || !importedPkg) return false;
61
+ if (depName === importedPkg) return true;
62
+ if (lang === 'py') {
63
+ const norm = (x) => x.toLowerCase().replace(/[-_.]/g, '');
64
+ return norm(depName) === norm(importedPkg);
65
+ }
66
+ return false;
67
+ }
68
+
69
+ // Split a named-imports clause body ("a, b as c, default as d") into pairs.
70
+ function parseNamedClause(body) {
71
+ const out = [];
72
+ for (const raw of body.split(',')) {
73
+ const t = raw.trim();
74
+ if (!t) continue;
75
+ const m = t.match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);
76
+ if (m) out.push({ imported: m[1], local: m[2] });
77
+ else if (/^[A-Za-z_$][\w$]*$/.test(t)) out.push({ imported: t, local: t });
78
+ }
79
+ return out;
80
+ }
81
+
82
+ /**
83
+ * Parse JS/TS imports into:
84
+ * named: Map<localName, { pkg, imported }>
85
+ * ns: Map<localName, pkg> (namespace/default whole-module binding)
86
+ * packages: Set<pkg>
87
+ * Handles ESM (named / default / namespace) and CJS require (destructure / whole).
88
+ */
89
+ function extractJsImports(content) {
90
+ const code = (0,_sast_comment_strip_js__WEBPACK_IMPORTED_MODULE_0__/* .blankComments */ .$)(content);
91
+ const named = new Map();
92
+ const ns = new Map();
93
+ const packages = new Set();
94
+ const add = (pkg) => { if (pkg) packages.add(pkg); };
95
+
96
+ // ESM: import ... from 'pkg'
97
+ const esm = /\bimport\s+([^;'"]+?)\s+from\s*['"]([^'"]+)['"]/g;
98
+ let m;
99
+ while ((m = esm.exec(code))) {
100
+ const clause = m[1].trim();
101
+ const pkg = pkgBase(m[2], 'js');
102
+ add(pkg);
103
+ // namespace: * as ns
104
+ const nsM = clause.match(/\*\s+as\s+([A-Za-z_$][\w$]*)/);
105
+ if (nsM) ns.set(nsM[1], pkg);
106
+ // named: { ... }
107
+ const braceM = clause.match(/\{([^}]*)\}/);
108
+ if (braceM) for (const p of parseNamedClause(braceM[1])) named.set(p.local, { pkg, imported: p.imported });
109
+ // default: leading bare identifier (before any { or *)
110
+ const defM = clause.match(/^([A-Za-z_$][\w$]*)\s*(?:,|$)/);
111
+ if (defM && !nsM) ns.set(defM[1], pkg);
112
+ }
113
+ // CJS: const X = require('pkg') / const { a, b: c } = require('pkg')
114
+ const cjs = /(?:const|let|var)\s+(\{[^}]*\}|[A-Za-z_$][\w$]*)\s*=\s*require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
115
+ while ((m = cjs.exec(code))) {
116
+ const bind = m[1].trim();
117
+ const pkg = pkgBase(m[2], 'js');
118
+ add(pkg);
119
+ if (bind.startsWith('{')) {
120
+ // require destructure uses `orig: local`
121
+ for (const raw of bind.slice(1, -1).split(',')) {
122
+ const t = raw.trim(); if (!t) continue;
123
+ const mm = t.match(/^([A-Za-z_$][\w$]*)\s*:\s*([A-Za-z_$][\w$]*)$/);
124
+ if (mm) named.set(mm[2], { pkg, imported: mm[1] });
125
+ else if (/^[A-Za-z_$][\w$]*$/.test(t)) named.set(t, { pkg, imported: t });
126
+ }
127
+ } else {
128
+ ns.set(bind, pkg);
129
+ }
130
+ }
131
+ return { named, ns, packages };
132
+ }
133
+
134
+ /**
135
+ * Parse Python imports. Same return shape as extractJsImports.
136
+ * from pkg import a, b as c -> named: a->{pkg,a}, c->{pkg,b}
137
+ * from pkg.sub import a -> named: a->{pkg,a} (pkg base)
138
+ * import pkg / import pkg as p -> ns: pkg->pkg / p->pkg
139
+ */
140
+ function extractPyImports(content) {
141
+ const code = (0,_sast_comment_strip_js__WEBPACK_IMPORTED_MODULE_0__/* .blankComments */ .$)(content);
142
+ const named = new Map();
143
+ const ns = new Map();
144
+ const packages = new Set();
145
+
146
+ const from = /^[ \t]*from\s+([A-Za-z_][\w.]*)\s+import\s+(.+)$/gm;
147
+ let m;
148
+ while ((m = from.exec(code))) {
149
+ const pkg = pkgBase(m[1], 'py');
150
+ packages.add(pkg);
151
+ let names = m[2].trim();
152
+ if (names === '*') continue;
153
+ names = names.replace(/[()]/g, '');
154
+ for (const p of parseNamedClause(names)) named.set(p.local, { pkg, imported: p.imported });
155
+ }
156
+ const imp = /^[ \t]*import\s+(.+)$/gm;
157
+ while ((m = imp.exec(code))) {
158
+ if (/^\s*import\s+/.test(m[0]) && /\bfrom\b/.test(m[0])) continue;
159
+ for (const raw of m[1].split(',')) {
160
+ const t = raw.trim(); if (!t) continue;
161
+ const mm = t.match(/^([A-Za-z_][\w.]*)(?:\s+as\s+([A-Za-z_]\w*))?$/);
162
+ if (!mm) continue;
163
+ const pkg = pkgBase(mm[1], 'py');
164
+ packages.add(pkg);
165
+ ns.set(mm[2] || mm[1].split('.')[0], pkg);
166
+ }
167
+ }
168
+ return { named, ns, packages };
169
+ }
170
+
171
+ function extractImports(content, lang) {
172
+ return lang === 'py' ? extractPyImports(content) : extractJsImports(content);
173
+ }
174
+
175
+ /**
176
+ * Find call sites in `content` of `vulnFns` belonging to `pkg`, resolved through
177
+ * this file's import map. Returns [{ fn, line, via }]. Empty if the file does
178
+ * not import `pkg` (the precision gate).
179
+ */
180
+ function findImportAwareCallSites(content, lang, imports, pkg, vulnFns) {
181
+ if (!imports || !vulnFns || !vulnFns.length) return [];
182
+ const importsPkg = [...imports.packages].some((p) => pkgMatches(pkg, p, lang));
183
+ if (!importsPkg) return [];
184
+ const want = new Set(vulnFns);
185
+ const code = (0,_sast_comment_strip_js__WEBPACK_IMPORTED_MODULE_0__/* .blankComments */ .$)(content);
186
+ const lines = code.split('\n');
187
+ const sites = [];
188
+ const lineOf = (idx) => code.slice(0, idx).split('\n').length;
189
+
190
+ // 1) named/aliased imports: localName bound to {pkg, imported} where imported ∈ want
191
+ for (const [local, info] of imports.named) {
192
+ if (!pkgMatches(pkg, info.pkg, lang)) continue;
193
+ if (!want.has(info.imported)) continue;
194
+ const re = new RegExp(`\\b${local.replace(/[$]/g, '\\$&')}\\s*\\(`, 'g');
195
+ let mm;
196
+ while ((mm = re.exec(code))) sites.push({ fn: info.imported, line: lineOf(mm.index), via: local === info.imported ? 'named' : 'alias' });
197
+ }
198
+ // 2) namespace/default member access: ns.fn( where ns→pkg and fn ∈ want
199
+ for (const [local, p] of imports.ns) {
200
+ if (!pkgMatches(pkg, p, lang)) continue;
201
+ for (const fn of want) {
202
+ const sep = lang === 'py' ? '\\.' : '\\.';
203
+ const re = new RegExp(`\\b${local.replace(/[$]/g, '\\$&')}\\s*${sep}\\s*${fn.replace(/[^\w]/g, '\\$&')}\\s*\\(`, 'g');
204
+ let mm;
205
+ while ((mm = re.exec(code))) sites.push({ fn, line: lineOf(mm.index), via: 'namespace' });
206
+ }
207
+ }
208
+ // Dedup by fn+line.
209
+ const seen = new Set();
210
+ return sites.filter((s) => { const k = `${s.fn}:${s.line}`; if (seen.has(k)) return false; seen.add(k); return true; });
211
+ }
212
+
213
+ /**
214
+ * Augment supplyChain findings (npm/pypi only) with import-aware call sites the
215
+ * regex pass missed, gated to files that import the package. Additive: it never
216
+ * removes existing sites, so it cannot regress the route-reachability classifier
217
+ * that runs next — it only gives it more (and more accurate) call sites.
218
+ *
219
+ * Mutates and returns `supplyChain`. Records `sc._importAwareCallSites` (count)
220
+ * for observability.
221
+ */
222
+ function augmentReachabilityViaImports(supplyChain, fileContents, vulnFnHints = {}) {
223
+ if (!Array.isArray(supplyChain)) return supplyChain;
224
+ // Collect the hardcoded/generated hint function names for a package. The
225
+ // hint map is keyed by `pkg` and by versioned `pkg@range` (and packages may
226
+ // be scoped `@scope/pkg`). The vulnerability decision already happened
227
+ // upstream; here we only need candidate function NAMES to locate call sites,
228
+ // so we gather version-agnostically.
229
+ const hintFnsFor = (name) => {
230
+ const out = [];
231
+ for (const [k, v] of Object.entries(vulnFnHints || {})) {
232
+ if (!Array.isArray(v)) continue;
233
+ const atIdx = k.lastIndexOf('@');
234
+ const base = atIdx > 0 ? k.slice(0, atIdx) : k; // >0 keeps a leading-@ scope intact
235
+ if (base === name) out.push(...v);
236
+ }
237
+ return out;
238
+ };
239
+ // Pre-parse imports per JS/PY file once.
240
+ const importsByFile = new Map();
241
+ for (const [file, content] of Object.entries(fileContents || {})) {
242
+ const lang = languageOfFile(file);
243
+ if (!lang) continue;
244
+ try { importsByFile.set(file, { lang, imports: extractImports(content, lang) }); } catch { /* skip unparseable */ }
245
+ }
246
+ if (!importsByFile.size) return supplyChain;
247
+
248
+ for (const sc of supplyChain) {
249
+ if (!sc || sc.type !== 'vulnerable_dep') continue;
250
+ if (sc.ecosystem !== 'npm' && sc.ecosystem !== 'pypi') continue;
251
+ const lang = sc.ecosystem === 'npm' ? 'js' : 'py';
252
+ const vulnFns = (sc.osvVulnFunctions || []).map((f) => {
253
+ const d = String(f).lastIndexOf('.'); return d > 0 ? String(f).slice(d + 1) : String(f);
254
+ }).concat(sc.usedVulnerableFunctions || []).concat(hintFnsFor(sc.name));
255
+ const uniqFns = [...new Set(vulnFns.filter(Boolean))];
256
+ if (!uniqFns.length) continue;
257
+
258
+ const existing = Array.isArray(sc.vulnerableFunctionCallSites) ? sc.vulnerableFunctionCallSites : [];
259
+ const seen = new Set(existing.map((s) => `${s.file}:${s.line}:${s.fn}`));
260
+ let added = 0;
261
+ for (const [file, { lang: fl, imports }] of importsByFile) {
262
+ if (fl !== lang) continue;
263
+ const content = fileContents[file];
264
+ const sites = findImportAwareCallSites(content, lang, imports, sc.name, uniqFns);
265
+ for (const s of sites) {
266
+ const key = `${file}:${s.line}:${s.fn}`;
267
+ if (seen.has(key)) continue;
268
+ seen.add(key);
269
+ existing.push({ pkg: sc.name, fn: s.fn, file, line: s.line, via: s.via, _r7: true });
270
+ added++;
271
+ }
272
+ }
273
+ if (added > 0) {
274
+ sc.vulnerableFunctionCallSites = existing;
275
+ const usedSet = new Set(sc.usedVulnerableFunctions || []);
276
+ for (const s of existing) usedSet.add(s.fn);
277
+ sc.usedVulnerableFunctions = [...usedSet];
278
+ sc.noKnownCallSite = false;
279
+ sc._importAwareCallSites = (sc._importAwareCallSites || 0) + added;
280
+ }
281
+ }
282
+ return supplyChain;
283
+ }
284
+
285
+
286
+ /***/ })
287
+
288
+ };