@code-sentinel-cli/code-sentinel-cli 4.0.8 → 4.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { randomBytes, createCipheriv, createDecipheriv, createHash, randomUUID,
6
6
  import * as sp2 from 'path';
7
7
  import { dirname, resolve, isAbsolute, join, extname, relative, basename, posix, sep, normalize } from 'path';
8
8
  import { Language, Parser, Query } from 'web-tree-sitter';
9
- import { Project, SyntaxKind, Node, VariableDeclarationKind, ScriptKind } from 'ts-morph';
9
+ import { Project, SyntaxKind, Node, ScriptKind, VariableDeclarationKind } from 'ts-morph';
10
10
  import { readFile, stat, writeFile, mkdir, rename, readdir, rm, access, mkdtemp, unlink, chmod, lstat, realpath as realpath$1, open } from 'fs/promises';
11
11
  import * as nativeFs from 'fs';
12
12
  import { existsSync, mkdirSync, readFileSync, constants, statSync, stat as stat$1, realpathSync, realpath, readdirSync, readdir as readdir$1, unwatchFile, watchFile, watch as watch$1, writeFileSync, openSync, fstatSync, closeSync, readSync } from 'fs';
@@ -676,7 +676,7 @@ var init_dist2 = __esm({
676
676
  let needsBuild = 0;
677
677
  let needsComponentTrace = 0;
678
678
  for (const s of suite.skipped) {
679
- if (s.reason.includes("ch\u01B0a resolve \u0111\u01B0\u1EE3c @angular") || s.reason.includes("third-party imports not in closure")) {
679
+ if (s.reason.includes("ch\u01B0a resolve \u0111\u01B0\u1EE3c @angular") || s.reason.includes("thi\u1EBFu AST graph") || s.reason.includes("third-party imports not in closure")) {
680
680
  needsBuild++;
681
681
  } else {
682
682
  needsComponentTrace++;
@@ -9604,71 +9604,343 @@ function domXssEntries() {
9604
9604
  ["angular/bypass-security-trust", t]
9605
9605
  ];
9606
9606
  }
9607
- function resolveUnit(content, field3) {
9608
- const fieldRe = new RegExp(`\\b${field3}\\b`);
9609
- for (const line2 of content.split("\n")) {
9610
- if (!fieldRe.test(line2)) continue;
9611
- const m = TIME_UNIT_RE.exec(line2);
9612
- if (m?.[1]) return { unit: m[1], source: "usage" };
9607
+ function normalizePath2(p) {
9608
+ return posix.normalize(p.replace(/\\/g, "/")).replace(/^\.\//, "");
9609
+ }
9610
+ function pathSegments(value) {
9611
+ return value.split("/").filter((s) => s.length > 0);
9612
+ }
9613
+ function paramName(segment) {
9614
+ return segment.startsWith(":") ? segment.slice(1).replace(/[?+*]$/, "") : null;
9615
+ }
9616
+ function literalString(node) {
9617
+ const value = unwrap(node);
9618
+ if (!value) return null;
9619
+ if (Node.isStringLiteral(value) || Node.isNoSubstitutionTemplateLiteral(value)) {
9620
+ return value.getLiteralValue();
9613
9621
  }
9614
- for (const [re, unit] of NAME_UNIT_HINTS) {
9615
- if (re.test(field3)) return { unit, source: "identifier" };
9622
+ return null;
9623
+ }
9624
+ function importCallSpecifier(node) {
9625
+ for (const call of node.getDescendantsOfKind(SyntaxKind.CallExpression)) {
9626
+ if (call.getExpression().getKind() === SyntaxKind.ImportKeyword) {
9627
+ const spec = literalString(call.getArguments()[0]);
9628
+ if (spec) return spec;
9629
+ }
9630
+ }
9631
+ return null;
9632
+ }
9633
+ function isRouteArray(node) {
9634
+ if (!Node.isArrayLiteralExpression(node)) return false;
9635
+ for (const el of node.getElements()) {
9636
+ if (!Node.isObjectLiteralExpression(el)) continue;
9637
+ for (const key of ["path", "component", "components", "children", "redirect", "name"]) {
9638
+ if (el.getProperty(key)) return true;
9639
+ }
9640
+ }
9641
+ return false;
9642
+ }
9643
+ function buildFileContext(sf, path2) {
9644
+ const imports = /* @__PURE__ */ new Map();
9645
+ for (const imp of sf.getImportDeclarations()) {
9646
+ const specifier = imp.getModuleSpecifierValue();
9647
+ const def = imp.getDefaultImport();
9648
+ if (def) imports.set(def.getText(), specifier);
9649
+ for (const named of imp.getNamedImports()) {
9650
+ imports.set(named.getAliasNode()?.getText() ?? named.getName(), specifier);
9651
+ }
9652
+ }
9653
+ const constStrings = /* @__PURE__ */ new Map();
9654
+ for (const decl of sf.getVariableDeclarations()) {
9655
+ const init = decl.getInitializer();
9656
+ const v = literalString(init);
9657
+ if (v !== null) constStrings.set(decl.getName(), v);
9658
+ }
9659
+ return { path: path2, sf, imports, constStrings };
9660
+ }
9661
+ function readPath2(obj, ctx) {
9662
+ if (!Node.isObjectLiteralExpression(obj)) return "";
9663
+ const prop = obj.getProperty("path");
9664
+ if (!prop || !Node.isPropertyAssignment(prop)) return "";
9665
+ const init = prop.getInitializer();
9666
+ const value = init ? literalString(init) : null;
9667
+ if (value !== null) return value;
9668
+ if (init && Node.isIdentifier(init)) {
9669
+ const local = ctx.constStrings.get(init.getText());
9670
+ if (local !== void 0) return local;
9671
+ }
9672
+ return UNRESOLVED_PATH;
9673
+ }
9674
+ function readComponent(obj, ctx) {
9675
+ if (!Node.isObjectLiteralExpression(obj)) return null;
9676
+ const prop = obj.getProperty("component");
9677
+ if (!prop || !Node.isPropertyAssignment(prop)) return null;
9678
+ const init = prop.getInitializer();
9679
+ if (!init) return null;
9680
+ if (Node.isIdentifier(init)) {
9681
+ const name = init.getText();
9682
+ const specifier = ctx.imports.get(name) ?? "";
9683
+ return { componentClass: name, specifier };
9684
+ }
9685
+ const lazySpec = importCallSpecifier(init);
9686
+ if (lazySpec) {
9687
+ let member = "default";
9688
+ for (const call of init.getDescendantsOfKind(SyntaxKind.CallExpression)) {
9689
+ const expr = call.getExpression();
9690
+ if (Node.isPropertyAccessExpression(expr) && expr.getName() === "then") {
9691
+ const cb = call.getArguments()[0];
9692
+ if (cb) {
9693
+ const access7 = cb.getDescendantsOfKind(SyntaxKind.PropertyAccessExpression).find((pa) => Node.isIdentifier(pa.getExpression()));
9694
+ if (access7) member = access7.getName();
9695
+ }
9696
+ }
9697
+ }
9698
+ return { componentClass: member === "default" ? "default" : member, specifier: lazySpec };
9699
+ }
9700
+ return null;
9701
+ }
9702
+ function resolveComponentFile(specifier, fromPath, filesByPath, aliasBase) {
9703
+ if (specifier.startsWith("@/")) {
9704
+ const rel = specifier.slice(2);
9705
+ const localSrc = findModuleSrcBase(fromPath, filesByPath);
9706
+ const base = normalizePath2(posix.join(localSrc ?? aliasBase ?? "", rel));
9707
+ if (TS_EXT_CANDIDATES.includes(posix.extname(base))) return base;
9708
+ for (const e of TS_EXT_CANDIDATES) if (filesByPath.has(`${base}${e}`)) return `${base}${e}`;
9709
+ return `${base}.vue`;
9710
+ }
9711
+ if (specifier.startsWith(".")) {
9712
+ const base = normalizePath2(posix.join(posix.dirname(fromPath), specifier));
9713
+ if (TS_EXT_CANDIDATES.includes(posix.extname(base))) return base;
9714
+ for (const e of TS_EXT_CANDIDATES) if (filesByPath.has(`${base}${e}`)) return `${base}${e}`;
9715
+ return `${base}.vue`;
9716
+ }
9717
+ return specifier;
9718
+ }
9719
+ function findModuleSrcBase(fromPath, filesByPath) {
9720
+ const segments = normalizePath2(fromPath).split("/").filter(Boolean);
9721
+ for (let i = segments.length - 1; i >= 0; i--) {
9722
+ if (segments[i] === "src") {
9723
+ const ancestor = segments.slice(0, i).join("/");
9724
+ return ancestor ? `${ancestor}/src` : "src";
9725
+ }
9726
+ const dirToHere = segments.slice(0, i).join("/");
9727
+ const candidate = dirToHere ? `${dirToHere}/src` : "src";
9728
+ let found = false;
9729
+ for (const p of filesByPath.keys()) {
9730
+ if (p === candidate || p.startsWith(`${candidate}/`)) {
9731
+ found = true;
9732
+ break;
9733
+ }
9734
+ }
9735
+ if (found) return candidate;
9616
9736
  }
9617
9737
  return void 0;
9618
9738
  }
9619
- function collectBindings(javaFiles) {
9739
+ function findMountedRouteArrays(ctx) {
9620
9740
  const out = [];
9621
- for (const file of javaFiles) {
9622
- if (!/otp/i.test(file.content)) continue;
9623
- VALUE_ANNOTATION_RE.lastIndex = 0;
9624
- let m = VALUE_ANNOTATION_RE.exec(file.content);
9625
- while (m !== null) {
9626
- const property = m[1] ?? "";
9627
- const rest = file.content.slice(m.index + m[0].length);
9628
- const fieldLine = rest.split("\n").slice(0, 3).join("\n");
9629
- const fieldMatch = FIELD_AFTER_VALUE_RE.exec(fieldLine.replace(/^\s*\n/, ""));
9630
- const field3 = fieldMatch?.[1] ?? "";
9631
- if (field3 && (isOtpLifetimeName(field3) || isOtpLifetimeName(property))) {
9632
- const resolved = resolveUnit(file.content, field3);
9633
- out.push({
9634
- file: file.path,
9635
- line: lineOf26(file.content, m.index),
9636
- property,
9637
- field: field3,
9638
- annotationDefault: m[2],
9639
- unit: resolved?.unit,
9640
- unitSource: resolved?.source
9641
- });
9741
+ const fromArg = (arg, isVue3) => {
9742
+ if (!arg || !Node.isObjectLiteralExpression(arg)) return null;
9743
+ const routesProp = arg.getProperty("routes");
9744
+ let arr;
9745
+ if (routesProp && Node.isPropertyAssignment(routesProp)) {
9746
+ arr = routesProp.getInitializer();
9747
+ } else if (routesProp && Node.isShorthandPropertyAssignment(routesProp)) {
9748
+ const name = routesProp.getName();
9749
+ const v = ctx.sf.getVariableDeclaration(name);
9750
+ if (v) arr = v.getInitializer();
9751
+ }
9752
+ if (!arr || !Node.isArrayLiteralExpression(arr)) return null;
9753
+ if (isVue3) {
9754
+ const history = arg.getProperty("history") ?? arg.getProperty("routerOptions");
9755
+ const mode = historyHistMode(history);
9756
+ return { array: arr, mode, basePath: readBasePath(history) };
9757
+ }
9758
+ const modeProp = arg.getProperty("mode");
9759
+ const modeInit = modeProp && Node.isPropertyAssignment(modeProp) ? modeProp.getInitializer() : void 0;
9760
+ const modeVal = literalString(modeInit);
9761
+ return { array: arr, mode: modeVal === "history" ? "history" : "hash", basePath: "" };
9762
+ };
9763
+ for (const kind of [SyntaxKind.CallExpression, SyntaxKind.NewExpression]) {
9764
+ for (const node of ctx.sf.getDescendantsOfKind(kind)) {
9765
+ const arg = node.getArguments()[0];
9766
+ const expr = node.getExpression();
9767
+ const callee = Node.isPropertyAccessExpression(expr) ? expr.getName() : Node.isIdentifier(expr) ? expr.getText() : null;
9768
+ if (callee && MOUNT_VUE3.has(callee)) {
9769
+ const hit = fromArg(arg, true);
9770
+ if (hit) out.push(hit);
9771
+ }
9772
+ if (callee && MOUNT_VUE2.has(callee)) {
9773
+ const hit = fromArg(arg, false);
9774
+ if (hit) out.push(hit);
9642
9775
  }
9643
- m = VALUE_ANNOTATION_RE.exec(file.content);
9644
9776
  }
9645
9777
  }
9646
9778
  return out;
9647
9779
  }
9648
- function readConfiguredValue(files, property) {
9649
- const last = property.split(".").pop() ?? property;
9650
- const escaped = last.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
9651
- const yamlRe = new RegExp(`^\\s*${escaped}\\s*:\\s*([0-9]+)\\s*(?:#.*)?$`, "m");
9652
- const propsRe = new RegExp(
9653
- `^\\s*${property.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*=\\s*([0-9]+)`,
9654
- "m"
9655
- );
9656
- const candidates = files.filter((f) => /application[^/]*\.(ya?ml|properties)$/i.test(f.path)).sort((a, b) => configRank(a.path) - configRank(b.path) || a.path.localeCompare(b.path));
9657
- for (const file of candidates) {
9658
- const m = yamlRe.exec(file.content) ?? propsRe.exec(file.content);
9659
- if (m?.[1]) {
9660
- return { value: Number(m[1]), file: file.path, line: lineOf26(file.content, m.index) };
9780
+ function readBasePath(historyProp) {
9781
+ if (!historyProp || !Node.isPropertyAssignment(historyProp)) return "";
9782
+ const init = historyProp.getInitializer();
9783
+ if (!init) return "";
9784
+ if (Node.isCallExpression(init)) {
9785
+ const v = literalString(init.getArguments()[0]);
9786
+ if (v !== null) return v;
9787
+ }
9788
+ for (const call of init.getDescendantsOfKind(SyntaxKind.CallExpression)) {
9789
+ const v = literalString(call.getArguments()[0]);
9790
+ if (v !== null) return v;
9791
+ }
9792
+ return "";
9793
+ }
9794
+ function historyHistMode(historyProp) {
9795
+ if (!historyProp || !Node.isPropertyAssignment(historyProp)) return "history";
9796
+ let init = historyProp.getInitializer();
9797
+ if (init && Node.isObjectLiteralExpression(init)) {
9798
+ const nested = init.getProperty("history");
9799
+ if (nested && Node.isPropertyAssignment(nested)) init = nested.getInitializer();
9800
+ }
9801
+ if (!init) return "history";
9802
+ const calls = [];
9803
+ if (Node.isCallExpression(init)) calls.push(init);
9804
+ for (const c of init.getDescendantsOfKind(SyntaxKind.CallExpression)) calls.push(c);
9805
+ for (const call of calls) {
9806
+ const expr = call.getExpression();
9807
+ const callee = Node.isIdentifier(expr) ? expr.getText() : Node.isPropertyAccessExpression(expr) ? expr.getName() : null;
9808
+ if (callee === "createWebHashHistory") return "hash";
9809
+ if (callee === "createWebHistory" || callee === "createMemoryHistory") return "history";
9810
+ }
9811
+ return "history";
9812
+ }
9813
+ function walkArray(array, ctx, prefix, params, certain, emit, visited) {
9814
+ if (visited.has(array) || !Node.isArrayLiteralExpression(array)) return;
9815
+ visited.add(array);
9816
+ for (const el of array.getElements()) {
9817
+ if (!Node.isObjectLiteralExpression(el)) continue;
9818
+ const pathVal = readPath2(el, ctx);
9819
+ const branchCertain = certain && pathVal !== UNRESOLVED_PATH;
9820
+ if (pathVal === "*") continue;
9821
+ const segs = pathVal === UNRESOLVED_PATH ? [] : pathSegments(pathVal);
9822
+ const nextPrefix = [...prefix, ...segs];
9823
+ const nextParams = [...params];
9824
+ for (const s of segs) {
9825
+ const p = paramName(s);
9826
+ if (p) nextParams.push(p);
9827
+ }
9828
+ const leaf = readComponent(el, ctx);
9829
+ if (leaf) {
9830
+ const kind = branchCertain && nextPrefix.length >= 0 ? "resolved" : "needs-route";
9831
+ emit(leaf, ctx.path, {
9832
+ urlSuffix: nextPrefix.join("/"),
9833
+ kind,
9834
+ params: nextParams,
9835
+ ...kind === "resolved" ? { prefix: "" } : {}
9836
+ });
9837
+ }
9838
+ const children2 = el.getProperty("children");
9839
+ if (children2 && Node.isPropertyAssignment(children2)) {
9840
+ const childArr = children2.getInitializer();
9841
+ if (childArr && Node.isArrayLiteralExpression(childArr)) {
9842
+ walkArray(childArr, ctx, nextPrefix, nextParams, branchCertain, emit, visited);
9843
+ }
9661
9844
  }
9662
9845
  }
9663
- return void 0;
9664
9846
  }
9665
- function normalizePath2(p) {
9847
+ function resolveVueRoutes(files, options = {}) {
9848
+ const filesByPath = /* @__PURE__ */ new Map();
9849
+ for (const f of files) {
9850
+ if (TS_LANGS.has(f.language)) filesByPath.set(normalizePath2(f.path), f);
9851
+ }
9852
+ const project = new Project({ useInMemoryFileSystem: true });
9853
+ const ctxCache = /* @__PURE__ */ new Map();
9854
+ const getContext = (path2) => {
9855
+ const norm2 = normalizePath2(path2);
9856
+ if (ctxCache.has(norm2)) return ctxCache.get(norm2) ?? null;
9857
+ const file = filesByPath.get(norm2);
9858
+ let ctx = null;
9859
+ if (file) {
9860
+ try {
9861
+ const sf = project.createSourceFile(norm2, file.content, { overwrite: true });
9862
+ ctx = buildFileContext(sf, norm2);
9863
+ } catch {
9864
+ ctx = null;
9865
+ }
9866
+ }
9867
+ ctxCache.set(norm2, ctx);
9868
+ return ctx;
9869
+ };
9870
+ const aliasBase = options.aliasBase;
9871
+ const acc = /* @__PURE__ */ new Map();
9872
+ const emit = (leaf, fromPath, res) => {
9873
+ const componentFile = resolveComponentFile(leaf.specifier, fromPath, filesByPath, aliasBase);
9874
+ const key = `${leaf.componentClass}@${componentFile}`;
9875
+ let bucket = acc.get(key);
9876
+ if (!bucket) {
9877
+ bucket = {
9878
+ entry: { componentClass: leaf.componentClass, componentFile, routes: [] },
9879
+ seen: /* @__PURE__ */ new Set()
9880
+ };
9881
+ acc.set(key, bucket);
9882
+ }
9883
+ const routeKey = `${res.kind}\0${res.urlSuffix}`;
9884
+ if (bucket.seen.has(routeKey)) return;
9885
+ bucket.seen.add(routeKey);
9886
+ bucket.entry.routes.push(res);
9887
+ };
9888
+ let mode = "hash";
9889
+ let basePath = "";
9890
+ const reached = /* @__PURE__ */ new Set();
9891
+ for (const f of files) {
9892
+ if (!TS_LANGS.has(f.language)) continue;
9893
+ const ctx = getContext(f.path);
9894
+ if (!ctx) continue;
9895
+ try {
9896
+ const mounts = findMountedRouteArrays(ctx);
9897
+ for (const m of mounts) {
9898
+ if (m.mode === "history") mode = "history";
9899
+ if (m.basePath && !basePath) basePath = m.basePath;
9900
+ walkArray(m.array, ctx, [], [], true, emit, reached);
9901
+ }
9902
+ } catch {
9903
+ }
9904
+ }
9905
+ for (const f of files) {
9906
+ if (!TS_LANGS.has(f.language)) continue;
9907
+ const ctx = getContext(f.path);
9908
+ if (!ctx) continue;
9909
+ try {
9910
+ for (const decl of ctx.sf.getVariableDeclarations()) {
9911
+ const init = decl.getInitializer();
9912
+ if (init && isRouteArray(init)) {
9913
+ if (reached.has(init)) continue;
9914
+ walkArray(init, ctx, [], [], false, emit, reached);
9915
+ }
9916
+ }
9917
+ } catch {
9918
+ }
9919
+ }
9920
+ const index2 = /* @__PURE__ */ new Map();
9921
+ for (const key of [...acc.keys()].sort()) {
9922
+ const bucket = acc.get(key);
9923
+ if (!bucket) continue;
9924
+ const routes = [...bucket.entry.routes].sort(
9925
+ (a, b) => a.kind.localeCompare(b.kind) || a.urlSuffix.localeCompare(b.urlSuffix)
9926
+ );
9927
+ index2.set(key, { ...bucket.entry, routes });
9928
+ }
9929
+ return {
9930
+ index: index2,
9931
+ metadata: {
9932
+ navigationMode: mode,
9933
+ basePath
9934
+ }
9935
+ };
9936
+ }
9937
+ function normalizePath3(p) {
9666
9938
  return posix.normalize(p.replace(/\\/g, "/")).replace(/^\.\//, "");
9667
9939
  }
9668
- function pathSegments(value) {
9940
+ function pathSegments2(value) {
9669
9941
  return value.split("/").filter((s) => s.length > 0);
9670
9942
  }
9671
- function paramName(segment) {
9943
+ function paramName2(segment) {
9672
9944
  return segment.startsWith(":") ? segment.slice(1) : null;
9673
9945
  }
9674
9946
  function calleeName(call) {
@@ -9685,7 +9957,7 @@ function unwrapStaticExpression(node) {
9685
9957
  }
9686
9958
  return current;
9687
9959
  }
9688
- function literalString(node) {
9960
+ function literalString2(node) {
9689
9961
  const value = unwrapStaticExpression(node);
9690
9962
  if (!value) return null;
9691
9963
  if (Node.isStringLiteral(value) || Node.isNoSubstitutionTemplateLiteral(value)) {
@@ -9693,7 +9965,7 @@ function literalString(node) {
9693
9965
  }
9694
9966
  return null;
9695
9967
  }
9696
- function isRouteArray(node) {
9968
+ function isRouteArray2(node) {
9697
9969
  if (!Node.isArrayLiteralExpression(node)) return false;
9698
9970
  for (const el of node.getElements()) {
9699
9971
  if (!Node.isObjectLiteralExpression(el)) continue;
@@ -9703,7 +9975,7 @@ function isRouteArray(node) {
9703
9975
  }
9704
9976
  return false;
9705
9977
  }
9706
- function buildFileContext(sf, path2) {
9978
+ function buildFileContext2(sf, path2) {
9707
9979
  const constStrings = /* @__PURE__ */ new Map();
9708
9980
  const constInitializers = /* @__PURE__ */ new Map();
9709
9981
  const constArrays = /* @__PURE__ */ new Map();
@@ -9713,7 +9985,7 @@ function buildFileContext(sf, path2) {
9713
9985
  if (decl.getVariableStatement()?.getDeclarationKind() !== VariableDeclarationKind.Const)
9714
9986
  continue;
9715
9987
  constInitializers.set(decl.getName(), init);
9716
- const str = literalString(init);
9988
+ const str = literalString2(init);
9717
9989
  if (str !== null) constStrings.set(decl.getName(), str);
9718
9990
  else if (Node.isArrayLiteralExpression(init)) constArrays.set(decl.getName(), init);
9719
9991
  }
@@ -9731,20 +10003,20 @@ function buildFileContext(sf, path2) {
9731
10003
  }
9732
10004
  return { path: path2, sf, constStrings, constInitializers, constArrays, imports };
9733
10005
  }
9734
- function readPath2(obj, ctx, eng) {
10006
+ function readPath22(obj, ctx, eng) {
9735
10007
  if (!Node.isObjectLiteralExpression(obj)) return "";
9736
10008
  const prop = obj.getProperty("path");
9737
10009
  if (!prop || !Node.isPropertyAssignment(prop)) return "";
9738
10010
  const init = prop.getInitializer();
9739
- return resolveStaticString(eng, ctx, init, 0) ?? UNRESOLVED_PATH;
10011
+ return resolveStaticString(eng, ctx, init, 0) ?? UNRESOLVED_PATH2;
9740
10012
  }
9741
- function readComponent(obj, ctx) {
10013
+ function readComponent2(obj, ctx) {
9742
10014
  if (!Node.isObjectLiteralExpression(obj)) return null;
9743
10015
  const lazy = obj.getProperty("loadComponent");
9744
10016
  if (lazy && Node.isPropertyAssignment(lazy)) {
9745
10017
  const init = lazy.getInitializer();
9746
10018
  if (init) {
9747
- const spec = importCallSpecifier(init);
10019
+ const spec = importCallSpecifier2(init);
9748
10020
  const cls = thenMemberName(init);
9749
10021
  if (spec && cls) return { componentClass: cls, specifier: spec };
9750
10022
  }
@@ -9759,10 +10031,10 @@ function readComponent(obj, ctx) {
9759
10031
  }
9760
10032
  return null;
9761
10033
  }
9762
- function importCallSpecifier(node) {
10034
+ function importCallSpecifier2(node) {
9763
10035
  for (const call of node.getDescendantsOfKind(SyntaxKind.CallExpression)) {
9764
10036
  if (call.getExpression().getKind() === SyntaxKind.ImportKeyword) {
9765
- const arg = literalString(call.getArguments()[0]);
10037
+ const arg = literalString2(call.getArguments()[0]);
9766
10038
  if (arg) return arg;
9767
10039
  }
9768
10040
  }
@@ -9779,11 +10051,11 @@ function thenMemberName(node) {
9779
10051
  return null;
9780
10052
  }
9781
10053
  function candidatePaths2(base) {
9782
- const hasExt = TS_EXT_CANDIDATES.includes(posix.extname(base));
10054
+ const hasExt = TS_EXT_CANDIDATES2.includes(posix.extname(base));
9783
10055
  if (hasExt) return [base];
9784
10056
  return [
9785
- ...TS_EXT_CANDIDATES.map((e) => `${base}${e}`),
9786
- ...TS_EXT_CANDIDATES.map((e) => `${base}/index${e}`)
10057
+ ...TS_EXT_CANDIDATES2.map((e) => `${base}${e}`),
10058
+ ...TS_EXT_CANDIDATES2.map((e) => `${base}/index${e}`)
9787
10059
  ];
9788
10060
  }
9789
10061
  function stripJsonComments2(content) {
@@ -9793,9 +10065,9 @@ function loadTsConfig(projectRoot) {
9793
10065
  const paths = /* @__PURE__ */ new Map();
9794
10066
  let baseUrl = "";
9795
10067
  const visited = /* @__PURE__ */ new Set();
9796
- const root = normalizePath2(projectRoot);
10068
+ const root = normalizePath3(projectRoot);
9797
10069
  const load = (tsRelToRoot) => {
9798
- const norm2 = normalizePath2(tsRelToRoot);
10070
+ const norm2 = normalizePath3(tsRelToRoot);
9799
10071
  if (visited.has(norm2) || visited.size > 8) return;
9800
10072
  visited.add(norm2);
9801
10073
  let json;
@@ -9807,16 +10079,16 @@ function loadTsConfig(projectRoot) {
9807
10079
  const dir = posix.dirname(norm2);
9808
10080
  if (typeof json.extends === "string" && json.extends.startsWith(".")) {
9809
10081
  const ext = json.extends.endsWith(".json") ? json.extends : `${json.extends}.json`;
9810
- load(normalizePath2(posix.join(dir, ext)));
10082
+ load(normalizePath3(posix.join(dir, ext)));
9811
10083
  }
9812
10084
  const co = json.compilerOptions ?? {};
9813
10085
  const fileBaseUrl = typeof co.baseUrl === "string" ? co.baseUrl : ".";
9814
- if (typeof co.baseUrl === "string") baseUrl = normalizePath2(posix.join(dir, co.baseUrl));
10086
+ if (typeof co.baseUrl === "string") baseUrl = normalizePath3(posix.join(dir, co.baseUrl));
9815
10087
  const rawPaths = co.paths;
9816
10088
  if (rawPaths && typeof rawPaths === "object" && !Array.isArray(rawPaths)) {
9817
10089
  for (const [pattern, targets] of Object.entries(rawPaths)) {
9818
10090
  if (!Array.isArray(targets)) continue;
9819
- const resolved = targets.filter((t) => typeof t === "string").map((t) => normalizePath2(posix.join(dir, fileBaseUrl, t)));
10091
+ const resolved = targets.filter((t) => typeof t === "string").map((t) => normalizePath3(posix.join(dir, fileBaseUrl, t)));
9820
10092
  if (resolved.length > 0) paths.set(pattern, resolved);
9821
10093
  }
9822
10094
  }
@@ -9837,7 +10109,7 @@ function matchPathPattern2(specifier, pattern) {
9837
10109
  }
9838
10110
  function resolveSpecifier(fromPath, specifier, filesByPath, tsconfig) {
9839
10111
  if (specifier.startsWith(".")) {
9840
- const base = normalizePath2(posix.join(posix.dirname(fromPath), specifier));
10112
+ const base = normalizePath3(posix.join(posix.dirname(fromPath), specifier));
9841
10113
  for (const c of candidatePaths2(base)) if (filesByPath.has(c)) return c;
9842
10114
  return null;
9843
10115
  }
@@ -9847,11 +10119,11 @@ function resolveSpecifier(fromPath, specifier, filesByPath, tsconfig) {
9847
10119
  if (!matched) continue;
9848
10120
  for (const target of mapping.targets) {
9849
10121
  const applied = target.includes("*") ? target.replace("*", matched.wildcard) : target;
9850
- for (const c of candidatePaths2(normalizePath2(applied))) if (filesByPath.has(c)) return c;
10122
+ for (const c of candidatePaths2(normalizePath3(applied))) if (filesByPath.has(c)) return c;
9851
10123
  }
9852
10124
  }
9853
10125
  if (tsconfig.baseUrl) {
9854
- for (const c of candidatePaths2(normalizePath2(posix.join(tsconfig.baseUrl, specifier)))) {
10126
+ for (const c of candidatePaths2(normalizePath3(posix.join(tsconfig.baseUrl, specifier)))) {
9855
10127
  if (filesByPath.has(c)) return c;
9856
10128
  }
9857
10129
  }
@@ -9948,7 +10220,7 @@ function resolveStaticString(eng, ctx, node, depth) {
9948
10220
  if (!node || depth > MAX_CHAIN_DEPTH) return null;
9949
10221
  const value = unwrapStaticExpression(node);
9950
10222
  if (!value) return null;
9951
- const literal2 = literalString(value);
10223
+ const literal2 = literalString2(value);
9952
10224
  if (literal2 !== null) return literal2;
9953
10225
  if (Node.isIdentifier(value)) {
9954
10226
  const local = ctx.constStrings.get(value.getText());
@@ -10067,7 +10339,7 @@ function resolveStaticPropertyRef(eng, ctx, access7, depth) {
10067
10339
  function firstReturnedArray(fn) {
10068
10340
  for (const ret of fn.getDescendantsOfKind(SyntaxKind.ReturnStatement)) {
10069
10341
  const expr = ret.getExpression();
10070
- if (expr && isRouteArray(expr)) return expr;
10342
+ if (expr && isRouteArray2(expr)) return expr;
10071
10343
  }
10072
10344
  return null;
10073
10345
  }
@@ -10089,7 +10361,7 @@ function resolveLazyTarget(eng, ctx, obj, depth) {
10089
10361
  if (!prop || !Node.isPropertyAssignment(prop)) return null;
10090
10362
  const init = prop.getInitializer();
10091
10363
  if (!init) return null;
10092
- const spec = importCallSpecifier(init);
10364
+ const spec = importCallSpecifier2(init);
10093
10365
  const sym = thenMemberName(init);
10094
10366
  if (!spec || !sym) return null;
10095
10367
  const targetPath = resolveSpecifier(ctx.path, spec, eng.filesByPath, eng.tsconfig);
@@ -10104,13 +10376,13 @@ function resolveLazyTarget(eng, ctx, obj, depth) {
10104
10376
  if (Node.isClassDeclaration(decl.node)) return findModuleRoutesArray(eng, decl.path, depth + 1);
10105
10377
  return null;
10106
10378
  }
10107
- function resolveComponentFile(eng, specifier, fromPath) {
10379
+ function resolveComponentFile2(eng, specifier, fromPath) {
10108
10380
  if (!specifier) return "";
10109
10381
  if (specifier.startsWith(".")) {
10110
10382
  const resolved = resolveSpecifier(fromPath, specifier, eng.filesByPath, eng.tsconfig);
10111
10383
  if (resolved) return resolved;
10112
- const base = normalizePath2(posix.join(posix.dirname(fromPath), specifier));
10113
- return TS_EXT_CANDIDATES.includes(posix.extname(base)) ? base : `${base}.ts`;
10384
+ const base = normalizePath3(posix.join(posix.dirname(fromPath), specifier));
10385
+ return TS_EXT_CANDIDATES2.includes(posix.extname(base)) ? base : `${base}.ts`;
10114
10386
  }
10115
10387
  return resolveSpecifier(fromPath, specifier, eng.filesByPath, eng.tsconfig) ?? specifier;
10116
10388
  }
@@ -10130,16 +10402,16 @@ function walkResolved(eng, ref, prefix, params, certain, depth, state, via) {
10130
10402
  continue;
10131
10403
  }
10132
10404
  if (!Node.isObjectLiteralExpression(el)) continue;
10133
- const pathVal = readPath2(el, ctx, eng);
10134
- const branchCertain = certain && pathVal !== UNRESOLVED_PATH;
10135
- const segs = pathVal === UNRESOLVED_PATH ? [] : pathSegments(pathVal);
10405
+ const pathVal = readPath22(el, ctx, eng);
10406
+ const branchCertain = certain && pathVal !== UNRESOLVED_PATH2;
10407
+ const segs = pathVal === UNRESOLVED_PATH2 ? [] : pathSegments2(pathVal);
10136
10408
  const nextPrefix = [...prefix, ...segs];
10137
10409
  const nextParams = [...params];
10138
10410
  for (const s of segs) {
10139
- const p = paramName(s);
10411
+ const p = paramName2(s);
10140
10412
  if (p) nextParams.push(p);
10141
10413
  }
10142
- const leaf = readComponent(el, ctx);
10414
+ const leaf = readComponent2(el, ctx);
10143
10415
  if (leaf) {
10144
10416
  const kind = branchCertain ? "resolved" : "needs-route";
10145
10417
  state.emit(leaf, ctx.path, {
@@ -10179,15 +10451,15 @@ function walkNeedsRoute(eng, ref, ctx, prefix, params, emit, visited) {
10179
10451
  visited.add(ref.array);
10180
10452
  for (const el of ref.array.getElements()) {
10181
10453
  if (!Node.isObjectLiteralExpression(el)) continue;
10182
- const pathVal = readPath2(el, ctx, eng);
10183
- const segs = pathVal === UNRESOLVED_PATH ? [] : pathSegments(pathVal);
10454
+ const pathVal = readPath22(el, ctx, eng);
10455
+ const segs = pathVal === UNRESOLVED_PATH2 ? [] : pathSegments2(pathVal);
10184
10456
  const nextPrefix = [...prefix, ...segs];
10185
10457
  const nextParams = [...params];
10186
10458
  for (const s of segs) {
10187
- const p = paramName(s);
10459
+ const p = paramName2(s);
10188
10460
  if (p) nextParams.push(p);
10189
10461
  }
10190
- const leaf = readComponent(el, ctx);
10462
+ const leaf = readComponent2(el, ctx);
10191
10463
  if (leaf) {
10192
10464
  emit(leaf, ctx.path, {
10193
10465
  urlSuffix: nextPrefix.join("/"),
@@ -10216,7 +10488,7 @@ function collectTopLevelArrays(ctx) {
10216
10488
  const seen = /* @__PURE__ */ new Set();
10217
10489
  const out = [];
10218
10490
  const add = (node) => {
10219
- if (node && !seen.has(node) && isRouteArray(node)) {
10491
+ if (node && !seen.has(node) && isRouteArray2(node)) {
10220
10492
  seen.add(node);
10221
10493
  out.push(node);
10222
10494
  }
@@ -10265,7 +10537,7 @@ function createForSlotResolver(eng, files) {
10265
10537
  if (contribIndex) return contribIndex;
10266
10538
  const index2 = /* @__PURE__ */ new Map();
10267
10539
  for (const f of files) {
10268
- if (!TS_LANGS.has(f.language) || !f.content.includes("ROUTE_CONTRIBUTION")) continue;
10540
+ if (!TS_LANGS2.has(f.language) || !f.content.includes("ROUTE_CONTRIBUTION")) continue;
10269
10541
  const ctx = eng.getContext(f.path);
10270
10542
  if (!ctx) continue;
10271
10543
  for (const obj of ctx.sf.getDescendantsOfKind(SyntaxKind.ObjectLiteralExpression)) {
@@ -10275,7 +10547,7 @@ function createForSlotResolver(eng, files) {
10275
10547
  const useValue = objectProp(obj, "useValue");
10276
10548
  if (!useValue || !Node.isObjectLiteralExpression(useValue)) continue;
10277
10549
  const slotNode = objectProp(useValue, "slot");
10278
- const slot = literalString(slotNode) ?? (slotNode && Node.isIdentifier(slotNode) ? ctx.constStrings.get(slotNode.getText()) : void 0);
10550
+ const slot = literalString2(slotNode) ?? (slotNode && Node.isIdentifier(slotNode) ? ctx.constStrings.get(slotNode.getText()) : void 0);
10279
10551
  const routes = objectProp(useValue, "routes");
10280
10552
  if (!slot || !routes || !Node.isArrayLiteralExpression(routes)) continue;
10281
10553
  const list = index2.get(slot) ?? [];
@@ -10291,7 +10563,7 @@ function createForSlotResolver(eng, files) {
10291
10563
  additionalRoots: () => {
10292
10564
  const roots = [];
10293
10565
  for (const f of files) {
10294
- if (!TS_LANGS.has(f.language)) continue;
10566
+ if (!TS_LANGS2.has(f.language)) continue;
10295
10567
  if (!f.content.includes("ROUTES") || !f.content.includes("provide")) continue;
10296
10568
  const ctx = eng.getContext(f.path);
10297
10569
  if (!ctx || ctx.imports.get("ROUTES")?.specifier !== "@angular/router") continue;
@@ -10309,7 +10581,7 @@ function createForSlotResolver(eng, files) {
10309
10581
  },
10310
10582
  expandSpread: (expr, _ctx, _eng) => {
10311
10583
  if (!Node.isCallExpression(expr) || calleeName(expr) !== "forSlot") return [];
10312
- const slot = literalString(expr.getArguments()[0]);
10584
+ const slot = literalString2(expr.getArguments()[0]);
10313
10585
  if (!slot) return [];
10314
10586
  return buildIndex().get(slot) ?? [];
10315
10587
  }
@@ -10324,8 +10596,8 @@ function looksLikeMountFile(content) {
10324
10596
  function resolveComponentRoutes(files, options = {}) {
10325
10597
  const filesByPath = /* @__PURE__ */ new Map();
10326
10598
  for (const f of files) {
10327
- if (TS_LANGS.has(f.language) && !isVueSfcPath(f.path))
10328
- filesByPath.set(normalizePath2(f.path), f);
10599
+ if (TS_LANGS2.has(f.language) && !isVueSfcPath(f.path))
10600
+ filesByPath.set(normalizePath3(f.path), f);
10329
10601
  }
10330
10602
  let tsconfig = options.tsconfig;
10331
10603
  if (!tsconfig && options.projectRoot) {
@@ -10339,7 +10611,7 @@ function resolveComponentRoutes(files, options = {}) {
10339
10611
  const sfCache = /* @__PURE__ */ new Map();
10340
10612
  const ctxCache = /* @__PURE__ */ new Map();
10341
10613
  const getSf = (path2) => {
10342
- const norm2 = normalizePath2(path2);
10614
+ const norm2 = normalizePath3(path2);
10343
10615
  if (sfCache.has(norm2)) return sfCache.get(norm2) ?? null;
10344
10616
  const file = filesByPath.get(norm2);
10345
10617
  let sf = null;
@@ -10354,17 +10626,17 @@ function resolveComponentRoutes(files, options = {}) {
10354
10626
  return sf;
10355
10627
  };
10356
10628
  const getContext = (path2) => {
10357
- const norm2 = normalizePath2(path2);
10629
+ const norm2 = normalizePath3(path2);
10358
10630
  if (ctxCache.has(norm2)) return ctxCache.get(norm2) ?? null;
10359
10631
  const sf = getSf(norm2);
10360
- const ctx = sf ? buildFileContext(sf, norm2) : null;
10632
+ const ctx = sf ? buildFileContext2(sf, norm2) : null;
10361
10633
  ctxCache.set(norm2, ctx);
10362
10634
  return ctx;
10363
10635
  };
10364
10636
  const eng = { filesByPath, tsconfig, getSf, getContext };
10365
10637
  const acc = /* @__PURE__ */ new Map();
10366
10638
  const emit = (leaf, fromPath, res) => {
10367
- const componentFile = resolveComponentFile(eng, leaf.specifier, fromPath);
10639
+ const componentFile = resolveComponentFile2(eng, leaf.specifier, fromPath);
10368
10640
  const key = `${leaf.componentClass}@${componentFile}`;
10369
10641
  let bucket = acc.get(key);
10370
10642
  if (!bucket) {
@@ -10390,7 +10662,7 @@ function resolveComponentRoutes(files, options = {}) {
10390
10662
  }
10391
10663
  }
10392
10664
  for (const f of files) {
10393
- if (!TS_LANGS.has(f.language) || !looksLikeMountFile(f.content)) continue;
10665
+ if (!TS_LANGS2.has(f.language) || !looksLikeMountFile(f.content)) continue;
10394
10666
  const ctx = getContext(f.path);
10395
10667
  if (!ctx) continue;
10396
10668
  try {
@@ -10404,7 +10676,7 @@ function resolveComponentRoutes(files, options = {}) {
10404
10676
  }
10405
10677
  }
10406
10678
  for (const f of files) {
10407
- if (!TS_LANGS.has(f.language) || !looksLikeRouteFile(f.content)) continue;
10679
+ if (!TS_LANGS2.has(f.language) || !looksLikeRouteFile(f.content)) continue;
10408
10680
  const ctx = getContext(f.path);
10409
10681
  if (!ctx) continue;
10410
10682
  try {
@@ -10427,7 +10699,65 @@ function resolveComponentRoutes(files, options = {}) {
10427
10699
  }
10428
10700
  return index2;
10429
10701
  }
10430
- function normalizePath3(p) {
10702
+ function resolveUnit(content, field3) {
10703
+ const fieldRe = new RegExp(`\\b${field3}\\b`);
10704
+ for (const line2 of content.split("\n")) {
10705
+ if (!fieldRe.test(line2)) continue;
10706
+ const m = TIME_UNIT_RE.exec(line2);
10707
+ if (m?.[1]) return { unit: m[1], source: "usage" };
10708
+ }
10709
+ for (const [re, unit] of NAME_UNIT_HINTS) {
10710
+ if (re.test(field3)) return { unit, source: "identifier" };
10711
+ }
10712
+ return void 0;
10713
+ }
10714
+ function collectBindings(javaFiles) {
10715
+ const out = [];
10716
+ for (const file of javaFiles) {
10717
+ if (!/otp/i.test(file.content)) continue;
10718
+ VALUE_ANNOTATION_RE.lastIndex = 0;
10719
+ let m = VALUE_ANNOTATION_RE.exec(file.content);
10720
+ while (m !== null) {
10721
+ const property = m[1] ?? "";
10722
+ const rest = file.content.slice(m.index + m[0].length);
10723
+ const fieldLine = rest.split("\n").slice(0, 3).join("\n");
10724
+ const fieldMatch = FIELD_AFTER_VALUE_RE.exec(fieldLine.replace(/^\s*\n/, ""));
10725
+ const field3 = fieldMatch?.[1] ?? "";
10726
+ if (field3 && (isOtpLifetimeName(field3) || isOtpLifetimeName(property))) {
10727
+ const resolved = resolveUnit(file.content, field3);
10728
+ out.push({
10729
+ file: file.path,
10730
+ line: lineOf26(file.content, m.index),
10731
+ property,
10732
+ field: field3,
10733
+ annotationDefault: m[2],
10734
+ unit: resolved?.unit,
10735
+ unitSource: resolved?.source
10736
+ });
10737
+ }
10738
+ m = VALUE_ANNOTATION_RE.exec(file.content);
10739
+ }
10740
+ }
10741
+ return out;
10742
+ }
10743
+ function readConfiguredValue(files, property) {
10744
+ const last = property.split(".").pop() ?? property;
10745
+ const escaped = last.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
10746
+ const yamlRe = new RegExp(`^\\s*${escaped}\\s*:\\s*([0-9]+)\\s*(?:#.*)?$`, "m");
10747
+ const propsRe = new RegExp(
10748
+ `^\\s*${property.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s*=\\s*([0-9]+)`,
10749
+ "m"
10750
+ );
10751
+ const candidates = files.filter((f) => /application[^/]*\.(ya?ml|properties)$/i.test(f.path)).sort((a, b) => configRank(a.path) - configRank(b.path) || a.path.localeCompare(b.path));
10752
+ for (const file of candidates) {
10753
+ const m = yamlRe.exec(file.content) ?? propsRe.exec(file.content);
10754
+ if (m?.[1]) {
10755
+ return { value: Number(m[1]), file: file.path, line: lineOf26(file.content, m.index) };
10756
+ }
10757
+ }
10758
+ return void 0;
10759
+ }
10760
+ function normalizePath4(p) {
10431
10761
  return posix.normalize(p.replace(/\\/g, "/")).replace(/^\.\//, "");
10432
10762
  }
10433
10763
  function parseParams2(url) {
@@ -10436,7 +10766,7 @@ function parseParams2(url) {
10436
10766
  function normalizeUrl(url) {
10437
10767
  return url.replace(/^\/+/, "");
10438
10768
  }
10439
- var createCompositeParser, SUPPORTED, createTextParser, requireFromHere, grammarCache, parserInitialized, initParser, resolveGrammarPath, loadGrammar, LANGUAGE_TO_GRAMMAR, SUPPORTED2, createTreeSitterParser, asTreeSitterTree, OPEN_SCRIPT_RE, CLOSE_SCRIPT_RE, LANG_TS_RE, SRC_ATTR_RE, OPEN_TEMPLATE_RE, CLOSE_TEMPLATE_RE, blankOut, keepOnly, templateRange, projectVueSfc, isVueSfcPath, tsMorphPathOf, SUPPORTED3, scriptKindFor, createTsMorphParser, createParser, BASE_CONFIG_RE, PROFILE_CONFIG_RE, HARNESS_PORT, KEY_LINE_RE, yamlEntries, emptyKeys, isConfigYaml, profileRank, declaresDatasource, detectDatasourceProfileBlocker, detectProfileCompositionBlocker, detectServerPortBlocker, XML_COMMENT_RE, INCLUDE_RE, CREATE_TABLE_RE, ALTER_TARGET_RE, matchAllGroups, detectUnrunnableMigrationBlocker, detectPolicyBootBlockers, composeSuggested, BINDABLE_NAME_RE, YAML_KEY_RE, PROPS_KEY_RE, configValueOf, rawTokensOf, MARK, AUTHORITY_LIKE_RE, shapeInAuthority, nextOf, shapeInPath, shapeAt, parseConfigValue, renderTemplate, DIALECT_SPECS, JDBC_URL_PATTERNS, DRIVER_PATTERNS, isConfigFile, isBuildFile, dialectsMatching, resolveDialect, DDL_AUTO_CREATE_RE, FLYWAY_RE, LIQUIBASE_RE, resolveSchemaProvisioning, detectSchemaProvisioning, detectDbTier, DB_SIDECAR_PORT, DISPOSABLE_DB, dbSidecarEnv, buildDbSidecarSpec, maskJavaComments, maskedCorpusCache, maskJavaFiles, PROFILE_GATED_JAR_BEANS, JHIPSTER_PROFILE_CONSTANTS, isJava, CLASS_DECL_RE, PROFILE_ANNOTATION_RE, CONDITIONAL_ANNOTATION_RE, CONFIG_ANNOTATION_RE, readProfileAnnotation, declarationHead, braceMatch, lineAt, parsedClasses, simpleTypeName, parseParams, beanMethods, collectProducers, detectUngatedProfileDependencies, ungatedProfileDeviationText, STANDALONE_BOOT_PROFILE, ENTITY_SCHEMA_GAPS, PROVISIONED_SIDECARS, DEFAULT_PROVISIONED_SIDECARS, NOTE, isConfigFile2, leafKey, indentOf, fullPathFor, usesJpa, detectVaultTemplateCompatibility, KAFKA_BUILD_RE, KAFKA_CONFIG_RE, STREAM_BUILD_RE, STREAM_CONFIG_RE, declaresKafka, declaresStreamBinder, hasPinnedListenerAutoStartup, ENDPOINT_PROPERTY_RULES, ENDPOINT_VALUE_RE, CLUSTER_TOPOLOGY_RULES, literalDatabaseOf, resolveSchemaResolution, buildStandaloneBootProfile, runtimeEnvKeyFor, A_SENTINEL, ENC_SENTINEL, UNAVAILABLE_KAFKA_HOST, UNAVAILABLE_KAFKA_PORT, isBase64JwtSigningKeyPath, isEndpointShaped, isEndpointPropertyPath, hasToken, dummyFor, RELAXED_ENV, envKeyFor, buildSidecars, renderSidecar, identifyByName, PATH_KINDS, PATH_LEAF_ROLES, identifyByPath, roleFromShape, shapedDummy, unavailableKafkaValue, resolveSlot, resolvePlaceholder, encSentinelFor, SHAPE_PRECEDENCE, strongerShape, buildBootResolution, RUNTIME_ENV_MANIFEST_SCHEMA_VERSION, SENSITIVE_ENV_NAME, URL_USERINFO, SENSITIVE_QUERY_VALUE, INLINE_SENSITIVE_VALUE, JWT_VALUE, EFFECTIVE_VALUE_LIMIT, displayEnvValue, UPPER_ENV_RE, RUNTIME_HTTP_STUB_AUTHORITY, parseRuntimeEnvProposal, strategyForRule, SAFE_DISABLE_ENV_ALLOWLIST, isSafeDisableCandidate, proposalStrategyFitsEntry, proposalFor, synthesizeManifestEnv, CONFIG_FILE_RE, BUILD_CONFIG_FILE_RE, ENV_FILE_RE, JAVA_FILE_RE, KOTLIN_FILE_RE, PACKAGE_MANIFEST_PATH, PLACEHOLDER_RE, GET_ENV_RE, VALUE_RE, lineOf, propertyPathAt, declaredConfigPropertyNames, shapeFor, valueConsumerShape, dependencyFor, enumValuesForConsumer, compareText, runtimeEnvScenarioId, sameSourcePath, buildRuntimeEnvManifest, buildRuntimeEnvResolutionReport, buildRuntimeEnvEffectiveReport, countsFor, applyRuntimeEnvImpact, TS_LANGUAGES, EXTENSIONS, TS_SOURCE_EXTENSIONS_BY_RUNTIME_EXT, scriptKindFor2, normalizeRelativePath, candidatePaths, normalizeConfigPath, stripJsonComments, loadTsConfigResolver, matchPathPattern, applyPathTarget, resolveAliasModule, resolveModule, aliasIfDifferent, exportedSymbols, expressionRootName, addSymbol, compareText2, variableBindingNames, importEqualsSpecifier, extractSymbols, fingerprintFor, createTsAstDependencyGraphBuilder, isTsLike, debug, warn, tryLoad, trySave, createIncrementalAstGraphBuilder, SOURCES, SINKS, SANITIZERS, DEFAULT_TS_TAINT_TABLES, JAVA_SOURCES, JAVA_SINKS, JAVA_SANITIZERS, DEFAULT_JAVA_TAINT_TABLES, PROPAGATOR_RESULT_TAILS, PROPAGATOR_STATE_TAILS, SUBJECT_CTOR_TYPES, CALLBACK_TAINT, TAINT_UNION_BINOPS, EMPTY_SUMMARY, paramSentinel, PARAM_SENTINEL_RE, MAX_CROSS_FILE_DEPTH, JAVA_LINE_TERMINATORS, HOST_FIXING_PREFIX_RE, KNOWN_STRING_CONSTANTS, MAX_CONSTANT_DEPTH, TYPE_DECLARATION, CALLABLE, SIMPLE_ESCAPES, TYPE_DECL_NODES, indexCache, SCOPE_BOUNDARY, SCOPE_BOUNDARY2, TYPE_DECL, STRING_PASSTHROUGH, ARG_PASSTHROUGH, CONTAINER_ELEMENT, BUILDER_APPENDERS, COLLECTION_MUTATORS, RECEIVER_FOLD_MUTATORS, HOST_FIXED_MARK, STRING_BUILDER_TYPES, BUILDER_PREFIX_BREAKERS, PREFIX_DROPPING_PASSTHROUGH, CONDITIONAL_CONSTRUCT, INERT_URL_ACCESSOR_RE, EMPTY_SUMMARY2, paramSentinel2, PARAM_SENTINEL_RE2, MAX_CROSS_METHOD_DEPTH, SANITIZE_CALL, BYPASS_CALL, PREFIX_GATE, MAX_VALUE_HOPS, SOURCE_PATTERNS, MAPPING_ANNOTATIONS, PARAM_ANNOTATIONS, AUTHZ_ANNOTATIONS, VALIDATION_ANNOTATIONS, annotationScanner, TYPE_DECL2, MODIFIER, METHOD_NAME, LEADING_ANNOTATION, simpleName, lineOf2, readBalanced, annotationArgs, firstStringLiteral, readMappingPath, readMappingMethod, joinPaths, skipToDeclaration, isTypeDeclaration, splitParams, parseParam, readAuthAnnotations, ROLE_ANNOTATIONS, stripRolePrefix, readAuthRoles, precedingBlock, readClassContext, extractFromFile, JAXRS_VERBS, JAXRS_PARAM_ANNOTATIONS, JAXRS_IMPORT, parseJaxRsParam, readJaxRsPath, JAXRS_TYPE_DECL, readJaxRsType, IMPLEMENTS_DECL, readImplCandidate, escapeRegExp, findImplMethod, extractJaxRsEndpoints, extractHttpEndpoints, findEnclosingEndpoint, SINK_ATTACKS, AI_TRIAGE_ATTACK_ALIASES, SOURCE_KIND, kindsFromSources, deriveAuthContext, resolveCompanionParams, resolveInjectionPoint, buildServerRequest, buildClientRequest, generateAttackScenario, UNASSESSED_CATALOG, BY_ID, buildUnassessedItems, INJECTION_LANGUAGES, TIER_A_INJECTION_ITEMS, CONFIRMED_LIMITATION, INCONCLUSIVE_LIMITATION, evidenceFrom, byFileLine, CHECKLIST_VERDICT_RANK, mergeEqualRank, dedupeByChecklistId, scenarioByFileLine, PENTEST_CHECKLIST_TOTAL, DECLARED_CHECKLIST_IDS, buildChecklistCoverage, buildCoverage, assembleAssessment, CONFIG_ENTRY_RE, SKIPPED_ENTRY_RE, XML_COMMENT_RE2, SYSTEM_PATH_RE, declaredSystemJarEntries, declaredSystemJarPaths, readCentralDirectory, readEntryBytes, readEntryText, languageFor, detectMissingSystemJars, readJarConfigFiles, readJarClassFiles, listJarClassNames, MIN_CONSTANT_LEN, MAX_CONSTANT_LEN, MAX_CONSTANTS_PER_CLASS, NOISE_CONSTANT_RE, parseClassConstants, constantRank, readJarClassConstants, collectDependencyClassConstants, collectDependencyClassNames, collectDependencyConfigFiles, JWT_CONTEXT_MARKER_RE, BASE64_SHAPE_RE, MIN_BASE64_KEY_CHARS, MAX_BASE64_KEY_CHARS, decodedByteLength, readJarJwtKeyCandidates, collectJwtKeyCandidates, JWT_FACADE_RE, JWT_DECODE_CALL_RE, JWT_VERIFY_MARKER_RE, readJarDecodeOnlyEvidence, collectDecodeOnlyEvidence, collectEagerKafkaStartupJars, EMPTY_DEPENDENCY_GUARDS, DENY_CLASS_RE, ASPECT_DESC, ADVICE_DESC_RE, POINTCUT_DESC, ACC_INTERFACE, ACC_ANNOTATION, MAX_HOPS, operandLength, Reader, parseClass, simpleName2, packageOf, scanClassFilesForGuards, collectDependencyGuardFacts, TEST_SOURCE_SET_RE, isTestSourcePath, STANDARD_GUARD_ANNOTATIONS, MAX_HOPS2, DENY_EXCEPTION, DENY_STATUS, DENY_SEND_ERROR, isJava2, lineOf3, maskStrings, ANNOTATION_NAME, annotationNames, parseClass2, denyHitOf, methodKey, endpointGuardKey, sourceRootOf, sameModuleFirst, calleesOf, scanAuthorizationGuards, guardForEndpoint, MAX_EVIDENCE3, REVIEW_SIGNAL_MAP, asJsonRecord, readReviewFinding, parseReviewReport, reviewReportRuleIds, evidenceOf, sortEvidence, foldReviewSignals, MAX_EVIDENCE22, AUTHORIZATION_RISK_EVIDENCE, MASS_ASSIGNMENT_EVIDENCE, OWNERSHIP_SCOPE_EVIDENCE, STATE_TRANSITION_EVIDENCE, AI_SIGNAL_MAP, readPerRule, parseAiReviewReport, evidenceOf2, sortEvidence2, scopeClauseOf, provenanceOf, skipReasonOf, anchorResolves, anchorOf, unresolvableCitationClause, citationGateClause, citationTargetNoun, miscitationBreakdown, anchorAccepts, foldAiSignals, IMPORT_LINE_RE, isImportOrPackageLine, CSRF_SPEC, CORS_SPEC, HEADERS_SPEC, STACKTRACE_SPEC, MESSAGE_SPEC, COOKIE_SPEC, SESSION_FIXATION_SPEC, SESSION_TIMEOUT_SPEC, AUTH_CACHE_SPEC, lineOf4, SECURITY_CONFIG_RE, CSRF_DISABLE_RE, CORS_WILDCARD_RE, CROSS_ORIGIN_BARE_RE, ALLOW_CREDENTIALS_RE, CORS_EXPLICIT_ORIGIN_RE, CORS_ANY_RE, HEADERS_DISABLE_RES, HEADERS_CONFIGURED_RE, CSP_CONFIGURED_RE, STACKTRACE_EXPOSE_RE, STACKTRACE_NEVER_RE, MESSAGE_EXPOSE_RE, MESSAGE_NEVER_RE, COOKIE_CONTEXT_RE, COOKIE_INSECURE_CHECKS, COOKIE_HARDENED_RE, SESSION_FIXATION_DISABLED_RE, CACHE_CONTROL_DISABLE_RE, CACHE_CONTROL_CONFIGURED_RE, SESSION_TIMEOUT_PATH_RE, SESSION_BLOCK_HEADER_RE, SESSION_TIMEOUT_LEAF_RE, YAML_INDENT_RE, control, configEvidence, firstMatch, firstMatchAny, scanCsrf, CORS_ORIGINS_YAML_RE, CORS_CREDENTIALS_YAML_RE, isWildcardOrigins, corsConfigRank, corsOriginHits, scanCors, scanSecurityHeaders, NON_PROD_PROFILE_RE, scanStacktraceExposure, scanErrorMessageExposure, scanCookieAttributes, scanSessionFixation, scanAuthCacheControl, findSessionTimeout, timeoutNeverExpires, timeoutToMinutes, JWT_VALIDITY_RE, NON_PROD_CONFIG_RE, findJwtValidities, hoursOf, judgeJwtValidity, judgeServletTimeout, scanSessionTimeout, scanSecurityConfig, WEAK_CRYPTO_SPEC, MAX_EVIDENCE32, lineOf5, classifyAlgorithm, GET_INSTANCE_RE, COMMONS_DIGEST_RE, GUAVA_HASHING_RE, SECRET_KEY_SPEC_RE, SHORTHAND_ALGO, SECURITY_DIGEST_PURPOSE_RE, NON_SECURITY_DIGEST_PURPOSE_RE, isNonSecurityDigestUse, collectWeakHits, STRONG_CRYPTO_RE, STRONG_CRYPTO_RE_G, firstStrong, evidence, item, scanWeakCrypto, REGEX_PRECEDING_KEYWORDS, isIdentChar, regexAllowedAt, maskJsComments, maskedCorpusCache2, maskJsFiles, BROWSER_STORAGE_SPEC, MAX_EVIDENCE4, lineOf6, HIGH_SENSITIVITY_RE, TOKEN_FAMILY_RE, classifyStorageKey, VALUE_TOKEN_FAMILY_RE, classifyStorageValue, keyToken, SET_ITEM_RE, BRACKET_ASSIGN_RE, STORAGE_USE_RE, IDB_CONTEXT_RE, LOCALFORAGE_SET_RE, IDB_STORE_WRITE_RE, collectStorageHits, collectIndexedDbHits, finalizeHits, firstStorageUse, evidence2, item2, scanSensitiveBrowserStorage, AT_REST_SPEC, MAX_EVIDENCE5, lineOf7, PWD_GETTER, PWD_EQUALS_RECEIVER_RE, PWD_EQUALS_ARG_RE, collectPasswordComparisonHits, SENSITIVE_FIELD_NAMES, FIELD_DECL_RE, FIELD_PROTECTED_RE, precedingBlock2, collectPlaintextFieldHits, finalizeHits2, PROTECTION_RE, firstProtection, AT_REST_SURFACE_RE, evidence3, item3, scanSensitiveDataAtRest, PADDING_ORACLE_SPEC, MAX_EVIDENCE6, lineOf8, GET_INSTANCE_RE2, collectCbcHits, BAD_PADDING_CATCH_RE, collectBadPaddingHits, finalizeHits3, AEAD_RE, firstAead, CIPHER_SURFACE_RE, evidence4, item4, scanPaddingOracle, FRONTEND_EXT_RE, VENDOR_DIR_RE, GENERATED_NAME_RE, JQUERY_PLUGIN_RE, KNOWN_LIBRARY_RE, BANNER_RE, MINIFIED_AVG_LINE, isThirdPartyAsset, LOGGING_SPEC, MAX_EVIDENCE7, lineOf9, JAVA_LOG_CALL_RE, JAVA_CONSOLE_CALL_RE, JS_CONSOLE_CALL_RE, LOG_SURFACE_RE, stripStringLiterals, PII_RE, findSensitiveToken, IDENTIFIER_RE, SECRET_SEGMENTS, SECRET_SEGMENT_PAIRS, SECRET_SUBSTRING_RE, PROTECTED_SEGMENTS, segmentsOf, isSecretIdentifier, stripNonValueExpressions, collectSensitiveContainers, findSensitiveArgument, findSensitiveOutput, firstLogSurface, evidence5, item5, scanSensitiveLogging, CHECKLIST_ID, CONTROL_ID, TITLE, CWE, MAX_EVIDENCE8, ADMIN_PATH_RE, ADMIN_CONTROLLER_RE, isAdminEndpoint, ADMIN_ROLE_RE, ROLE_CAPABLE_AUTHZ, ROLE_ANNOTATION_RE, SEC_CONFIG_HINT_RE, MATCHER_RE, ACCESS_AFTER_RE, ANY_REQUEST_RE, offsetOfLine, readBalanced2, stringLiterals, antMatches, hasAdminRoleAnnotation, classHeaderOf, memberWindow, annotationStance, accessKind, collectFilterConfig, filterStanceFor, combineProtection, publicNote, item6, auditAdminSurface, CLOUD_ACL_SPEC, MAX_EVIDENCE9, lineOf10, PUBLIC_ACL_PATTERNS, finalizeHits4, collectCannedAclHits, EFFECT_ALLOW_RE, WILDCARD_PRINCIPAL_RE, S3_ACTION_RE, enclosingObject, collectBucketPolicyHits, evidence6, item7, scanCloudStorageAcl, ACTUATOR_SPEC, MAX_EVIDENCE10, CONFIG_FILE_RE2, SENSITIVE_ACTUATOR_ENDPOINTS, lineOf11, indentOf2, isBlankOrComment, splitEndpoints, classifyExposure, exposureNote, H2_NOTE, findChildKey, collectListItems, collectExposureHits, collectH2Hits, finalizeHits5, evidence7, item8, scanActuatorExposure, BACKUP_FILE_SPEC, BACKUP_FILE_GLOBS, BACKUP_FILE_RE, SENSITIVE_BASE_RE, MAX_EVIDENCE11, stripBackupSuffix, classify2, evidence8, scanBackupFiles, CROSSDOMAIN_SPEC, CROSSDOMAIN_GLOBS, MAX_EVIDENCE12, lineOf12, PERMISSIVE_PATTERNS, collectHits, evidence9, scanCrossDomainPolicy, CLIENT_INFO_SPEC, ANGULAR_CONFIG_GLOBS, MAX_EVIDENCE13, lineOf13, asRecord, sourceMapEnabled, buildConfigurations, scanConfigFile, evidence10, item9, scanClientInfoLeak, SENSITIVE_FILE_SPEC, SENSITIVE_FILE_GLOBS, SENSITIVE_FILE_RE, PEM_TEXT_RE, PRIVATE_KEY_HEADER_RE, MAX_EVIDENCE14, classify22, evidence11, scanSensitiveFiles, INSECURE_TRANSPORT_SPEC, ENVIRONMENT_FILE_RE, MAX_EVIDENCE15, lineOf14, extractStringLiterals, HTTP_URL_RE, HTTPS_PRESENCE_RE, isExcludedHost, TEMPLATE_FILE_RE, scanInsecureFormSubmission, isTestPath, scanExternalCleartextLinks, JAVA_FILE_RE2, CLEARTEXT_JAVA_CLIENT_RE, scanJavaCleartextClients, scanInsecureTransport, WEBSOCKET_SPEC, MAX_EVIDENCE16, WS_URL_RE, WSS_PRESENCE_RE, scanWebSocketSecurity, authFillKey, createStubAuthFillResolver, buildAuthFillMap, ALG_TO_HASH, SIGNING_KEY_LINE, ENV_PLACEHOLDER, lineOf15, cleanValue, discoverJwtSigningKeys, b64url, b64urlStr, signingKeyBytes, mintJwt, DEFAULT_JHIPSTER_CLAIMS, RECIPE_NOTE, DECODE_ONLY_NOTE, jarKeysToSigningKeys, sha256Hex, buildRuntimeAuthRecipe, mintTokenFromRecipe, DEFAULT_TTL_SECONDS, commandsFor, credentialFor, runtimeAuthSeedDeviation, runtimeAuthSeedDecodeOnlyDeviation, planFor, buildRuntimeAuthSeedPlan, DEFAULT_TIMEOUT_MS, CRLF, encodeResp, identify, readReply, applyRuntimeAuthSeed, describeShape, resolveRuntimeAuthHypothesis, THREW, createStubRuntimeAuthHypothesisResolver, dataSeedKey, describeShape2, THREW2, resolveRuntimeDataSeedHypothesis, createStubRuntimeDataSeedResolver, buildDataSeedPlan, buildApiCreateSeedPlan, dataSeedEndpointSummaries, IDEMPOTENT_INSERT, BACKSLASH_IS_ESCAPE, escapeSqlString, sqlLiteral, assertIdentifier, renderDataSeedSql, SEED_AUDIT_SENTINEL, AUDIT_FIELD_RE, CLASS_DECL_RE2, TABLE_RE, EXTENDS_RE, NULLABLE_FALSE_RE, LENGTH_RE, stripJavaComments, group, detectSeedAuditColumns, applySeedAuditColumns, seedAuditAddedColumns, OBJECT_SEED_BASELINE_KEY, OBJECT_SEED_BASELINE_CONTENT_BASE64, PENTEST_CANARY_BUCKET, MAX_DERIVED_TARGETS, MAX_DERIVED_EVIDENCE, CONFIG_PATH_RE, BUCKET_KEY_RE, LINE_RE, PLACEHOLDER_RE2, ENC_PREFIX_RE, BOOLEAN_VALUE_RE, HAS_LOWERCASE_RE, canonicalKey, cleanValue2, resolveValue, referencesToken, deriveObjectStoreSeedTargets, renderObjectStoreSeedTsv, REACHABILITY_MANIFEST_SCHEMA_VERSION, MANIFEST_NOTE, SCALAR_JAVA_TYPES, baseTypeName, seedForParam, METHOD_INTENT, buildHint, buildReachabilityManifest, norm, dirOf, baseName, isMavenPom, isGradleBuild, stripXmlComments, isAncestorDir, normModulePath, selectRunnableModule, PACKAGE_DECL, BOOT_CLASS, posix3, detectSpringBootClass, EOCD_SIGNATURE, CENTRAL_SIGNATURE, EOCD_SEARCH_WINDOW, MAX_COMPRESSION_RATIO, MAX_UNCOMPRESSED_BYTES, MAX_ENTRIES, fail, isUnsafeName, readArchive, readArchiveEntryText, SOURCE_EXTENSIONS, extensionOf, baseNameOf, XML_COMMENT_RE3, isAggregatorPom, declaresParentPath, declaresSystemPaths, resolveAgainst, isSafeManifestPath, isSafeBuildTarget, preflightArchive, GRAPH_SKIP_DIRS, toPosix2, isFile, isDirectory, isWithin, resolvesWithin, normalizeModulePath, readText, hasApplicationEntrySource, walkFor, XML_COMMENT_RE4, xmlValue, withoutXmlBlocks, parseMavenModule, nearestAncestorFile, resolveMaven, stripGradleComments, quotedValues, parseGradleSettings, gradleProjectDependencies, conventionalProjectDir, resolveGradle, resolveBuildPackage, discoverBuildPackageEntries, SKIP_DIRS, DEFAULT_PACKAGE_EXCLUDES, SECRET_FILE_EXACT, SECRET_EXTENSIONS, isSecretOrIgnoredFile, MAX_FILE_BYTES, MAX_PARENT_DEPTH, DEFAULT_PACKAGE_POLICY, toPosix22, isFile2, isWithin2, resolvesWithin2, packageRootFor, toRelativeName, globRegexCache, globToRegExp, considerFile, walk, fingerprintEntryData, fingerprintEntries, XML_COMMENT_RE5, RELATIVE_PATH_RE, SYSTEM_PATH_RE2, PARENT_BLOCK_RE, EMPTY_RELATIVE_PATH_RE, readPom, expandBasedir, planServicePackage, CRC_TABLE, crc32, writePackageZip, SIDECAR_IMAGES, HARNESS_PLAN_SCHEMA_VERSION, isConfigFile3, isBuildFile2, stripComments, SERVICE_DEPS, detectDatabaseDependency, detectServiceDependencies, detectHarnessDependencies, AUTO_CONFIGURED_LISTENER_FACTORY, KAFKA_LISTENER_ARGS_RE, LISTENER_PIN_RE, LISTENER_FACTORY_RE, SELF_OFF_FACTORY_BEAN_RE, SET_AUTO_STARTUP_FALSE_RE, classifyKafkaBootPath, buildHarnessPlan, applyKafkaBrokerCoherence, RUNTIME_PLAN_SCHEMA_VERSION, PLAN_NOTE, describeSidecar, buildSteps, buildRuntimeBringUpPlan, RUNTIME_OVERLAY_FILE, RUNTIME_COMPOSE_FILE, RUNTIME_GUIDE_FILE, RUNTIME_BOOT_ENV_FILE, RUNTIME_VAULT_COMPATIBILITY_FILE, SIDECAR_IMAGE, REDIS_CLUSTER_COMMAND, renderNestedYaml, renderOverlay, renderVaultCompatibility, publishLine, renderCompose, renderGuide, renderBootEnv, generateRuntimeArtifacts, SUBMISSION_REQUIREMENTS_SCHEMA_VERSION, MAX_EVIDENCE17, NOTE2, capEvidence, totalSuffix, blockerEvidence, groupBy, packagingRequirements, secretRequirements, POLICY_KINDS, policyRequirements, infrastructureRequirements, authRequirements, seedRequirements, TIER_ORDER, buildSubmissionRequirements, renderSubmissionRequirements, REJECT_SIDECAR, applyRuntimeInput, DESER_SPEC, MAX_EVIDENCE18, lineOf16, UNSAFE_PATTERNS, collectHits2, SAFE_VALIDATOR_RE, firstSafeValidator, evidence12, item10, scanUnsafeDeserialization, WEAK_RANDOM_SPEC, MAX_EVIDENCE19, lineOf17, WEAK_RNG_PATTERNS, SECURITY_ID_RE, statementAround, COOKIE_SINK_MAX_HOPS, namesCarrying, reachesCookie, collectHits3, SECURE_RANDOM_RE, firstSecureRandom, evidence13, item11, scanWeakSecureRandom, POSTMESSAGE_SPEC, MAX_EVIDENCE20, lineOf18, WINDOW_LISTENER_PATTERNS, ORIGIN_RE, isFrontend, listenersIn, evidence14, item12, scanPostMessageOrigin, MAX_EVIDENCE21, MAX_PER_KIND, lineOf19, escapeRe, isScannableFrontendPath, GUARD_FN_TYPES, GUARD_CLASS_IFACES, FN_GUARD_TYPED_RE, CLASS_GUARD_RE, FN_GUARD_PARAM_RE, FN_INTERCEPTOR_RE, INTERCEPTOR_BINDING_RE, CLASS_INTERCEPTOR_RE, INTERCEPT_METHOD_RE, INTERCEPTOR_TOKEN_RE, URL_CHECK_RES, DOM_SANITIZER_CALL_RE, SANITIZER_HELPER_DEF_RE, BYPASS_TRUST_RE, KIND_ORDER, KIND_LABELS, scanClientGuards, renderClientGuards, INDEX_HEADER_SPEC, MAX_EVIDENCE222, lineOf20, isIndexHtml, isNginxConf, META_HTTP_EQUIV_RE, ADD_HEADER_RE, extractHeaders, hasFrameProtection, evidence15, item13, scanIndexHeaders, asRecord2, asCount, parseClientArtifacts, CLIENT_COOKIE_SPEC, MAX_EVIDENCE23, lineOf21, isFrontend2, HIGH_SENSITIVITY_RE2, TOKEN_FAMILY_RE2, SECURE_RE, SAMESITE_RE, COOKIE_WRITE_RE, COOKIE_USE_RE, classifyCookieValue, collectCookieHits, evidenceOf3, resultItem, scanClientCookie, XXE_SPEC, MAX_EVIDENCE24, lineOf22, XML_PARSER_PATTERNS, HARDENING_RE, parsersIn, evidence16, item14, scanXxe, WEAK_TLS_SPEC, MAX_EVIDENCE25, lineOf23, BYPASS_PATTERNS, TLS_SURFACE_RE, bypassesIn, evidence17, item15, scanWeakTls, DOCKERFILE_SPEC, DOCKERFILE_RE, DOCKERFILE_GLOBS, isLoopback, auditDockerfileDependencyConfusion, auditDockerfileContent, scanDockerfile, HOST_HEADER_SPEC, MAX_EVIDENCE26, lineOf25, HOST_PATTERNS, REQUEST_TYPE_RE, REQUEST_NAME_RE, receiverOf, isRequestReceiver, collectHits5, evidence19, item17, scanHostHeader, CHECKLIST_ID2, CONTROL_ID2, TITLE2, evidenceOf4, item18, VALUE_ANNOTATION_RE, FIELD_AFTER_VALUE_RE, LIFETIME_TOKEN_RE, tokenize, hasOtpToken, TIME_UNIT_RE, NAME_UNIT_HINTS, TO_SECONDS, lineOf26, isOtpLifetimeName, configRank, inconclusive, scanOtpPolicy, PASSWORD_POLICY_SPEC, MAX_EVIDENCE27, lineOf27, precedingBlock3, PASSWORD_NAME_RE, NOT_A_SECRET_RE, isPasswordName, STRING_DECL_RE, SIZE_MIN_RE, ANNOTATION_IN_BLOCK_RE, LENGTH_CHECK_RE, CONSTRAINT_VALIDATOR_RE, ANNOTATION_DECL_RE, STRING_LITERAL_RE, QUANT_MIN_RE, POLICY_SURFACE_PATTERNS, ACCOUNT_SURFACE_RE, baseName2, isAccountSurface, collectCustomConstraintMins, sitesIn, firstUsageIndex, pointersIn, dedupeSort, evidenceOf5, item19, policyNote, scanPasswordPolicy, SPEC, MAX_EVIDENCE28, AUTH_SURFACE_RE, ACCOUNT_EXISTENCE_RE, PASSWORD_ONLY_RE, COMBINED_RE, STRING_LITERAL_RE2, lineOf28, scanAuthFile, dedupeSort2, evidenceOf6, item20, scanAccountEnumeration, SPEC2, MAX_EVIDENCE29, LOGOUT_ENDPOINT_RE, LOGOUT_MENTION_RE, INVALIDATION_PATTERNS, lineOf29, invalidationHits, dedupeSort3, evidenceOf7, item21, scanLogoutInvalidation, SPEC3, MAX_EVIDENCE30, OTP_ISSUE_RE, OTP_MENTION_RE, THROTTLE_PATTERNS, lineOf30, firstMatch2, dedupeSort4, evidenceOf8, item22, scanOtpThrottle, MAX_EVIDENCE31, REST_TEMPLATE_CALL_RE, NEW_URL_RE, URL_TAIL_RE, URI_TAIL_RE, OPEN_CONNECTION_RE, SIGNALS, lineOf31, scanSsrfEndpointHints, SPEC4, MAX_EVIDENCE322, HARD_MUTATION_HANDLER_RE, DIRECT_WRITE_RE, DELEGATION_WRITE_RE, TXN_RE, READ_ONLY_TXN_RE, offsetOfLine2, insideLiteral, extractHandlerBody, braceMatchedBlock, signatureRegion, confirmWrite, dedupeSort5, evidenceOf9, item23, scanStateChangingGet, KEY_MANAGEMENT_SPEC, JAVA_FILE_RE3, CONFIG_FILE_RE3, EMPTY_SECRET_KEY_SPEC_RE, EMPTY_KEY_VAR_RE, scanEmptyEncryptionKeys, MFA_AUTH_SPEC, JAVA_FILE_RE4, CONFIG_FILE_RE4, AUTH_SURFACE_RE2, MFA_INDICATORS_RE, MFA_VERIFY_ENDPOINT_RE, SSO_INDICATORS_RE, isTestPath2, isNonSiteLine, scanMfaAuth, PASSWORD_EXPIRY_SPEC, JAVA_FILE_RE5, CONFIG_FILE_RE5, USER_DETAILS_RE, HARDCODED_CREDENTIALS_NON_EXPIRED_RE, ACTIVE_EXPIRY_CHECK_RE, PASSWORD_AGE_SOURCE_RE, ADVISORY_EXPIRY_FLAG_RE, EXPIRY_ENFORCEMENT_RE, forcesPasswordResetViaUpdate, ENFORCEMENT_POINT_RE, LIFERAY_EXPIREABLE_RE, LIFERAY_MAX_AGE_RE, isTestPath3, scanPasswordExpiryPolicy, SETTER_RE, HTTP_STATUS_RECEIVER, HTTP_STATUS_ARG, CONSTANT_ARG, ENUM_ARG, LOADS_EXISTING, ENTITY_DECL_RE, PRINCIPAL_RE, STATE_NOUN, escapeRegExp2, stateReadBefore, hasSameReceiverStateReadBefore, hasCopySourceStateReadBefore, CONSTRUCTED_AS_RE, loadedTypesIn, receiverOriginOf, lineOf32, methodsOf, isJava3, isControllerPath, scanStateTransitionSites, RULE_TITLES, EXTRA_FINDING_RULE_IDS, EXTRA_AI_RULE_IDS, foldExtraRuleFindings, MAX_EVIDENCE33, SEVERITY_ORDER2, SCORE_FLOOR, asRecord3, asString, stripMountPrefix, severityFromTags, field, parseScaReport, effectiveScore, passesThreshold, distinctPairs, bySeverityThenName, evidenceOf10, countBySeverity, provenance, foldScaReport, BRUTE_FORCE_SPEC, MAX_EVIDENCE34, lineOf33, AUTH_CONTEXT_RE, LIMIT_NAME_RE, LOGIN_CONTEXT_RE, LOGIN_WINDOW_LINES, nearLoginContext, MAX_VALUE_ASSIGN_RE, MECHANISM_PATTERNS, RATE_LIMIT_PATTERNS, ISSUANCE_NAME_RE, failOpenHits, patternHits, dedupeSort6, evidenceOf11, item24, scanBruteForceProtection, TS_LANGS, MOUNT_ROOT, MOUNT_ANY, TS_EXT_CANDIDATES, MAX_CHAIN_DEPTH, MAX_REEXPORT_DEPTH, UNRESOLVED_PATH, keyOf, applyRouteConfigOverrides, CLIENT_CLASSES, MANUAL_DELIVERY_SOURCES, ENC, ROUTE_BASE_PREFIX, BENIGN_PARAM, CLIENT_ORACLE, deliveryFor, clientDeliveryKindFor, jsStr, normFile, camel, urlChunk, buildGoto, manualComment, renderMethod, renderSpec, dedupeRoutes, generateClientVerificationSuite, buildClientVerificationManifest, WSTG, TC16, MANUAL_CHECKLIST_ITEMS, NEEDS_MANUAL_LIMITATION, buildManualChecklistItems, handoffFileName, MAX_SURFACE_SAMPLE, surfaceContext, INFRA_CONTEXT, buildHandoffPackets, literal, renderIdorVerificationClass, OBJECT_STORE_PROBE_SINKS, GENERATED_PACKAGE, SERVER_CLASSES, BOOLEAN_BLIND_CLASSES, BOOLEAN_BLIND_PAIRS, CLASS_CANARY, COMMAND_CANARY, VALIDATION_REJECT_CLASSES2, CANON_HELPER, CLASS_ORACLE, javaStr, SSRF_BASELINE_WORKBOOK_ENTRIES, SSRF_BASELINE_WORKBOOK_HELPER, BENIGN_SEED, BUCKET_BENIGN_SEED, benignSeedFor, companionBenignSeed, renderAuthSuffix, RUNTIME_AUTH_SUFFIX, renderRuntimeAuthHelper, pascal, camel2, verificationTestClassName, identChunk, fillPath, companionCalls, ssrfPayloadPath, requestExpr, isVerifiable, SERVER_SKIP_REASON, renderBooleanBlind, renderCanary, isObjectStoreProbeSink, OBJECT_STORE_REJECT_CATCH_LINES, wrapObjectStoreAttackGuard, wrapObjectStoreEvidenceAttackGuard, resolveAuth, renderMethod2, renderEvidenceMethod, renderEvidenceHelpers, renderTestcontainersDbTierFields, renderExternalDbTierFields, javaSeedValue, renderSeedMethod, renderApiCreateSeedMethod, renderClass, toManifestEntries, generateVerificationSuite, buildVerificationManifest, decodeEntities, attr, stripCdata, childMessage, classify3, parseJUnitXml, simpleClassName, joinKey, DEFAULT_TRUST_TIER, resolveFromEnvelope, ingestVerification, PROVENANCE_DETAIL, applyProvenanceDowngrades, asRecord4, asString2, asBool, asInt, asHttpStatus, SIGNALS2, ATTESTATION_METHODS, parseProvenance, parseOracle, parseEffectBoundary, parseDefenseControl, parseBaseline, parseIdor, parseAttack, parseEvidenceEnvelope, asRecord5, asArray, asString3, asNumber, basename4, specOutcome, walkSuite, parsePlaywrightReport, joinKey2, ingestClientVerification, compareChecklistId, correlateVerification, EMPTY_CORRELATION, notTestedItem, groupDastByChecklist, dastAxisFor, groupClientByChecklist, clientAxisFor, correlateAssessment, ZAP_SCAN_RULES, DEFAULT_DAST_OPTIONS, DAST_PLAN_FILE, DAST_MANIFEST_FILE, DAST_PROBE_SCRIPT_FILE, DAST_API_SEED_SCRIPT_FILE, API_SEED_VAR_PREFIX, PROBE_VICTIM_BUCKET_REF, PROBE_CANARY_OBJECT_REF, PROBE_INJECTION_KINDS, isScannable, skipReason, yamlStr, baselinePath, normMethod, toTarget, normalizeSpaRoutePath, buildSpaDastTargets, SEED_VALUE, SSRF_SEED_VALUE, seedValue, pathInjectionSeed, computeApiSeedVars, allParams, queryString, requestPath, renderRequest, renderPlanYaml, cmpChecklistId, generateDastPlan, buildProbeSpec, buildProbe, buildDastManifest, cmpStr3, compareScenarioRef, compareExecutionTarget, shq, PROBE_SCRIPT_PROLOGUE, PROBE_SCRIPT_EPILOGUE, renderDastProbeScript, shLiteral, API_SEED_PY, renderDastApiSeedScript, HTTP_EVIDENCE_MAX_HEADER_BYTES, HTTP_EVIDENCE_MAX_BODY_BYTES, REDACTION_WINDOW_BYTES, HTTP_REDACTED, SENSITIVE_HEADER_RE, NEVER_SENSITIVE_HEADER_RE, SCHEMED_HEADER_RE, COOKIE_HEADER_RE, COOKIE_ATTRIBUTE_RE, JSON_SECRET_MEMBER_RE, HEADER_LINE_RE, TOKEN_RUN_RE, redactJwtRun, redactJwts, URL_USERINFO_RE, redactInline, redactHeaderValue, redactHeaderBlock, redactBody, looksBinary, cutUtf8, boundedPart, sanitizeHttpMessage, httpStatusOf, RISK_BY_CODE, asString4, firstLine, httpEvidenceOf, parseZapReport, firstLineOf, usableTimestamp, latestMessageInstant, parseZapMessages, pathOf, stripTrailingSlash, pathMatches, methodMatches, injectionMatches, routeMatchesOrUnknown, alertMatchesTarget, queryHasParam, messageMatchesSurface, computeDastCoverage, detailOf, DAST_HTTP_EVIDENCE_MAX_RESOLUTIONS, carriesHttpText, evidenceOf12, ingestDast, SEMGREP_CWE_MAP, asRecord6, asString5, asNonNegativeInteger, compareText3, compareCwe, stringsFrom, cwesFromProperties, messageText, compareFinding, findingKey, ruleMetadata, metadataForResult, locationsOf, findingsFromRun, parseSemgrepSarif, compareChecklistId2, unmatchedKey, ingestSemgrep, CHECKLIST_ID3, CONTROL_ID3, MAX_EVIDENCE35, OWNER_SCOPED_FINDER, REPOSITORY_DECL, lineOf34, fieldNameFor, collectOwnerScopedRepositories, LIFERAY_LOAD_BY_ID_RE, OBJECT_PERMISSION_RE, methodBodyAt, liferayIdorHits, scanIdor, children, walk2, walkExecution, field2, simpleType, isReference, line, indexTypes, resolveType, propertyOf, annotations, annotationName, annotationValues, beanProperties, customAccessor, mappedOrigins, controlSignals, conventionSignals, trace, rootOrigins, scenarioFor, MAX_IDOR_AST_FILES, MAX_IDOR_AST_BYTES, scanIdorAuthorization, CHECKLIST_ID4, CONTROL_ID4, MAX_EVIDENCE36, CONTROLLER, MULTIPART_PARAM, JAXRS_IMPORT2, JAXRS_UPLOAD_PARAM, DENYLIST, ALLOWLIST, CONTENT_SNIFF, ACTIVE_CONTENT_EXTENSION, ACTIVE_CONTENT_DEFENCE, ALLOWLIST_WINDOW, lineOf35, collectUploadHandlers, firstMatch3, findActiveContentAllowlist, scanUploadValidation, CHECKLIST_ID5, CONTROL_ID5, MAX_EVIDENCE37, SECRET_KEY_LINE, SELF_IDENTIFYING_KEYS, JWT_CONTEXT_RE, PARENT_KEY_LINE, ancestorPath, ENV_PLACEHOLDER2, NON_PROD_PROFILE, CONFIG_FILE, lineOf36, byFileLine2, collectSecrets, scanJwtSecret, PLATFORM_EOL_SPEC, MAX_EVIDENCE38, SPRING_BOOT_OSS_EOL, LIFERAY_KERNEL_MAJOR, stripComments2, lineOf37, springBootHits, liferayHits, BUILD_FILE_RE, scanPlatformEol, SPEC5, MAX_EVIDENCE39, AUTH_TOKEN_REF_RE, TOKEN_COMPARE_RE, CHECK_CSRF_RE, DISABLED_PROP_RE, lineOf38, enclosingCondition, isRequestValue, scanLiferayCsrf, DEVTOOLS_SPEC, BUILD_FILE_RE2, findDevToolsDeclarations, scanDevTools, PASSWORD_AUTOCOMPLETE_SPEC, HTML_TEMPLATE_FILE_RE, SECURE_AUTOCOMPLETE_VALUES, isTestPath4, auditPasswordAutocompleteContent, scanPasswordAutocomplete, SYSTEM_INFO_LEAK_SPEC, JAVA_FILE_RE6, isTestPath5, PRINT_STACK_TRACE_RE, SYSTEM_PRINT_EXCEPTION_RE, auditJavaErrorDisclosure, scanSystemInfoLeak, PLAYWRIGHT_VERSION_PIN, ESBUILD_VERSION_PIN, renderClientPackageJson, renderClientPlaywrightConfig, renderClientTsconfig, renderClientRunnablePackage, renderComponentBuildScript, normFile2, posixDir, posixJoin, posixNormalize, candidateFilePaths, stripComments3, isAllowedFrameworkImport, extractImportSpecifiers, extractCompanionFiles, resolveInRepoPath, collectComponentClosure, CLIENT_CLASSES2, COMPONENT_NEEDS_BUILD_MARKER, normFile3, jsStr2, camel3, fileChunk, isLikelyInjectable, analyzeMount, renderHarness, tieredAssert, renderMethod3, renderSpec2, generateComponentVerificationSuite, HTTP_VERBS, lineOf39, readBalanced3, getFirstArg, getSecondArg, normalizeTemplateUrl, parseUrlArg, scanFile, extractClientApiCalls, normalizeSegment, normalizePath4, determineConfidence, methodsMatch, matchClientToBackendEndpoints, UPLOAD_CLIENT_SPEC, MAX_EVIDENCE40, lineOf40, isFrontend3, UPLOAD_CONTEXT_RE, FILE_INPUT_RE, ACCEPT_ATTR_RE, CLIENT_CHECK_PATTERNS, SHARED_CONST_SIGNAL_RE, HTTP_UPLOAD_SURFACE_RE, maskHtmlComments, clientChecksIn, fileInputsIn, evidence20, item25, dedupAndCap, scanUploadClientCheck, LOGOUT_CLEAR_SPEC, MAX_EVIDENCE41, lineOf41, isFrontend4, LOGOUT_ENTRY_PATTERNS, CLEAR_STATE_RE, fileClearsState, logoutEntriesIn, evidence21, item26, dedupAndCap2, scanLogoutClear, NUMERIC_BOUND_SPEC, MAX_EVIDENCE42, lineOf42, isFrontend5, isTsLike2, MONEY_NAME_RE, isMoneyName, MIN_BOUND_RE, PATTERN_RE, CONTROL_DECL_RE, moneyControlsIn, moneyInputsIn, evidence22, item27, scanNumericBound;
10769
+ var createCompositeParser, SUPPORTED, createTextParser, requireFromHere, grammarCache, parserInitialized, initParser, resolveGrammarPath, loadGrammar, LANGUAGE_TO_GRAMMAR, SUPPORTED2, createTreeSitterParser, asTreeSitterTree, OPEN_SCRIPT_RE, CLOSE_SCRIPT_RE, LANG_TS_RE, SRC_ATTR_RE, OPEN_TEMPLATE_RE, CLOSE_TEMPLATE_RE, blankOut, keepOnly, templateRange, projectVueSfc, isVueSfcPath, tsMorphPathOf, SUPPORTED3, scriptKindFor, createTsMorphParser, createParser, BASE_CONFIG_RE, PROFILE_CONFIG_RE, HARNESS_PORT, KEY_LINE_RE, yamlEntries, emptyKeys, isConfigYaml, profileRank, declaresDatasource, detectDatasourceProfileBlocker, detectProfileCompositionBlocker, detectServerPortBlocker, XML_COMMENT_RE, INCLUDE_RE, CREATE_TABLE_RE, ALTER_TARGET_RE, matchAllGroups, detectUnrunnableMigrationBlocker, detectPolicyBootBlockers, composeSuggested, BINDABLE_NAME_RE, YAML_KEY_RE, PROPS_KEY_RE, configValueOf, rawTokensOf, MARK, AUTHORITY_LIKE_RE, shapeInAuthority, nextOf, shapeInPath, shapeAt, parseConfigValue, renderTemplate, DIALECT_SPECS, JDBC_URL_PATTERNS, DRIVER_PATTERNS, isConfigFile, isBuildFile, dialectsMatching, resolveDialect, DDL_AUTO_CREATE_RE, FLYWAY_RE, LIQUIBASE_RE, resolveSchemaProvisioning, detectSchemaProvisioning, detectDbTier, DB_SIDECAR_PORT, DISPOSABLE_DB, dbSidecarEnv, buildDbSidecarSpec, maskJavaComments, maskedCorpusCache, maskJavaFiles, PROFILE_GATED_JAR_BEANS, JHIPSTER_PROFILE_CONSTANTS, isJava, CLASS_DECL_RE, PROFILE_ANNOTATION_RE, CONDITIONAL_ANNOTATION_RE, CONFIG_ANNOTATION_RE, readProfileAnnotation, declarationHead, braceMatch, lineAt, parsedClasses, simpleTypeName, parseParams, beanMethods, collectProducers, detectUngatedProfileDependencies, ungatedProfileDeviationText, STANDALONE_BOOT_PROFILE, ENTITY_SCHEMA_GAPS, PROVISIONED_SIDECARS, DEFAULT_PROVISIONED_SIDECARS, NOTE, isConfigFile2, leafKey, indentOf, fullPathFor, usesJpa, detectVaultTemplateCompatibility, KAFKA_BUILD_RE, KAFKA_CONFIG_RE, STREAM_BUILD_RE, STREAM_CONFIG_RE, declaresKafka, declaresStreamBinder, hasPinnedListenerAutoStartup, ENDPOINT_PROPERTY_RULES, ENDPOINT_VALUE_RE, CLUSTER_TOPOLOGY_RULES, literalDatabaseOf, resolveSchemaResolution, buildStandaloneBootProfile, runtimeEnvKeyFor, A_SENTINEL, ENC_SENTINEL, UNAVAILABLE_KAFKA_HOST, UNAVAILABLE_KAFKA_PORT, isBase64JwtSigningKeyPath, isEndpointShaped, isEndpointPropertyPath, hasToken, dummyFor, RELAXED_ENV, envKeyFor, buildSidecars, renderSidecar, identifyByName, PATH_KINDS, PATH_LEAF_ROLES, identifyByPath, roleFromShape, shapedDummy, unavailableKafkaValue, resolveSlot, resolvePlaceholder, encSentinelFor, SHAPE_PRECEDENCE, strongerShape, buildBootResolution, RUNTIME_ENV_MANIFEST_SCHEMA_VERSION, SENSITIVE_ENV_NAME, URL_USERINFO, SENSITIVE_QUERY_VALUE, INLINE_SENSITIVE_VALUE, JWT_VALUE, EFFECTIVE_VALUE_LIMIT, displayEnvValue, UPPER_ENV_RE, RUNTIME_HTTP_STUB_AUTHORITY, parseRuntimeEnvProposal, strategyForRule, SAFE_DISABLE_ENV_ALLOWLIST, isSafeDisableCandidate, proposalStrategyFitsEntry, proposalFor, synthesizeManifestEnv, CONFIG_FILE_RE, BUILD_CONFIG_FILE_RE, ENV_FILE_RE, JAVA_FILE_RE, KOTLIN_FILE_RE, PACKAGE_MANIFEST_PATH, PLACEHOLDER_RE, GET_ENV_RE, VALUE_RE, lineOf, propertyPathAt, declaredConfigPropertyNames, shapeFor, valueConsumerShape, dependencyFor, enumValuesForConsumer, compareText, runtimeEnvScenarioId, sameSourcePath, buildRuntimeEnvManifest, buildRuntimeEnvResolutionReport, buildRuntimeEnvEffectiveReport, countsFor, applyRuntimeEnvImpact, TS_LANGUAGES, EXTENSIONS, TS_SOURCE_EXTENSIONS_BY_RUNTIME_EXT, scriptKindFor2, normalizeRelativePath, candidatePaths, normalizeConfigPath, stripJsonComments, loadTsConfigResolver, matchPathPattern, applyPathTarget, resolveAliasModule, resolveModule, aliasIfDifferent, exportedSymbols, expressionRootName, addSymbol, compareText2, variableBindingNames, importEqualsSpecifier, extractSymbols, fingerprintFor, createTsAstDependencyGraphBuilder, isTsLike, debug, warn, tryLoad, trySave, createIncrementalAstGraphBuilder, SOURCES, SINKS, SANITIZERS, DEFAULT_TS_TAINT_TABLES, JAVA_SOURCES, JAVA_SINKS, JAVA_SANITIZERS, DEFAULT_JAVA_TAINT_TABLES, PROPAGATOR_RESULT_TAILS, PROPAGATOR_STATE_TAILS, SUBJECT_CTOR_TYPES, CALLBACK_TAINT, TAINT_UNION_BINOPS, EMPTY_SUMMARY, paramSentinel, PARAM_SENTINEL_RE, MAX_CROSS_FILE_DEPTH, JAVA_LINE_TERMINATORS, HOST_FIXING_PREFIX_RE, KNOWN_STRING_CONSTANTS, MAX_CONSTANT_DEPTH, TYPE_DECLARATION, CALLABLE, SIMPLE_ESCAPES, TYPE_DECL_NODES, indexCache, SCOPE_BOUNDARY, SCOPE_BOUNDARY2, TYPE_DECL, STRING_PASSTHROUGH, ARG_PASSTHROUGH, CONTAINER_ELEMENT, BUILDER_APPENDERS, COLLECTION_MUTATORS, RECEIVER_FOLD_MUTATORS, HOST_FIXED_MARK, STRING_BUILDER_TYPES, BUILDER_PREFIX_BREAKERS, PREFIX_DROPPING_PASSTHROUGH, CONDITIONAL_CONSTRUCT, INERT_URL_ACCESSOR_RE, EMPTY_SUMMARY2, paramSentinel2, PARAM_SENTINEL_RE2, MAX_CROSS_METHOD_DEPTH, SANITIZE_CALL, BYPASS_CALL, PREFIX_GATE, MAX_VALUE_HOPS, SOURCE_PATTERNS, MAPPING_ANNOTATIONS, PARAM_ANNOTATIONS, AUTHZ_ANNOTATIONS, VALIDATION_ANNOTATIONS, annotationScanner, TYPE_DECL2, MODIFIER, METHOD_NAME, LEADING_ANNOTATION, simpleName, lineOf2, readBalanced, annotationArgs, firstStringLiteral, readMappingPath, readMappingMethod, joinPaths, skipToDeclaration, isTypeDeclaration, splitParams, parseParam, readAuthAnnotations, ROLE_ANNOTATIONS, stripRolePrefix, readAuthRoles, precedingBlock, readClassContext, extractFromFile, JAXRS_VERBS, JAXRS_PARAM_ANNOTATIONS, JAXRS_IMPORT, parseJaxRsParam, readJaxRsPath, JAXRS_TYPE_DECL, readJaxRsType, IMPLEMENTS_DECL, readImplCandidate, escapeRegExp, findImplMethod, extractJaxRsEndpoints, extractHttpEndpoints, findEnclosingEndpoint, SINK_ATTACKS, AI_TRIAGE_ATTACK_ALIASES, SOURCE_KIND, kindsFromSources, deriveAuthContext, resolveCompanionParams, resolveInjectionPoint, buildServerRequest, buildClientRequest, generateAttackScenario, UNASSESSED_CATALOG, BY_ID, buildUnassessedItems, INJECTION_LANGUAGES, TIER_A_INJECTION_ITEMS, CONFIRMED_LIMITATION, INCONCLUSIVE_LIMITATION, evidenceFrom, byFileLine, CHECKLIST_VERDICT_RANK, mergeEqualRank, dedupeByChecklistId, scenarioByFileLine, PENTEST_CHECKLIST_TOTAL, DECLARED_CHECKLIST_IDS, buildChecklistCoverage, buildCoverage, assembleAssessment, CONFIG_ENTRY_RE, SKIPPED_ENTRY_RE, XML_COMMENT_RE2, SYSTEM_PATH_RE, declaredSystemJarEntries, declaredSystemJarPaths, readCentralDirectory, readEntryBytes, readEntryText, languageFor, detectMissingSystemJars, readJarConfigFiles, readJarClassFiles, listJarClassNames, MIN_CONSTANT_LEN, MAX_CONSTANT_LEN, MAX_CONSTANTS_PER_CLASS, NOISE_CONSTANT_RE, parseClassConstants, constantRank, readJarClassConstants, collectDependencyClassConstants, collectDependencyClassNames, collectDependencyConfigFiles, JWT_CONTEXT_MARKER_RE, BASE64_SHAPE_RE, MIN_BASE64_KEY_CHARS, MAX_BASE64_KEY_CHARS, decodedByteLength, readJarJwtKeyCandidates, collectJwtKeyCandidates, JWT_FACADE_RE, JWT_DECODE_CALL_RE, JWT_VERIFY_MARKER_RE, readJarDecodeOnlyEvidence, collectDecodeOnlyEvidence, collectEagerKafkaStartupJars, EMPTY_DEPENDENCY_GUARDS, DENY_CLASS_RE, ASPECT_DESC, ADVICE_DESC_RE, POINTCUT_DESC, ACC_INTERFACE, ACC_ANNOTATION, MAX_HOPS, operandLength, Reader, parseClass, simpleName2, packageOf, scanClassFilesForGuards, collectDependencyGuardFacts, TEST_SOURCE_SET_RE, isTestSourcePath, STANDARD_GUARD_ANNOTATIONS, MAX_HOPS2, DENY_EXCEPTION, DENY_STATUS, DENY_SEND_ERROR, isJava2, lineOf3, maskStrings, ANNOTATION_NAME, annotationNames, parseClass2, denyHitOf, methodKey, endpointGuardKey, sourceRootOf, sameModuleFirst, calleesOf, scanAuthorizationGuards, guardForEndpoint, MAX_EVIDENCE3, REVIEW_SIGNAL_MAP, asJsonRecord, readReviewFinding, parseReviewReport, reviewReportRuleIds, evidenceOf, sortEvidence, foldReviewSignals, MAX_EVIDENCE22, AUTHORIZATION_RISK_EVIDENCE, MASS_ASSIGNMENT_EVIDENCE, OWNERSHIP_SCOPE_EVIDENCE, STATE_TRANSITION_EVIDENCE, AI_SIGNAL_MAP, readPerRule, parseAiReviewReport, evidenceOf2, sortEvidence2, scopeClauseOf, provenanceOf, skipReasonOf, anchorResolves, anchorOf, unresolvableCitationClause, citationGateClause, citationTargetNoun, miscitationBreakdown, anchorAccepts, foldAiSignals, IMPORT_LINE_RE, isImportOrPackageLine, CSRF_SPEC, CORS_SPEC, HEADERS_SPEC, STACKTRACE_SPEC, MESSAGE_SPEC, COOKIE_SPEC, SESSION_FIXATION_SPEC, SESSION_TIMEOUT_SPEC, AUTH_CACHE_SPEC, lineOf4, SECURITY_CONFIG_RE, CSRF_DISABLE_RE, CORS_WILDCARD_RE, CROSS_ORIGIN_BARE_RE, ALLOW_CREDENTIALS_RE, CORS_EXPLICIT_ORIGIN_RE, CORS_ANY_RE, HEADERS_DISABLE_RES, HEADERS_CONFIGURED_RE, CSP_CONFIGURED_RE, STACKTRACE_EXPOSE_RE, STACKTRACE_NEVER_RE, MESSAGE_EXPOSE_RE, MESSAGE_NEVER_RE, COOKIE_CONTEXT_RE, COOKIE_INSECURE_CHECKS, COOKIE_HARDENED_RE, SESSION_FIXATION_DISABLED_RE, CACHE_CONTROL_DISABLE_RE, CACHE_CONTROL_CONFIGURED_RE, SESSION_TIMEOUT_PATH_RE, SESSION_BLOCK_HEADER_RE, SESSION_TIMEOUT_LEAF_RE, YAML_INDENT_RE, control, configEvidence, firstMatch, firstMatchAny, scanCsrf, CORS_ORIGINS_YAML_RE, CORS_CREDENTIALS_YAML_RE, isWildcardOrigins, corsConfigRank, corsOriginHits, scanCors, scanSecurityHeaders, NON_PROD_PROFILE_RE, scanStacktraceExposure, scanErrorMessageExposure, scanCookieAttributes, scanSessionFixation, scanAuthCacheControl, findSessionTimeout, timeoutNeverExpires, timeoutToMinutes, JWT_VALIDITY_RE, NON_PROD_CONFIG_RE, findJwtValidities, hoursOf, judgeJwtValidity, judgeServletTimeout, scanSessionTimeout, scanSecurityConfig, WEAK_CRYPTO_SPEC, MAX_EVIDENCE32, lineOf5, classifyAlgorithm, GET_INSTANCE_RE, COMMONS_DIGEST_RE, GUAVA_HASHING_RE, SECRET_KEY_SPEC_RE, SHORTHAND_ALGO, SECURITY_DIGEST_PURPOSE_RE, NON_SECURITY_DIGEST_PURPOSE_RE, isNonSecurityDigestUse, collectWeakHits, STRONG_CRYPTO_RE, STRONG_CRYPTO_RE_G, firstStrong, evidence, item, scanWeakCrypto, REGEX_PRECEDING_KEYWORDS, isIdentChar, regexAllowedAt, maskJsComments, maskedCorpusCache2, maskJsFiles, BROWSER_STORAGE_SPEC, MAX_EVIDENCE4, lineOf6, HIGH_SENSITIVITY_RE, TOKEN_FAMILY_RE, classifyStorageKey, VALUE_TOKEN_FAMILY_RE, classifyStorageValue, keyToken, SET_ITEM_RE, BRACKET_ASSIGN_RE, STORAGE_USE_RE, IDB_CONTEXT_RE, LOCALFORAGE_SET_RE, IDB_STORE_WRITE_RE, collectStorageHits, collectIndexedDbHits, finalizeHits, firstStorageUse, evidence2, item2, scanSensitiveBrowserStorage, AT_REST_SPEC, MAX_EVIDENCE5, lineOf7, PWD_GETTER, PWD_EQUALS_RECEIVER_RE, PWD_EQUALS_ARG_RE, collectPasswordComparisonHits, SENSITIVE_FIELD_NAMES, FIELD_DECL_RE, FIELD_PROTECTED_RE, precedingBlock2, collectPlaintextFieldHits, finalizeHits2, PROTECTION_RE, firstProtection, AT_REST_SURFACE_RE, evidence3, item3, scanSensitiveDataAtRest, PADDING_ORACLE_SPEC, MAX_EVIDENCE6, lineOf8, GET_INSTANCE_RE2, collectCbcHits, BAD_PADDING_CATCH_RE, collectBadPaddingHits, finalizeHits3, AEAD_RE, firstAead, CIPHER_SURFACE_RE, evidence4, item4, scanPaddingOracle, FRONTEND_EXT_RE, VENDOR_DIR_RE, GENERATED_NAME_RE, JQUERY_PLUGIN_RE, KNOWN_LIBRARY_RE, BANNER_RE, MINIFIED_AVG_LINE, isThirdPartyAsset, LOGGING_SPEC, MAX_EVIDENCE7, lineOf9, JAVA_LOG_CALL_RE, JAVA_CONSOLE_CALL_RE, JS_CONSOLE_CALL_RE, LOG_SURFACE_RE, stripStringLiterals, PII_RE, findSensitiveToken, IDENTIFIER_RE, SECRET_SEGMENTS, SECRET_SEGMENT_PAIRS, SECRET_SUBSTRING_RE, PROTECTED_SEGMENTS, segmentsOf, isSecretIdentifier, stripNonValueExpressions, collectSensitiveContainers, findSensitiveArgument, findSensitiveOutput, firstLogSurface, evidence5, item5, scanSensitiveLogging, CHECKLIST_ID, CONTROL_ID, TITLE, CWE, MAX_EVIDENCE8, ADMIN_PATH_RE, ADMIN_CONTROLLER_RE, isAdminEndpoint, ADMIN_ROLE_RE, ROLE_CAPABLE_AUTHZ, ROLE_ANNOTATION_RE, SEC_CONFIG_HINT_RE, MATCHER_RE, ACCESS_AFTER_RE, ANY_REQUEST_RE, offsetOfLine, readBalanced2, stringLiterals, antMatches, hasAdminRoleAnnotation, classHeaderOf, memberWindow, annotationStance, accessKind, collectFilterConfig, filterStanceFor, combineProtection, publicNote, item6, auditAdminSurface, CLOUD_ACL_SPEC, MAX_EVIDENCE9, lineOf10, PUBLIC_ACL_PATTERNS, finalizeHits4, collectCannedAclHits, EFFECT_ALLOW_RE, WILDCARD_PRINCIPAL_RE, S3_ACTION_RE, enclosingObject, collectBucketPolicyHits, evidence6, item7, scanCloudStorageAcl, ACTUATOR_SPEC, MAX_EVIDENCE10, CONFIG_FILE_RE2, SENSITIVE_ACTUATOR_ENDPOINTS, lineOf11, indentOf2, isBlankOrComment, splitEndpoints, classifyExposure, exposureNote, H2_NOTE, findChildKey, collectListItems, collectExposureHits, collectH2Hits, finalizeHits5, evidence7, item8, scanActuatorExposure, BACKUP_FILE_SPEC, BACKUP_FILE_GLOBS, BACKUP_FILE_RE, SENSITIVE_BASE_RE, MAX_EVIDENCE11, stripBackupSuffix, classify2, evidence8, scanBackupFiles, CROSSDOMAIN_SPEC, CROSSDOMAIN_GLOBS, MAX_EVIDENCE12, lineOf12, PERMISSIVE_PATTERNS, collectHits, evidence9, scanCrossDomainPolicy, CLIENT_INFO_SPEC, ANGULAR_CONFIG_GLOBS, MAX_EVIDENCE13, lineOf13, asRecord, sourceMapEnabled, buildConfigurations, scanConfigFile, evidence10, item9, scanClientInfoLeak, SENSITIVE_FILE_SPEC, SENSITIVE_FILE_GLOBS, SENSITIVE_FILE_RE, PEM_TEXT_RE, PRIVATE_KEY_HEADER_RE, MAX_EVIDENCE14, classify22, evidence11, scanSensitiveFiles, INSECURE_TRANSPORT_SPEC, ENVIRONMENT_FILE_RE, MAX_EVIDENCE15, lineOf14, extractStringLiterals, HTTP_URL_RE, HTTPS_PRESENCE_RE, isExcludedHost, TEMPLATE_FILE_RE, scanInsecureFormSubmission, isTestPath, scanExternalCleartextLinks, JAVA_FILE_RE2, CLEARTEXT_JAVA_CLIENT_RE, scanJavaCleartextClients, scanInsecureTransport, WEBSOCKET_SPEC, MAX_EVIDENCE16, WS_URL_RE, WSS_PRESENCE_RE, scanWebSocketSecurity, authFillKey, createStubAuthFillResolver, buildAuthFillMap, ALG_TO_HASH, SIGNING_KEY_LINE, ENV_PLACEHOLDER, lineOf15, cleanValue, discoverJwtSigningKeys, b64url, b64urlStr, signingKeyBytes, mintJwt, DEFAULT_JHIPSTER_CLAIMS, RECIPE_NOTE, DECODE_ONLY_NOTE, jarKeysToSigningKeys, sha256Hex, buildRuntimeAuthRecipe, mintTokenFromRecipe, DEFAULT_TTL_SECONDS, commandsFor, credentialFor, runtimeAuthSeedDeviation, runtimeAuthSeedDecodeOnlyDeviation, planFor, buildRuntimeAuthSeedPlan, DEFAULT_TIMEOUT_MS, CRLF, encodeResp, identify, readReply, applyRuntimeAuthSeed, describeShape, resolveRuntimeAuthHypothesis, THREW, createStubRuntimeAuthHypothesisResolver, dataSeedKey, describeShape2, THREW2, resolveRuntimeDataSeedHypothesis, createStubRuntimeDataSeedResolver, buildDataSeedPlan, buildApiCreateSeedPlan, dataSeedEndpointSummaries, IDEMPOTENT_INSERT, BACKSLASH_IS_ESCAPE, escapeSqlString, sqlLiteral, assertIdentifier, renderDataSeedSql, SEED_AUDIT_SENTINEL, AUDIT_FIELD_RE, CLASS_DECL_RE2, TABLE_RE, EXTENDS_RE, NULLABLE_FALSE_RE, LENGTH_RE, stripJavaComments, group, detectSeedAuditColumns, applySeedAuditColumns, seedAuditAddedColumns, OBJECT_SEED_BASELINE_KEY, OBJECT_SEED_BASELINE_CONTENT_BASE64, PENTEST_CANARY_BUCKET, MAX_DERIVED_TARGETS, MAX_DERIVED_EVIDENCE, CONFIG_PATH_RE, BUCKET_KEY_RE, LINE_RE, PLACEHOLDER_RE2, ENC_PREFIX_RE, BOOLEAN_VALUE_RE, HAS_LOWERCASE_RE, canonicalKey, cleanValue2, resolveValue, referencesToken, deriveObjectStoreSeedTargets, renderObjectStoreSeedTsv, REACHABILITY_MANIFEST_SCHEMA_VERSION, MANIFEST_NOTE, SCALAR_JAVA_TYPES, baseTypeName, seedForParam, METHOD_INTENT, buildHint, buildReachabilityManifest, norm, dirOf, baseName, isMavenPom, isGradleBuild, stripXmlComments, isAncestorDir, normModulePath, selectRunnableModule, PACKAGE_DECL, BOOT_CLASS, posix3, detectSpringBootClass, EOCD_SIGNATURE, CENTRAL_SIGNATURE, EOCD_SEARCH_WINDOW, MAX_COMPRESSION_RATIO, MAX_UNCOMPRESSED_BYTES, MAX_ENTRIES, fail, isUnsafeName, readArchive, readArchiveEntryText, SOURCE_EXTENSIONS, extensionOf, baseNameOf, XML_COMMENT_RE3, isAggregatorPom, declaresParentPath, declaresSystemPaths, resolveAgainst, isSafeManifestPath, isSafeBuildTarget, preflightArchive, GRAPH_SKIP_DIRS, toPosix2, isFile, isDirectory, isWithin, resolvesWithin, normalizeModulePath, readText, hasApplicationEntrySource, walkFor, XML_COMMENT_RE4, xmlValue, withoutXmlBlocks, parseMavenModule, nearestAncestorFile, resolveMaven, stripGradleComments, quotedValues, parseGradleSettings, gradleProjectDependencies, conventionalProjectDir, resolveGradle, resolveBuildPackage, discoverBuildPackageEntries, SKIP_DIRS, DEFAULT_PACKAGE_EXCLUDES, SECRET_FILE_EXACT, SECRET_EXTENSIONS, isSecretOrIgnoredFile, MAX_FILE_BYTES, MAX_PARENT_DEPTH, DEFAULT_PACKAGE_POLICY, toPosix22, isFile2, isWithin2, resolvesWithin2, packageRootFor, toRelativeName, globRegexCache, globToRegExp, considerFile, walk, fingerprintEntryData, fingerprintEntries, XML_COMMENT_RE5, RELATIVE_PATH_RE, SYSTEM_PATH_RE2, PARENT_BLOCK_RE, EMPTY_RELATIVE_PATH_RE, readPom, expandBasedir, planServicePackage, CRC_TABLE, crc32, writePackageZip, SIDECAR_IMAGES, HARNESS_PLAN_SCHEMA_VERSION, isConfigFile3, isBuildFile2, stripComments, SERVICE_DEPS, detectDatabaseDependency, detectServiceDependencies, detectHarnessDependencies, AUTO_CONFIGURED_LISTENER_FACTORY, KAFKA_LISTENER_ARGS_RE, LISTENER_PIN_RE, LISTENER_FACTORY_RE, SELF_OFF_FACTORY_BEAN_RE, SET_AUTO_STARTUP_FALSE_RE, classifyKafkaBootPath, buildHarnessPlan, applyKafkaBrokerCoherence, RUNTIME_PLAN_SCHEMA_VERSION, PLAN_NOTE, describeSidecar, buildSteps, buildRuntimeBringUpPlan, RUNTIME_OVERLAY_FILE, RUNTIME_COMPOSE_FILE, RUNTIME_GUIDE_FILE, RUNTIME_BOOT_ENV_FILE, RUNTIME_VAULT_COMPATIBILITY_FILE, SIDECAR_IMAGE, REDIS_CLUSTER_COMMAND, renderNestedYaml, renderOverlay, renderVaultCompatibility, publishLine, renderCompose, renderGuide, renderBootEnv, generateRuntimeArtifacts, SUBMISSION_REQUIREMENTS_SCHEMA_VERSION, MAX_EVIDENCE17, NOTE2, capEvidence, totalSuffix, blockerEvidence, groupBy, packagingRequirements, secretRequirements, POLICY_KINDS, policyRequirements, infrastructureRequirements, authRequirements, seedRequirements, TIER_ORDER, buildSubmissionRequirements, renderSubmissionRequirements, REJECT_SIDECAR, applyRuntimeInput, DESER_SPEC, MAX_EVIDENCE18, lineOf16, UNSAFE_PATTERNS, collectHits2, SAFE_VALIDATOR_RE, firstSafeValidator, evidence12, item10, scanUnsafeDeserialization, WEAK_RANDOM_SPEC, MAX_EVIDENCE19, lineOf17, WEAK_RNG_PATTERNS, SECURITY_ID_RE, statementAround, COOKIE_SINK_MAX_HOPS, namesCarrying, reachesCookie, collectHits3, SECURE_RANDOM_RE, firstSecureRandom, evidence13, item11, scanWeakSecureRandom, POSTMESSAGE_SPEC, MAX_EVIDENCE20, lineOf18, WINDOW_LISTENER_PATTERNS, ORIGIN_RE, isFrontend, listenersIn, evidence14, item12, scanPostMessageOrigin, MAX_EVIDENCE21, MAX_PER_KIND, lineOf19, escapeRe, isScannableFrontendPath, GUARD_FN_TYPES, GUARD_CLASS_IFACES, FN_GUARD_TYPED_RE, CLASS_GUARD_RE, FN_GUARD_PARAM_RE, VUE_ROUTE_GUARD_RE, VUE_INTERCEPTOR_RE, FN_INTERCEPTOR_RE, INTERCEPTOR_BINDING_RE, CLASS_INTERCEPTOR_RE, INTERCEPT_METHOD_RE, INTERCEPTOR_TOKEN_RE, URL_CHECK_RES, DOM_SANITIZER_CALL_RE, SANITIZER_HELPER_DEF_RE, BYPASS_TRUST_RE, KIND_ORDER, KIND_LABELS, scanClientGuards, renderClientGuards, INDEX_HEADER_SPEC, MAX_EVIDENCE222, lineOf20, isIndexHtml, isNginxConf, META_HTTP_EQUIV_RE, ADD_HEADER_RE, extractHeaders, hasFrameProtection, evidence15, item13, scanIndexHeaders, asRecord2, asCount, parseClientArtifacts, CLIENT_COOKIE_SPEC, MAX_EVIDENCE23, lineOf21, isFrontend2, HIGH_SENSITIVITY_RE2, TOKEN_FAMILY_RE2, SECURE_RE, SAMESITE_RE, COOKIE_WRITE_RE, COOKIE_USE_RE, classifyCookieValue, collectCookieHits, evidenceOf3, resultItem, scanClientCookie, TS_LANGS, MOUNT_VUE3, MOUNT_VUE2, TS_EXT_CANDIDATES, UNRESOLVED_PATH, unwrap, TS_LANGS2, MOUNT_ROOT, MOUNT_ANY, TS_EXT_CANDIDATES2, MAX_CHAIN_DEPTH, MAX_REEXPORT_DEPTH, UNRESOLVED_PATH2, isVueSfc, inferVueSrcBase, resolveComponentRoutesByFramework, XXE_SPEC, MAX_EVIDENCE24, lineOf22, XML_PARSER_PATTERNS, HARDENING_RE, parsersIn, evidence16, item14, scanXxe, WEAK_TLS_SPEC, MAX_EVIDENCE25, lineOf23, BYPASS_PATTERNS, TLS_SURFACE_RE, bypassesIn, evidence17, item15, scanWeakTls, DOCKERFILE_SPEC, DOCKERFILE_RE, DOCKERFILE_GLOBS, isLoopback, auditDockerfileDependencyConfusion, auditDockerfileContent, scanDockerfile, HOST_HEADER_SPEC, MAX_EVIDENCE26, lineOf25, HOST_PATTERNS, REQUEST_TYPE_RE, REQUEST_NAME_RE, receiverOf, isRequestReceiver, collectHits5, evidence19, item17, scanHostHeader, CHECKLIST_ID2, CONTROL_ID2, TITLE2, evidenceOf4, item18, VALUE_ANNOTATION_RE, FIELD_AFTER_VALUE_RE, LIFETIME_TOKEN_RE, tokenize, hasOtpToken, TIME_UNIT_RE, NAME_UNIT_HINTS, TO_SECONDS, lineOf26, isOtpLifetimeName, configRank, inconclusive, scanOtpPolicy, PASSWORD_POLICY_SPEC, MAX_EVIDENCE27, lineOf27, precedingBlock3, PASSWORD_NAME_RE, NOT_A_SECRET_RE, isPasswordName, STRING_DECL_RE, SIZE_MIN_RE, ANNOTATION_IN_BLOCK_RE, LENGTH_CHECK_RE, CONSTRAINT_VALIDATOR_RE, ANNOTATION_DECL_RE, STRING_LITERAL_RE, QUANT_MIN_RE, POLICY_SURFACE_PATTERNS, ACCOUNT_SURFACE_RE, baseName2, isAccountSurface, collectCustomConstraintMins, sitesIn, firstUsageIndex, pointersIn, dedupeSort, evidenceOf5, item19, policyNote, scanPasswordPolicy, SPEC, MAX_EVIDENCE28, AUTH_SURFACE_RE, ACCOUNT_EXISTENCE_RE, PASSWORD_ONLY_RE, COMBINED_RE, STRING_LITERAL_RE2, lineOf28, scanAuthFile, dedupeSort2, evidenceOf6, item20, scanAccountEnumeration, SPEC2, MAX_EVIDENCE29, LOGOUT_ENDPOINT_RE, LOGOUT_MENTION_RE, INVALIDATION_PATTERNS, lineOf29, invalidationHits, dedupeSort3, evidenceOf7, item21, scanLogoutInvalidation, SPEC3, MAX_EVIDENCE30, OTP_ISSUE_RE, OTP_MENTION_RE, THROTTLE_PATTERNS, lineOf30, firstMatch2, dedupeSort4, evidenceOf8, item22, scanOtpThrottle, MAX_EVIDENCE31, REST_TEMPLATE_CALL_RE, NEW_URL_RE, URL_TAIL_RE, URI_TAIL_RE, OPEN_CONNECTION_RE, SIGNALS, lineOf31, scanSsrfEndpointHints, SPEC4, MAX_EVIDENCE322, HARD_MUTATION_HANDLER_RE, DIRECT_WRITE_RE, DELEGATION_WRITE_RE, TXN_RE, READ_ONLY_TXN_RE, offsetOfLine2, insideLiteral, extractHandlerBody, braceMatchedBlock, signatureRegion, confirmWrite, dedupeSort5, evidenceOf9, item23, scanStateChangingGet, KEY_MANAGEMENT_SPEC, JAVA_FILE_RE3, CONFIG_FILE_RE3, EMPTY_SECRET_KEY_SPEC_RE, EMPTY_KEY_VAR_RE, scanEmptyEncryptionKeys, MFA_AUTH_SPEC, JAVA_FILE_RE4, CONFIG_FILE_RE4, AUTH_SURFACE_RE2, MFA_INDICATORS_RE, MFA_VERIFY_ENDPOINT_RE, SSO_INDICATORS_RE, isTestPath2, isNonSiteLine, scanMfaAuth, PASSWORD_EXPIRY_SPEC, JAVA_FILE_RE5, CONFIG_FILE_RE5, USER_DETAILS_RE, HARDCODED_CREDENTIALS_NON_EXPIRED_RE, ACTIVE_EXPIRY_CHECK_RE, PASSWORD_AGE_SOURCE_RE, ADVISORY_EXPIRY_FLAG_RE, EXPIRY_ENFORCEMENT_RE, forcesPasswordResetViaUpdate, ENFORCEMENT_POINT_RE, LIFERAY_EXPIREABLE_RE, LIFERAY_MAX_AGE_RE, isTestPath3, scanPasswordExpiryPolicy, SETTER_RE, HTTP_STATUS_RECEIVER, HTTP_STATUS_ARG, CONSTANT_ARG, ENUM_ARG, LOADS_EXISTING, ENTITY_DECL_RE, PRINCIPAL_RE, STATE_NOUN, escapeRegExp2, stateReadBefore, hasSameReceiverStateReadBefore, hasCopySourceStateReadBefore, CONSTRUCTED_AS_RE, loadedTypesIn, receiverOriginOf, lineOf32, methodsOf, isJava3, isControllerPath, scanStateTransitionSites, RULE_TITLES, EXTRA_FINDING_RULE_IDS, EXTRA_AI_RULE_IDS, foldExtraRuleFindings, MAX_EVIDENCE33, SEVERITY_ORDER2, SCORE_FLOOR, asRecord3, asString, stripMountPrefix, severityFromTags, field, parseScaReport, effectiveScore, passesThreshold, distinctPairs, bySeverityThenName, evidenceOf10, countBySeverity, provenance, foldScaReport, BRUTE_FORCE_SPEC, MAX_EVIDENCE34, lineOf33, AUTH_CONTEXT_RE, LIMIT_NAME_RE, LOGIN_CONTEXT_RE, LOGIN_WINDOW_LINES, nearLoginContext, MAX_VALUE_ASSIGN_RE, MECHANISM_PATTERNS, RATE_LIMIT_PATTERNS, ISSUANCE_NAME_RE, failOpenHits, patternHits, dedupeSort6, evidenceOf11, item24, scanBruteForceProtection, keyOf, applyRouteConfigOverrides, CLIENT_CLASSES, MANUAL_DELIVERY_SOURCES, ENC, ROUTE_BASE_PREFIX, BENIGN_PARAM, CLIENT_ORACLE, deliveryFor, clientDeliveryKindFor, jsStr, normFile, camel, urlChunk, buildGoto, manualComment, renderMethod, renderSpec, dedupeRoutes, generateClientVerificationSuite, buildClientVerificationManifest, WSTG, TC16, MANUAL_CHECKLIST_ITEMS, NEEDS_MANUAL_LIMITATION, buildManualChecklistItems, handoffFileName, MAX_SURFACE_SAMPLE, surfaceContext, INFRA_CONTEXT, buildHandoffPackets, literal, renderIdorVerificationClass, OBJECT_STORE_PROBE_SINKS, GENERATED_PACKAGE, SERVER_CLASSES, BOOLEAN_BLIND_CLASSES, BOOLEAN_BLIND_PAIRS, CLASS_CANARY, COMMAND_CANARY, VALIDATION_REJECT_CLASSES2, CANON_HELPER, CLASS_ORACLE, javaStr, SSRF_BASELINE_WORKBOOK_ENTRIES, SSRF_BASELINE_WORKBOOK_HELPER, BENIGN_SEED, BUCKET_BENIGN_SEED, benignSeedFor, companionBenignSeed, renderAuthSuffix, RUNTIME_AUTH_SUFFIX, renderRuntimeAuthHelper, pascal, camel2, verificationTestClassName, identChunk, fillPath, companionCalls, ssrfPayloadPath, requestExpr, isVerifiable, SERVER_SKIP_REASON, renderBooleanBlind, renderCanary, isObjectStoreProbeSink, OBJECT_STORE_REJECT_CATCH_LINES, wrapObjectStoreAttackGuard, wrapObjectStoreEvidenceAttackGuard, resolveAuth, renderMethod2, renderEvidenceMethod, renderEvidenceHelpers, renderTestcontainersDbTierFields, renderExternalDbTierFields, javaSeedValue, renderSeedMethod, renderApiCreateSeedMethod, renderClass, toManifestEntries, generateVerificationSuite, buildVerificationManifest, decodeEntities, attr, stripCdata, childMessage, classify3, parseJUnitXml, simpleClassName, joinKey, DEFAULT_TRUST_TIER, resolveFromEnvelope, ingestVerification, PROVENANCE_DETAIL, applyProvenanceDowngrades, asRecord4, asString2, asBool, asInt, asHttpStatus, SIGNALS2, ATTESTATION_METHODS, parseProvenance, parseOracle, parseEffectBoundary, parseDefenseControl, parseBaseline, parseIdor, parseAttack, parseEvidenceEnvelope, asRecord5, asArray, asString3, asNumber, basename4, specOutcome, walkSuite, parsePlaywrightReport, joinKey2, ingestClientVerification, compareChecklistId, correlateVerification, EMPTY_CORRELATION, notTestedItem, groupDastByChecklist, dastAxisFor, groupClientByChecklist, clientAxisFor, correlateAssessment, ZAP_SCAN_RULES, DEFAULT_DAST_OPTIONS, DAST_PLAN_FILE, DAST_MANIFEST_FILE, DAST_PROBE_SCRIPT_FILE, DAST_API_SEED_SCRIPT_FILE, API_SEED_VAR_PREFIX, PROBE_VICTIM_BUCKET_REF, PROBE_CANARY_OBJECT_REF, PROBE_INJECTION_KINDS, isScannable, skipReason, yamlStr, baselinePath, normMethod, toTarget, normalizeSpaRoutePath, buildSpaDastTargets, SEED_VALUE, SSRF_SEED_VALUE, seedValue, pathInjectionSeed, computeApiSeedVars, allParams, queryString, requestPath, renderRequest, renderPlanYaml, cmpChecklistId, generateDastPlan, buildProbeSpec, buildProbe, buildDastManifest, cmpStr3, compareScenarioRef, compareExecutionTarget, shq, PROBE_SCRIPT_PROLOGUE, PROBE_SCRIPT_EPILOGUE, renderDastProbeScript, shLiteral, API_SEED_PY, renderDastApiSeedScript, HTTP_EVIDENCE_MAX_HEADER_BYTES, HTTP_EVIDENCE_MAX_BODY_BYTES, REDACTION_WINDOW_BYTES, HTTP_REDACTED, SENSITIVE_HEADER_RE, NEVER_SENSITIVE_HEADER_RE, SCHEMED_HEADER_RE, COOKIE_HEADER_RE, COOKIE_ATTRIBUTE_RE, JSON_SECRET_MEMBER_RE, HEADER_LINE_RE, TOKEN_RUN_RE, redactJwtRun, redactJwts, URL_USERINFO_RE, redactInline, redactHeaderValue, redactHeaderBlock, redactBody, looksBinary, cutUtf8, boundedPart, sanitizeHttpMessage, httpStatusOf, RISK_BY_CODE, asString4, firstLine, httpEvidenceOf, parseZapReport, firstLineOf, usableTimestamp, latestMessageInstant, parseZapMessages, pathOf, stripTrailingSlash, pathMatches, methodMatches, injectionMatches, routeMatchesOrUnknown, alertMatchesTarget, queryHasParam, messageMatchesSurface, computeDastCoverage, detailOf, DAST_HTTP_EVIDENCE_MAX_RESOLUTIONS, carriesHttpText, evidenceOf12, ingestDast, SEMGREP_CWE_MAP, asRecord6, asString5, asNonNegativeInteger, compareText3, compareCwe, stringsFrom, cwesFromProperties, messageText, compareFinding, findingKey, ruleMetadata, metadataForResult, locationsOf, findingsFromRun, parseSemgrepSarif, compareChecklistId2, unmatchedKey, ingestSemgrep, CHECKLIST_ID3, CONTROL_ID3, MAX_EVIDENCE35, OWNER_SCOPED_FINDER, REPOSITORY_DECL, lineOf34, fieldNameFor, collectOwnerScopedRepositories, LIFERAY_LOAD_BY_ID_RE, OBJECT_PERMISSION_RE, methodBodyAt, liferayIdorHits, scanIdor, children, walk2, walkExecution, field2, simpleType, isReference, line, indexTypes, resolveType, propertyOf, annotations, annotationName, annotationValues, beanProperties, customAccessor, mappedOrigins, controlSignals, conventionSignals, trace, rootOrigins, scenarioFor, MAX_IDOR_AST_FILES, MAX_IDOR_AST_BYTES, scanIdorAuthorization, CHECKLIST_ID4, CONTROL_ID4, MAX_EVIDENCE36, CONTROLLER, MULTIPART_PARAM, JAXRS_IMPORT2, JAXRS_UPLOAD_PARAM, DENYLIST, ALLOWLIST, CONTENT_SNIFF, ACTIVE_CONTENT_EXTENSION, ACTIVE_CONTENT_DEFENCE, ALLOWLIST_WINDOW, lineOf35, collectUploadHandlers, firstMatch3, findActiveContentAllowlist, scanUploadValidation, CHECKLIST_ID5, CONTROL_ID5, MAX_EVIDENCE37, SECRET_KEY_LINE, SELF_IDENTIFYING_KEYS, JWT_CONTEXT_RE, PARENT_KEY_LINE, ancestorPath, ENV_PLACEHOLDER2, NON_PROD_PROFILE, CONFIG_FILE, lineOf36, byFileLine2, collectSecrets, scanJwtSecret, PLATFORM_EOL_SPEC, MAX_EVIDENCE38, SPRING_BOOT_OSS_EOL, LIFERAY_KERNEL_MAJOR, stripComments2, lineOf37, springBootHits, liferayHits, BUILD_FILE_RE, scanPlatformEol, SPEC5, MAX_EVIDENCE39, AUTH_TOKEN_REF_RE, TOKEN_COMPARE_RE, CHECK_CSRF_RE, DISABLED_PROP_RE, lineOf38, enclosingCondition, isRequestValue, scanLiferayCsrf, DEVTOOLS_SPEC, BUILD_FILE_RE2, findDevToolsDeclarations, scanDevTools, PASSWORD_AUTOCOMPLETE_SPEC, HTML_TEMPLATE_FILE_RE, SECURE_AUTOCOMPLETE_VALUES, isTestPath4, auditPasswordAutocompleteContent, scanPasswordAutocomplete, SYSTEM_INFO_LEAK_SPEC, JAVA_FILE_RE6, isTestPath5, PRINT_STACK_TRACE_RE, SYSTEM_PRINT_EXCEPTION_RE, auditJavaErrorDisclosure, scanSystemInfoLeak, PLAYWRIGHT_VERSION_PIN, ESBUILD_VERSION_PIN, renderClientPackageJson, renderClientPlaywrightConfig, renderClientTsconfig, renderClientRunnablePackage, renderComponentBuildScript, renderVueComponentBuildScript, normFile2, posixDir, posixJoin, posixNormalize, candidateFilePaths, stripComments3, isAllowedFrameworkImport, extractImportSpecifiers, extractCompanionFiles, resolveInRepoPath, collectComponentClosure, CLIENT_CLASSES2, COMPONENT_NEEDS_BUILD_MARKER, COMPONENT_VUE_NOT_MOUNTED_MARKER, normFile3, jsStr2, camel3, fileChunk, isLikelyInjectable, analyzeMount, renderHarness, renderVueHarness, tieredAssert, renderMethod3, renderSpec2, generateComponentVerificationSuite, BINDING, HTML_COMMENT, inventoryVueTemplateSinks, HTTP_VERBS, lineOf39, readBalanced3, getFirstArg, getSecondArg, normalizeTemplateUrl, parseUrlArg, scanFile, extractClientApiCalls, normalizeSegment, normalizePath5, determineConfidence, methodsMatch, matchClientToBackendEndpoints, UPLOAD_CLIENT_SPEC, MAX_EVIDENCE40, lineOf40, isFrontend3, UPLOAD_CONTEXT_RE, FILE_INPUT_RE, ACCEPT_ATTR_RE, CLIENT_CHECK_PATTERNS, SHARED_CONST_SIGNAL_RE, HTTP_UPLOAD_SURFACE_RE, maskHtmlComments, clientChecksIn, fileInputsIn, evidence20, item25, dedupAndCap, scanUploadClientCheck, LOGOUT_CLEAR_SPEC, MAX_EVIDENCE41, lineOf41, isFrontend4, LOGOUT_ENTRY_PATTERNS, CLEAR_STATE_RE, fileClearsState, logoutEntriesIn, evidence21, item26, dedupAndCap2, scanLogoutClear, NUMERIC_BOUND_SPEC, MAX_EVIDENCE42, lineOf42, isFrontend5, isTsLike2, MONEY_NAME_RE, isMoneyName, MIN_BOUND_RE, PATTERN_RE, CONTROL_DECL_RE, moneyControlsIn, moneyInputsIn, evidence22, item27, scanNumericBound;
10440
10770
  var init_dist3 = __esm({
10441
10771
  "../parsers/dist/index.js"() {
10442
10772
  init_dist();
@@ -15714,7 +16044,7 @@ ${edgePart}`);
15714
16044
  title: "HTML Injection",
15715
16045
  reason: "signal-in-review",
15716
16046
  whatToCheck: "Input c\xF3 \u0111\u01B0\u1EE3c ch\xE8n th\u1EB3ng v\xE0o HTML m\xE0 kh\xF4ng escape kh\xF4ng.",
15717
- nextStep: "`cs review` c\xF3 `angular/template-dom-xss` (v3 \u2014 xem #58: bypass sanitizer tr\xEAn d\u1EEF li\u1EC7u v\xE0o t\u1EEB ngo\xE0i component gi\u1EDD b\xE1o `error`, c\xF2n `[innerHTML]` kh\xF4ng bypass th\xEC Angular t\u1EF1 escape n\xEAn kh\xF4ng ph\u1EA3i finding). Ch\u01B0a t\xE1ch th\xE0nh h\u1EA1ng m\u1EE5c ri\xEAng trong `cs assess` (\u0111ang g\u1ED9p v\xE0o c\xE1c d\xF2ng XSS #57/#97). **Theo [ADR-0061]: ch\u1EA1y `cs review --report-format json` r\u1ED3i truy\u1EC1n `cs assess --review-report <file>` th\xEC h\u1EA1ng m\u1EE5c n\xE0y s\u1EBD c\xF3 m\u1ED9t d\xF2ng k\u1EBFt lu\u1EADn ri\xEAng trong b\xE1o c\xE1o.** L\u01B0u \xFD ph\u1EA1m vi: rule ch\u1EC9 ph\u1EE7 M\u1ED8T PH\u1EA6N h\u1EA1ng m\u1EE5c, n\xEAn vi\u1EC7c rule kh\xF4ng t\xECm th\u1EA5y g\xEC KH\xD4NG c\xF3 ngh\u0129a l\xE0 h\u1EA1ng m\u1EE5c \u0111\u1EA1t."
16047
+ nextStep: "`cs review` c\xF3 `angular/template-dom-xss` (v3 \u2014 xem #58: bypass sanitizer tr\xEAn d\u1EEF li\u1EC7u v\xE0o t\u1EEB ngo\xE0i component gi\u1EDD b\xE1o `error`, c\xF2n `[innerHTML]` kh\xF4ng bypass th\xEC Angular t\u1EF1 escape n\xEAn kh\xF4ng ph\u1EA3i finding). Ch\u01B0a t\xE1ch th\xE0nh h\u1EA1ng m\u1EE5c ri\xEAng trong `cs assess` (\u0111ang g\u1ED9p v\xE0o c\xE1c d\xF2ng XSS #57/#97). **Theo [ADR-0061]: ch\u1EA1y `cs review --report-format json` r\u1ED3i truy\u1EC1n `cs assess --review-report <file>` th\xEC h\u1EA1ng m\u1EE5c n\xE0y s\u1EBD c\xF3 m\u1ED9t d\xF2ng k\u1EBFt lu\u1EADn ri\xEAng trong b\xE1o c\xE1o.** L\u01B0u \xFD ph\u1EA1m vi: rule ch\u1EC9 ph\u1EE7 M\u1ED8T PH\u1EA6N h\u1EA1ng m\u1EE5c, n\xEAn vi\u1EC7c rule kh\xF4ng t\xECm th\u1EA5y g\xEC KH\xD4NG c\xF3 ngh\u0129a l\xE0 h\u1EA1ng m\u1EE5c \u0111\u1EA1t.\n\n**Vue (DEV-0093):** `cs assess` c\xF3 `inventoryVueTemplateSinks` qu\xE9t binding `v-html`, `:href`, `:src`, `:to`, `:action` trong kh\u1ED1i `<template>` c\u1EE7a `.vue`. T\xEDn hi\u1EC7u \u0111\u01B0\u1EE3c sinh b\u1EB1ng `vue-template-sink-inventory` + probe component-tier ng\u1ED3i tr\xEAn sink; verdict v\u1EABn `suspected` cho t\u1EDBi khi oracle ct bi\u1EBFn \u0111\u1ED5i. **Ch\xFA \xFD ph\u1EA1m vi:** qu\xE9t template ch\u1EC9 b\u1EAFt ph\u1EA7n `<template>` c\u1EE7a SFC; dataflow t\u1EEB script/computed/props xu\u1ED1ng sink ch\u1EC9 \u0111\u01B0\u1EE3c n\u1ED1i khi c\xF3 c\u1EA1nh d\u1EEF li\u1EC7u x\xE1c \u0111\u1ECBnh \u2014 ch\u01B0a n\u1ED1i \u0111\u01B0\u1EE3c th\xEC verdict \u1EDF `suspected`/`INCONCLUSIVE`, KH\xD4NG \u0111\u01B0\u1EE3c ghi l\xE0 \u0111\xE3 ki\u1EC3m so\xE1t."
15718
16048
  },
15719
16049
  {
15720
16050
  checklistId: "101",
@@ -24938,6 +25268,8 @@ ${todos.join("\n")}` : "";
24938
25268
  "g"
24939
25269
  );
24940
25270
  FN_GUARD_PARAM_RE = /export\s+function\s+([A-Za-z_$][\w$]*)\s*\(\s*route\s*,\s*(?:state|nextState)\b/g;
25271
+ VUE_ROUTE_GUARD_RE = /\b(?:router\s*\.\s*beforeEach\s*\(|beforeEnter\s*:|beforeRoute(?:Enter|Update|Leave)\s*\()/g;
25272
+ VUE_INTERCEPTOR_RE = /\b(?:axios\s*\.)?interceptors\s*\.\s*(?:request|response)\s*\.\s*use\s*\(/g;
24941
25273
  FN_INTERCEPTOR_RE = /export\s+(?:const|function)\s+([A-Za-z_$][\w$]*)[^=\n]*:\s*HttpInterceptorFn\b/g;
24942
25274
  INTERCEPTOR_BINDING_RE = /\bHTTP_INTERCEPTORS\b[^;]{0,200}?\buse(?:Class|Existing|Factory)\s*:\s*([A-Za-z_$][\w$]*)/g;
24943
25275
  CLASS_INTERCEPTOR_RE = /class\s+([A-Za-z_$][\w$]*)[^{]*implements[^{]*\bHttpInterceptor\b/g;
@@ -24977,9 +25309,7 @@ ${todos.join("\n")}` : "";
24977
25309
  const hits = [];
24978
25310
  const guardDeclaringFiles = /* @__PURE__ */ new Set();
24979
25311
  const push = (hit) => {
24980
- const dup = hits.some(
24981
- (h) => h.kind === hit.kind && h.file === hit.file && h.line === hit.line
24982
- );
25312
+ const dup = hits.some((h) => h.kind === hit.kind && h.file === hit.file && h.line === hit.line);
24983
25313
  if (!dup) hits.push(hit);
24984
25314
  };
24985
25315
  for (const f of masked) {
@@ -25014,6 +25344,16 @@ ${todos.join("\n")}` : "";
25014
25344
  });
25015
25345
  guardDeclaringFiles.add(path2);
25016
25346
  }
25347
+ for (const m of content.matchAll(VUE_ROUTE_GUARD_RE)) {
25348
+ push({
25349
+ kind: "route-guard",
25350
+ name: m[0].trim(),
25351
+ file: path2,
25352
+ line: lineOf19(content, m.index ?? 0),
25353
+ note: "Vue Router guard khai b\xE1o; c\u1EA7n \u0111\u1ED1i chi\u1EBFu route t\u1EDBi sink"
25354
+ });
25355
+ guardDeclaringFiles.add(path2);
25356
+ }
25017
25357
  for (const m of content.matchAll(FN_INTERCEPTOR_RE)) {
25018
25358
  push({
25019
25359
  kind: "http-interceptor",
@@ -25023,6 +25363,15 @@ ${todos.join("\n")}` : "";
25023
25363
  note: "HttpInterceptorFn functional interceptor"
25024
25364
  });
25025
25365
  }
25366
+ for (const m of content.matchAll(VUE_INTERCEPTOR_RE)) {
25367
+ push({
25368
+ kind: "http-interceptor",
25369
+ name: m[0].trim(),
25370
+ file: path2,
25371
+ line: lineOf19(content, m.index ?? 0),
25372
+ note: "Axios interceptor \u0111\u0103ng k\xFD; c\u1EA7n \u0111\u1ED1i chi\u1EBFu HTTP flow t\u1EDBi sink"
25373
+ });
25374
+ }
25026
25375
  for (const m of content.matchAll(INTERCEPTOR_BINDING_RE)) {
25027
25376
  push({
25028
25377
  kind: "http-interceptor",
@@ -25427,6 +25776,78 @@ ${todos.join("\n")}` : "";
25427
25776
  )
25428
25777
  ];
25429
25778
  };
25779
+ TS_LANGS = /* @__PURE__ */ new Set(["typescript", "javascript"]);
25780
+ MOUNT_VUE3 = /* @__PURE__ */ new Set(["createRouter"]);
25781
+ MOUNT_VUE2 = /* @__PURE__ */ new Set(["Router", "VueRouter"]);
25782
+ TS_EXT_CANDIDATES = [".js", ".ts", ".jsx", ".tsx", ".mjs", ".cjs", ".vue"];
25783
+ UNRESOLVED_PATH = /* @__PURE__ */ Symbol("unresolved-path");
25784
+ unwrap = (node) => {
25785
+ let current = node;
25786
+ while (current && (Node.isParenthesizedExpression(current) || Node.isAsExpression(current) || Node.isSatisfiesExpression(current))) {
25787
+ current = current.getExpression();
25788
+ }
25789
+ return current;
25790
+ };
25791
+ TS_LANGS2 = /* @__PURE__ */ new Set(["typescript", "javascript"]);
25792
+ MOUNT_ROOT = /* @__PURE__ */ new Set(["forRoot", "provideRouter"]);
25793
+ MOUNT_ANY = /* @__PURE__ */ new Set(["forRoot", "forChild", "provideRouter"]);
25794
+ TS_EXT_CANDIDATES2 = [".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"];
25795
+ MAX_CHAIN_DEPTH = 12;
25796
+ MAX_REEXPORT_DEPTH = 6;
25797
+ UNRESOLVED_PATH2 = /* @__PURE__ */ Symbol("unresolved-path");
25798
+ isVueSfc = (path2) => path2.toLowerCase().endsWith(".vue");
25799
+ inferVueSrcBase = (files, projectRoot) => {
25800
+ const counts = /* @__PURE__ */ new Map();
25801
+ for (const f of files) {
25802
+ const p = f.path.replace(/\\/g, "/");
25803
+ const low = p.toLowerCase();
25804
+ if (!low.endsWith(".vue") && !low.endsWith(".js") && !low.endsWith(".ts")) continue;
25805
+ const m = p.match(/^(.*?\/)?(components|views|pages|layouts|plugins|router|store|utils)\b/);
25806
+ if (m) {
25807
+ const parent = (m[1] ?? "").replace(/\/$/, "");
25808
+ counts.set(parent, (counts.get(parent) ?? 0) + 1);
25809
+ }
25810
+ }
25811
+ let best;
25812
+ let bestN = 0;
25813
+ for (const [base, n] of counts) {
25814
+ if (n > bestN) {
25815
+ best = base;
25816
+ bestN = n;
25817
+ }
25818
+ }
25819
+ if (best !== void 0) return best;
25820
+ return projectRoot ? "src" : void 0;
25821
+ };
25822
+ resolveComponentRoutesByFramework = (files, options = {}) => {
25823
+ const hasVue = files.some((f) => isVueSfc(f.path.replace(/\\/g, "/")));
25824
+ const angularOpts = options.projectRoot ? { projectRoot: options.projectRoot } : {};
25825
+ if (!hasVue) {
25826
+ return {
25827
+ index: resolveComponentRoutes(files, angularOpts),
25828
+ navigationMode: "history",
25829
+ basePath: ""
25830
+ };
25831
+ }
25832
+ const vueResult = resolveVueRoutes(files, {
25833
+ // DEV-0093 fix: a Vue SFC import `import X from '@/components/X'` needs `@/`
25834
+ // to resolve to the project's `src`. The resolver matches files BY PATH,
25835
+ // and a finding's `sinkFile` is RELATIVE (e.g. `src/components/X.vue` or a
25836
+ // subproject-prefixed `onegate_21_fe/src/components/X.vue`) — so `aliasBase`
25837
+ // MUST be relative too, never the absolute projectRoot (which produced paths
25838
+ // like `/work/source/onegate_21_fe/src/components/X.vue` that no finding ever
25839
+ // carried). Infer the base from the corpus: the dir most `.vue` siblings live
25840
+ // in (conventionally `src`), else `<projectRoot>/src` when projectRoot is given.
25841
+ aliasBase: inferVueSrcBase(files, options.projectRoot)
25842
+ });
25843
+ const angularIndex = resolveComponentRoutes(files, angularOpts);
25844
+ const merged = new Map([...angularIndex, ...vueResult.index]);
25845
+ return {
25846
+ index: merged,
25847
+ navigationMode: vueResult.metadata.navigationMode,
25848
+ basePath: vueResult.metadata.basePath
25849
+ };
25850
+ };
25430
25851
  XXE_SPEC = {
25431
25852
  checklistId: "63",
25432
25853
  controlId: "xxe-hardening",
@@ -28101,14 +28522,7 @@ ${masked}`;
28101
28522
  )
28102
28523
  ];
28103
28524
  };
28104
- TS_LANGS = /* @__PURE__ */ new Set(["typescript", "javascript"]);
28105
- MOUNT_ROOT = /* @__PURE__ */ new Set(["forRoot", "provideRouter"]);
28106
- MOUNT_ANY = /* @__PURE__ */ new Set(["forRoot", "forChild", "provideRouter"]);
28107
- TS_EXT_CANDIDATES = [".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"];
28108
- MAX_CHAIN_DEPTH = 12;
28109
- MAX_REEXPORT_DEPTH = 6;
28110
- UNRESOLVED_PATH = /* @__PURE__ */ Symbol("unresolved-path");
28111
- keyOf = (component, file) => `${component}@${normalizePath3(file)}`;
28525
+ keyOf = (component, file) => `${component}@${normalizePath4(file)}`;
28112
28526
  applyRouteConfigOverrides = (index2, overrides) => {
28113
28527
  const working = /* @__PURE__ */ new Map();
28114
28528
  for (const [key, entry] of index2) working.set(key, { ...entry, routes: [...entry.routes] });
@@ -28128,7 +28542,7 @@ ${masked}`;
28128
28542
  if (!existing) {
28129
28543
  working.set(key, {
28130
28544
  componentClass: override.component,
28131
- componentFile: normalizePath3(override.file),
28545
+ componentFile: normalizePath4(override.file),
28132
28546
  routes: [route]
28133
28547
  });
28134
28548
  applied += 1;
@@ -28240,8 +28654,10 @@ ${masked}`;
28240
28654
  return parts.map((p, i) => i === 0 ? p : p.charAt(0).toUpperCase() + p.slice(1)).join("");
28241
28655
  };
28242
28656
  urlChunk = (url) => url.split(/[^A-Za-z0-9]+/).filter((p) => p.length > 0).join("_") || "root";
28243
- buildGoto = (route, delivery) => {
28657
+ buildGoto = (route, delivery, hashRouting = false, basePath = "") => {
28244
28658
  const prefix = route.kind === "resolved" ? "" : ROUTE_BASE_PREFIX;
28659
+ const base = basePath.replace(/^\/+|\/+$/g, "");
28660
+ const basePrefix = base ? `${base}/` : "";
28245
28661
  const segs = route.urlSuffix.split("/").filter((s) => s.length > 0).map((seg) => {
28246
28662
  if (!seg.startsWith(":")) return seg;
28247
28663
  const pname = seg.slice(1);
@@ -28250,7 +28666,8 @@ ${masked}`;
28250
28666
  });
28251
28667
  let path2 = segs.join("/");
28252
28668
  if (delivery.kind === "query") path2 += `?q=${ENC}`;
28253
- return `\`${prefix}/${path2}\``;
28669
+ if (hashRouting) return `\`${prefix}/${basePrefix}#${path2 ? `/${path2}` : ""}\``;
28670
+ return `\`${prefix}/${basePrefix}${path2}\``;
28254
28671
  };
28255
28672
  manualComment = (source) => {
28256
28673
  if (source === "angular/document-referrer") {
@@ -28263,11 +28680,11 @@ ${masked}`;
28263
28680
  " // GIAO PAYLOAD TH\u1EE6 C\xD4NG: ngu\u1ED3n taint kh\xF4ng l\xE1i \u0111\u01B0\u1EE3c qua page.goto \u2014 thi\u1EBFt l\u1EADp v\u1EDBi `payload`."
28264
28681
  ];
28265
28682
  };
28266
- renderMethod = (scenario, route, testName) => {
28683
+ renderMethod = (scenario, route, testName, hashRouting = false, basePath = "") => {
28267
28684
  const oracle = CLIENT_ORACLE[scenario.vulnerabilityClass];
28268
28685
  const o = oracle;
28269
28686
  const delivery = deliveryFor(scenario, route);
28270
- const gotoArg = buildGoto(route, delivery);
28687
+ const gotoArg = buildGoto(route, delivery, hashRouting, basePath);
28271
28688
  const sourceName = scenario.injectionPoint?.name;
28272
28689
  const others = scenario.payloads.filter((p) => p !== o.payload);
28273
28690
  const othersLine = others.length > 0 ? `
@@ -28307,7 +28724,7 @@ ${masked}`;
28307
28724
  }
28308
28725
  };
28309
28726
  };
28310
- renderSpec = (checklistId, pairs) => {
28727
+ renderSpec = (checklistId, pairs, hashRouting = false, basePath = "") => {
28311
28728
  const vulnClass = pairs[0]?.scenario.vulnerabilityClass ?? "dom-xss";
28312
28729
  const label = CLIENT_ORACLE[vulnClass]?.label ?? vulnClass;
28313
28730
  const fileName2 = `${vulnClass}-${checklistId}.client.spec.ts`;
@@ -28322,7 +28739,7 @@ ${masked}`;
28322
28739
  let i = 2;
28323
28740
  while (used.has(name)) name = `${base}_${i++}`;
28324
28741
  used.add(name);
28325
- const { code, meta } = renderMethod(scenario, route, name);
28742
+ const { code, meta } = renderMethod(scenario, route, name, hashRouting, basePath);
28326
28743
  methods.push(code);
28327
28744
  methodMeta.push(meta);
28328
28745
  }
@@ -28371,7 +28788,9 @@ ${methods.join("\n\n")}
28371
28788
  }
28372
28789
  return out;
28373
28790
  };
28374
- generateClientVerificationSuite = (scenarios, routeIndex) => {
28791
+ generateClientVerificationSuite = (scenarios, routeIndex, options = {}) => {
28792
+ const hashRouting = options.hashRouting === true;
28793
+ const basePath = options.basePath ?? "";
28375
28794
  const routesByFile = /* @__PURE__ */ new Map();
28376
28795
  for (const entry of routeIndex.values()) {
28377
28796
  const key = normFile(entry.componentFile);
@@ -28400,7 +28819,7 @@ ${methods.join("\n\n")}
28400
28819
  const sorted = [...pairs].sort(
28401
28820
  (x, y) => x.scenario.sinkFile !== y.scenario.sinkFile ? x.scenario.sinkFile < y.scenario.sinkFile ? -1 : 1 : x.scenario.sinkLine !== y.scenario.sinkLine ? x.scenario.sinkLine - y.scenario.sinkLine : x.route.urlSuffix < y.route.urlSuffix ? -1 : x.route.urlSuffix > y.route.urlSuffix ? 1 : 0
28402
28821
  );
28403
- return renderSpec(checklistId, sorted);
28822
+ return renderSpec(checklistId, sorted, hashRouting, basePath);
28404
28823
  });
28405
28824
  skipped.sort(
28406
28825
  (a, b) => a.checklistId === b.checklistId ? a.vulnerabilityClass < b.vulnerabilityClass ? -1 : a.vulnerabilityClass > b.vulnerabilityClass ? 1 : 0 : Number(a.checklistId) - Number(b.checklistId)
@@ -29099,14 +29518,14 @@ ${SSRF_BASELINE_WORKBOOK_ENTRIES.map(
29099
29518
  }`;
29100
29519
  BENIGN_SEED = "1";
29101
29520
  BUCKET_BENIGN_SEED = "pentest-bucket";
29102
- benignSeedFor = (paramName2, vulnerabilityClass) => {
29103
- if (/bucket/i.test(paramName2)) return BUCKET_BENIGN_SEED;
29521
+ benignSeedFor = (paramName3, vulnerabilityClass) => {
29522
+ if (/bucket/i.test(paramName3)) return BUCKET_BENIGN_SEED;
29104
29523
  if (vulnerabilityClass === "ssrf") {
29105
29524
  return "http://127.0.0.1";
29106
29525
  }
29107
29526
  return BENIGN_SEED;
29108
29527
  };
29109
- companionBenignSeed = (paramName2, vulnerabilityClass) => vulnerabilityClass === "ssrf" && /url|uri|link/i.test(paramName2) ? "http://127.0.0.1" : benignSeedFor(paramName2);
29528
+ companionBenignSeed = (paramName3, vulnerabilityClass) => vulnerabilityClass === "ssrf" && /url|uri|link/i.test(paramName3) ? "http://127.0.0.1" : benignSeedFor(paramName3);
29110
29529
  renderAuthSuffix = (auth) => {
29111
29530
  if (!auth || auth.kind !== "authenticated") return "";
29112
29531
  const roles = auth.roles && auth.roles.length > 0 ? auth.roles : ["USER"];
@@ -30960,7 +31379,7 @@ ${runtimeAuthHelper}` : ""}
30960
31379
  };
30961
31380
  normalizeSpaRoutePath = (prefix, suffix) => {
30962
31381
  const parts = `${prefix}/${suffix}`.split("/").filter(Boolean);
30963
- const combined = "/" + parts.join("/");
31382
+ const combined = `/${parts.join("/")}`;
30964
31383
  return combined.replace(/:([a-zA-Z0-9_$]+)/g, "{$1}");
30965
31384
  };
30966
31385
  buildSpaDastTargets = (routeIndex, options = {}) => {
@@ -30983,8 +31402,9 @@ ${runtimeAuthHelper}` : ""}
30983
31402
  const path2 = normalizeSpaRoutePath(prefix, route.urlSuffix);
30984
31403
  if (seenPaths.has(path2)) continue;
30985
31404
  seenPaths.add(path2);
31405
+ const firstParam = route.params && route.params.length > 0 ? route.params[0] : null;
30986
31406
  const injectionPoint = {
30987
- name: route.params && route.params.length > 0 ? route.params[0] : "route",
31407
+ name: firstParam ?? "route",
30988
31408
  kind: "path"
30989
31409
  };
30990
31410
  targets.push({
@@ -31257,11 +31677,17 @@ ${activeScanJob}
31257
31677
  reason: skipReason(s)
31258
31678
  });
31259
31679
  }
31260
- if (options.spaRoutes !== void 0) {
31680
+ if (options.spaRoutes !== void 0 && options.spaHashRouting !== true) {
31261
31681
  const spaTargets = Array.isArray(options.spaRoutes) ? options.spaRoutes : buildSpaDastTargets(options.spaRoutes, {
31262
31682
  routeBase: options.routeBase
31263
31683
  });
31264
31684
  targets.push(...spaTargets);
31685
+ } else if (options.spaRoutes !== void 0 && options.spaHashRouting === true) {
31686
+ skipped.push({
31687
+ checklistId: "spa-route-reach",
31688
+ vulnerabilityClass: "spa-route-reach",
31689
+ reason: "SPA d\xF9ng HASH routing (Vue Router 3) \u2014 route paths n\u1EB1m sau #/, kh\xF4ng th\u1EC3 qu\xE9t qua HTTP path; ZAP qu\xE9t origin + API quan s\xE1t \u0111\u01B0\u1EE3c, page-tier (Playwright) l\xE1i hash route tr\u1EF1c ti\u1EBFp."
31690
+ });
31265
31691
  }
31266
31692
  const linkedEndpointKeys = new Set(
31267
31693
  (options.endpointLinks ?? []).map(
@@ -32776,12 +33202,12 @@ ${bodyText}` : headerText;
32776
33202
  }
32777
33203
  return result;
32778
33204
  };
32779
- const unwrap = (node) => node?.type === "parenthesized_expression" ? unwrap(children(node)[0] ?? null) : node;
33205
+ const unwrap2 = (node) => node?.type === "parenthesized_expression" ? unwrap2(children(node)[0] ?? null) : node;
32780
33206
  const nullTest = (condition) => {
32781
- const node = unwrap(condition);
33207
+ const node = unwrap2(condition);
32782
33208
  if (node?.type !== "binary_expression") return void 0;
32783
- const left = unwrap(field2(node, "left"));
32784
- const right = unwrap(field2(node, "right"));
33209
+ const left = unwrap2(field2(node, "left"));
33210
+ const right = unwrap2(field2(node, "right"));
32785
33211
  const operator = field2(node, "operator")?.text;
32786
33212
  if (!["==", "!="].includes(operator ?? "")) return void 0;
32787
33213
  const value = left?.type === "null_literal" ? right : right?.type === "null_literal" ? left : null;
@@ -34028,6 +34454,47 @@ for (const f of harnessFiles) {
34028
34454
  console.log(\`\u0110\xE3 bundle \${harnessFiles.length} harness component-tier v\xE0o dist/.\`);
34029
34455
  `;
34030
34456
  };
34457
+ renderVueComponentBuildScript = (framework) => `
34458
+ import { readFileSync, readdirSync, mkdirSync } from 'node:fs';
34459
+ import { dirname, join } from 'node:path';
34460
+ import { createRequire } from 'node:module';
34461
+
34462
+ const require = createRequire(import.meta.url);
34463
+ const esbuild = require('esbuild');
34464
+ const root = dirname(new URL(import.meta.url).pathname);
34465
+ const modules = process.env.CS_VUE_MODULES ?? '/opt/cs-${framework}/node_modules';
34466
+ const vue = JSON.parse(readFileSync(join(modules, 'vue/package.json'), 'utf8'));
34467
+ if (Number(vue.version.split('.')[0]) !== ${framework === "vue2" ? 2 : 3}) {
34468
+ throw new Error('Vue runtime major does not match generated suite');
34469
+ }
34470
+ const plugin = { name: 'cs-vue-sfc', setup(build) {
34471
+ build.onLoad({ filter: /\\.vue$/ }, async ({ path }) => {
34472
+ const source = readFileSync(path, 'utf8');
34473
+ const loader = /<script[^>]*lang=["']ts["']/i.test(source) ? 'ts' : 'js';
34474
+ const script = source.match(/<script[^>]*>([\\s\\S]*?)<\\/script>/i)?.[1] ?? 'export default {}';
34475
+ const template = source.match(/<template[^>]*>([\\s\\S]*)<\\/template>/i)?.[1] ?? '';
34476
+ if (!/\\bexport\\s+default\\b/.test(script)) throw new Error('Vue SFC lacks export default');
34477
+ const component = script.replace(/\\bexport\\s+default\\b/, 'const __component =');
34478
+ if (${framework === "vue2"}) {
34479
+ return { contents: component + '\\n__component.template = ' + JSON.stringify(template) + '; export default __component;', loader };
34480
+ }
34481
+ const compiler = require(join(modules, '@vue/compiler-sfc'));
34482
+ const rendered = compiler.compileTemplate({ source: template, filename: path, id: 'cs-component', compilerOptions: { mode: 'module' } });
34483
+ if (rendered.errors.length) throw new Error('Vue 3 template compile failed: ' + rendered.errors[0]);
34484
+ return { contents: component + '\\n' + rendered.code + '\\n__component.render = render; export default __component;', loader };
34485
+ });
34486
+ } };
34487
+ mkdirSync(join(root, 'dist'), { recursive: true });
34488
+ for (const file of readdirSync(root).filter((f) => /^harness-.*\\.ts$/.test(f)).sort()) {
34489
+ await esbuild.build({
34490
+ entryPoints: [join(root, file)], bundle: true, format: 'iife', platform: 'browser',
34491
+ target: 'es2022', nodePaths: [modules], plugins: [plugin],
34492
+ alias: ${framework === "vue2" ? `{ vue: join(modules, 'vue/dist/vue.esm.js') }` : "{}"},
34493
+ outfile: join(root, 'dist', file.replace(/\\.ts$/, '.js')), logLevel: 'silent'
34494
+ });
34495
+ }
34496
+ console.log('Vue component harnesses bundled.');
34497
+ `;
34031
34498
  normFile2 = (p) => p.replace(/\\/g, "/").replace(/^\.\//, "");
34032
34499
  posixDir = (p) => {
34033
34500
  const norm2 = normFile2(p);
@@ -34199,7 +34666,8 @@ console.log(\`\u0110\xE3 bundle \${harnessFiles.length} harness component-tier v
34199
34666
  return { specFiles, missingImports };
34200
34667
  };
34201
34668
  CLIENT_CLASSES2 = /* @__PURE__ */ new Set(["dom-xss", "open-redirect", "code-injection"]);
34202
- COMPONENT_NEEDS_BUILD_MARKER = "ch\u01B0a resolve \u0111\u01B0\u1EE3c @angular";
34669
+ COMPONENT_NEEDS_BUILD_MARKER = "thi\u1EBFu AST graph";
34670
+ COMPONENT_VUE_NOT_MOUNTED_MARKER = "component-tier ch\u01B0a h\u1ED7 tr\u1EE3 mount Vue";
34203
34671
  normFile3 = (p) => p.replace(/\\/g, "/").replace(/^\.\//, "");
34204
34672
  jsStr2 = (s) => s.replace(/\\/g, "\\\\").replace(/'/g, "\\'");
34205
34673
  camel3 = (slug) => {
@@ -34302,6 +34770,44 @@ const __activatedRouteStub = (
34302
34770
  queryParamMap: { get: (k: string) => (delivery === 'query' && k === 'q' ? payload : null) },
34303
34771
  },
34304
34772
  });
34773
+ `;
34774
+ };
34775
+ renderVueHarness = (componentPath, framework) => {
34776
+ const importPath = `./app/${componentPath}`;
34777
+ const common = `const route = (payload: unknown) => ({ query: { q: payload }, params: { q: payload }, hash: '#/?q=' + encodeURIComponent(String(payload)) });
34778
+ const router = { push: (value: unknown) => { (window as any).__csRouterNavigated = [...((window as any).__csRouterNavigated ?? []), [value]]; return Promise.resolve(true); } };
34779
+ const store = { dispatch: () => Promise.resolve({ submissionNote: (window as any).__csPayload, dossierParts: [], dossierId: 'probe', serviceName: 'probe' }), getters: new Proxy({}, { get: () => (window as any).__csPayload }), state: {} };`;
34780
+ if (framework === "vue2")
34781
+ return `// Generated Vue 2 standalone mount; no app guard/interceptor runs.
34782
+ import Vue from 'vue';
34783
+ import component from '${importPath}';
34784
+ ${common}
34785
+ (window as any).__csMountComponent = async (payload: unknown) => {
34786
+ (window as any).__csPayload = payload;
34787
+ (Vue as any).prototype.$route = route(payload);
34788
+ (Vue as any).prototype.$router = router;
34789
+ (Vue as any).prototype.$store = store;
34790
+ const root = document.createElement('div'); document.body.appendChild(root);
34791
+ const vm = new (Vue as any)({ render: (h: any) => h(component) }).$mount(root);
34792
+ await (Vue as any).nextTick();
34793
+ return vm;
34794
+ };
34795
+ `;
34796
+ return `// Generated Vue 3 standalone mount; no app guard/interceptor runs.
34797
+ import { createApp, nextTick } from 'vue';
34798
+ import component from '${importPath}';
34799
+ ${common}
34800
+ (window as any).__csMountComponent = async (payload: unknown) => {
34801
+ (window as any).__csPayload = payload;
34802
+ const root = document.createElement('div'); document.body.appendChild(root);
34803
+ const app = createApp(component as never);
34804
+ app.config.globalProperties.$route = route(payload);
34805
+ app.config.globalProperties.$router = router;
34806
+ app.config.globalProperties.$store = store;
34807
+ app.mount(root);
34808
+ await nextTick();
34809
+ return app;
34810
+ };
34305
34811
  `;
34306
34812
  };
34307
34813
  tieredAssert = (scenario, oracle) => {
@@ -34318,9 +34824,11 @@ const __activatedRouteStub = (
34318
34824
  }
34319
34825
  return oracle.assert(id).map(
34320
34826
  (line2) => line2.includes("X\xE1c nh\u1EADn th\u1EE7 c\xF4ng.") ? line2.replace("X\xE1c nh\u1EADn th\u1EE7 c\xF4ng.", "X\xE1c nh\u1EADn th\u1EE7 c\xF4ng. (component-tier)") : line2
34827
+ ).map(
34828
+ (line2) => scenario.injectionPoint?.name === "vue/template-probe" ? line2.replace(CLIENT_ORACLE_FAILURE_MARKER, CLIENT_RT_ORACLE_FAILURE_MARKER) : line2
34321
34829
  );
34322
34830
  };
34323
- renderMethod3 = (scenario, componentClass, chunk, testName) => {
34831
+ renderMethod3 = (scenario, componentClass, chunk, testName, mountKind = "angular") => {
34324
34832
  const oracle = CLIENT_ORACLE[scenario.vulnerabilityClass];
34325
34833
  const o = oracle;
34326
34834
  const delivery = clientDeliveryKindFor(scenario);
@@ -34329,23 +34837,24 @@ const __activatedRouteStub = (
34329
34837
  const seedLines = [];
34330
34838
  if (delivery.kind === "query") {
34331
34839
  seedLines.push(
34332
- " // query: b\u01A1m payload v\xE0o location.search TR\u01AF\u1EDAC khi mount (source \u0111\u1ECDc search).",
34333
- " await page.addInitScript((value) => { window.location.search = `?q=${encodeURIComponent(value)}`; }, payload);"
34840
+ " // query: source sees a real URL before the standalone mount.",
34841
+ " const targetUrl = `http://cs-component.invalid/?q=${encodeURIComponent(payload)}`;"
34334
34842
  );
34335
34843
  } else if (delivery.kind === "path") {
34336
34844
  seedLines.push(
34337
- " // path: b\u01A1m payload v\xE0o th\xE0nh ph\u1EA7n path TR\u01AF\u1EDAC khi mount (source \u0111\u1ECDc pathname).",
34338
- " await page.addInitScript((value) => { window.location.pathname = `/${encodeURIComponent(value)}`; }, payload);"
34845
+ " const targetUrl = `http://cs-component.invalid/${encodeURIComponent(payload)}`;"
34339
34846
  );
34340
34847
  } else if (delivery.kind === "window-name") {
34341
34848
  seedLines.push(
34342
34849
  " // window-name: \u0111\u1EB7t browser source TR\u01AF\u1EDAC khi b\u1EA5t k\u1EF3 script n\xE0o ch\u1EA1y.",
34343
- " await page.addInitScript((value) => { window.name = value; }, payload);"
34850
+ " await page.addInitScript((value) => { window.name = value; }, payload);",
34851
+ " const targetUrl = 'http://cs-component.invalid/';"
34344
34852
  );
34345
34853
  } else {
34346
34854
  seedLines.push(
34347
34855
  ` // GIAO PAYLOAD TH\u1EE6 C\xD4NG (component-tier): ngu\u1ED3n ${sourceName ?? "input"} kh\xF4ng l\xE1i \u0111\u01B0\u1EE3c`,
34348
- " // m\u1ED9t c\xE1ch t\u1EA5t \u0111\u1ECBnh \u2014 thi\u1EBFt l\u1EADp payload/src b\u1EB1ng tay r\u1ED3i b\u1ECF comment mount d\u01B0\u1EDBi."
34856
+ " // m\u1ED9t c\xE1ch t\u1EA5t \u0111\u1ECBnh \u2014 thi\u1EBFt l\u1EADp payload/src b\u1EB1ng tay r\u1ED3i b\u1ECF comment mount d\u01B0\u1EDBi.",
34857
+ " const targetUrl = 'http://cs-component.invalid/';"
34349
34858
  );
34350
34859
  }
34351
34860
  const mountLines = delivery.kind === "manual" ? [
@@ -34363,7 +34872,7 @@ const __activatedRouteStub = (
34363
34872
  " /**",
34364
34873
  ` * #${scenario.checklistId} ${scenario.title}`,
34365
34874
  ` * Sink: ${scenario.sinkFile}:${scenario.sinkLine} \xB7 ngu\u1ED3n taint: ${sourceName ?? "input"} \xB7 giao payload: ${delivery.kind}`,
34366
- ` * Mount: ${componentClass} standalone (bootstrapApplication) \xB7 mock theo graph edge.`,
34875
+ ` * Mount: ${componentClass} standalone (${mountKind === "vue" ? "Vue app" : "bootstrapApplication"}) \xB7 mock theo graph edge.`,
34367
34876
  " */",
34368
34877
  ` test('${testName}', async ({ page }) => {`,
34369
34878
  // Open-redirect's page-tier SETUP listens to `framenavigated` — meaningless in a
@@ -34371,7 +34880,8 @@ const __activatedRouteStub = (
34371
34880
  ...scenario.vulnerabilityClass === "open-redirect" ? [] : o.setup,
34372
34881
  ` const payload = '${jsStr2(o.payload)}';`,
34373
34882
  ...seedLines,
34374
- ` await page.goto('about:blank');`,
34883
+ " await page.route('http://cs-component.invalid/**', (route) => route.fulfill({ status: 200, contentType: 'text/html', body: '<html><body></body></html>' }));",
34884
+ " await page.goto(targetUrl);",
34375
34885
  ` await page.addScriptTag({ path: '${bundlePath}' });`,
34376
34886
  ...mountLines,
34377
34887
  " await page.waitForTimeout(250); // \u0111\u1EC3 mount + change detection ch\u1EA1y payload.",
@@ -34395,21 +34905,21 @@ const __activatedRouteStub = (
34395
34905
  }
34396
34906
  };
34397
34907
  };
34398
- renderSpec2 = (checklistId, scenarios, componentPath, componentClass) => {
34908
+ renderSpec2 = (checklistId, scenarios, componentPath, componentClass, mountKind = "angular") => {
34399
34909
  const vulnClass = scenarios[0]?.vulnerabilityClass ?? "dom-xss";
34400
34910
  const label = CLIENT_ORACLE[vulnClass]?.label ?? vulnClass;
34401
34911
  const chunk = fileChunk(componentPath);
34402
- const fileName2 = `${vulnClass}-${checklistId}.component.spec.ts`;
34912
+ const fileName2 = mountKind === "vue" ? `${vulnClass}-${checklistId}-${chunk}.component.spec.ts` : `${vulnClass}-${checklistId}.component.spec.ts`;
34403
34913
  const used = /* @__PURE__ */ new Set();
34404
34914
  const methods = [];
34405
34915
  const methodMeta = [];
34406
34916
  for (const scenario of scenarios) {
34407
- const base = `${camel3(vulnClass)}_component_${chunk}`;
34917
+ const base = `${scenario.injectionPoint?.name === "vue/template-probe" ? "vueTemplateProbe" : camel3(vulnClass)}_component_${chunk}`;
34408
34918
  let name = base;
34409
34919
  let i = 2;
34410
34920
  while (used.has(name)) name = `${base}_${i++}`;
34411
34921
  used.add(name);
34412
- const { code, meta } = renderMethod3(scenario, componentClass, chunk, name);
34922
+ const { code, meta } = renderMethod3(scenario, componentClass, chunk, name, mountKind);
34413
34923
  methods.push(code);
34414
34924
  methodMeta.push(meta);
34415
34925
  }
@@ -34447,19 +34957,57 @@ ${methods.join("\n\n")}
34447
34957
  const skipped = [];
34448
34958
  const closures = /* @__PURE__ */ new Map();
34449
34959
  const appFilesByPath = /* @__PURE__ */ new Map();
34960
+ const isVueSink = (sinkFile) => sinkFile.toLowerCase().endsWith(".vue");
34961
+ const vueScenarios = scenarios.filter(
34962
+ (s) => CLIENT_CLASSES2.has(s.vulnerabilityClass) && isVueSink(s.sinkFile)
34963
+ );
34964
+ for (const scenario of vueScenarios) {
34965
+ const path2 = normFile3(scenario.sinkFile);
34966
+ const source = Array.isArray(options.files) ? options.files.find((f) => normFile3(f.path) === path2) : void 0;
34967
+ const script = source?.content.trim() ?? "";
34968
+ const template = source?.vueTemplate?.trim() ?? "";
34969
+ const reason = options.vueFramework === void 0 ? "kh\xF4ng x\xE1c \u0111\u1ECBnh \u0111\u01B0\u1EE3c Vue major t\u1EEB package.json" : !options.clientRunnable || !source || !template ? "thi\u1EBFu source/template SFC trong runnable suite" : !/\bexport\s+default\b/.test(script) || /<script\s+setup\b/.test(script) ? "script setup ho\u1EB7c export m\u1EB7c \u0111\u1ECBnh kh\xF4ng \u0111\u01B0\u1EE3c adapter h\u1ED7 tr\u1EE3" : /\bimport\s+(?:[^'";]+\s+from\s+)?['"]|\brequire\s*\(/.test(script) ? "SFC c\xF3 import c\u1EA7n app shell ho\u1EB7c dependency ngo\xE0i closure" : null;
34970
+ if (reason !== null) {
34971
+ skipped.push({
34972
+ checklistId: scenario.checklistId,
34973
+ vulnerabilityClass: scenario.vulnerabilityClass,
34974
+ reason: `Component sink ${path2}: ${COMPONENT_VUE_NOT_MOUNTED_MARKER} \u2014 ${reason}.`
34975
+ });
34976
+ continue;
34977
+ }
34978
+ const fullSfc = source ? `<template>
34979
+ ${template}
34980
+ </template>
34981
+ <script${source.language === "typescript" ? ' lang="ts"' : ""}>
34982
+ ${script}
34983
+ </script>
34984
+ ` : `<template>
34985
+ ${template}
34986
+ </template>
34987
+ <script>
34988
+ ${script}
34989
+ </script>
34990
+ `;
34991
+ appFilesByPath.set(path2, { relativePath: path2, content: fullSfc });
34992
+ const group2 = byChecklist.get(scenario.checklistId) ?? [];
34993
+ group2.push({ scenario, componentPath: path2 });
34994
+ byChecklist.set(scenario.checklistId, group2);
34995
+ }
34450
34996
  if (!options.angularResolved) {
34451
34997
  for (const scenario of scenarios) {
34452
34998
  if (!CLIENT_CLASSES2.has(scenario.vulnerabilityClass)) continue;
34999
+ if (isVueSink(scenario.sinkFile)) continue;
34453
35000
  skipped.push({
34454
35001
  checklistId: scenario.checklistId,
34455
35002
  vulnerabilityClass: scenario.vulnerabilityClass,
34456
- reason: `Component-tier c\u1EA7n @angular t\u1EEB node_modules c\u1EE7a project \u0111ang scan nh\u01B0ng ${COMPONENT_NEEDS_BUILD_MARKER} \u2014 ch\u1EA1y npm/cnpm install \u1EDF project r\u1ED3i sinh l\u1EA1i.`
35003
+ reason: `Component-tier ${COMPONENT_NEEDS_BUILD_MARKER} \u2014 kh\xF4ng th\u1EC3 sinh harness t\u1EEB source.`
34457
35004
  });
34458
35005
  }
34459
35006
  } else {
34460
35007
  const analyses = /* @__PURE__ */ new Map();
34461
35008
  for (const scenario of scenarios) {
34462
35009
  if (!CLIENT_CLASSES2.has(scenario.vulnerabilityClass)) continue;
35010
+ if (isVueSink(scenario.sinkFile)) continue;
34463
35011
  const componentPath = normFile3(scenario.sinkFile);
34464
35012
  let analysis = analyses.get(componentPath);
34465
35013
  if (analysis === void 0) {
@@ -34519,19 +35067,35 @@ ${methods.join("\n\n")}
34519
35067
  analysesByPath.set(componentPath, analysis);
34520
35068
  }
34521
35069
  const componentClass = analysis.componentClass;
34522
- if (componentClass === void 0) continue;
35070
+ const vue = isVueSink(componentPath);
35071
+ if (componentClass === void 0 && !vue) continue;
35072
+ const mountedClass = vue ? "VueSfc" : componentClass;
35073
+ if (mountedClass === void 0) continue;
34523
35074
  const sortedScenarios = [...items].map((i) => i.scenario).sort(
34524
35075
  (x, y) => x.sinkFile !== y.sinkFile ? x.sinkFile < y.sinkFile ? -1 : 1 : x.sinkLine - y.sinkLine
34525
35076
  );
34526
- tests.push(renderSpec2(checklistId, sortedScenarios, componentPath, componentClass));
35077
+ tests.push(
35078
+ renderSpec2(
35079
+ checklistId,
35080
+ sortedScenarios,
35081
+ componentPath,
35082
+ mountedClass,
35083
+ vue ? "vue" : "angular"
35084
+ )
35085
+ );
34527
35086
  const chunk = fileChunk(componentPath);
34528
35087
  if (!renderedHarnessChunks.has(chunk)) {
34529
35088
  renderedHarnessChunks.add(chunk);
34530
35089
  harnesses.push({
34531
35090
  fileName: `harness-${chunk}.ts`,
34532
35091
  componentPath,
34533
- componentClass,
34534
- content: renderHarness(componentPath, analysis, componentClass, options.clientRunnable === true)
35092
+ componentClass: mountedClass,
35093
+ content: vue && options.vueFramework ? renderVueHarness(componentPath, options.vueFramework) : renderHarness(
35094
+ componentPath,
35095
+ analysis,
35096
+ mountedClass,
35097
+ options.clientRunnable === true
35098
+ )
34535
35099
  });
34536
35100
  }
34537
35101
  }
@@ -34547,6 +35111,35 @@ ${methods.join("\n\n")}
34547
35111
  ...appFiles !== void 0 ? { appFiles } : {}
34548
35112
  };
34549
35113
  };
35114
+ BINDING = /(?<![\w-])(v-html|(?::|v-bind:)(?:href|src|to|action))\s*=\s*(?:"([^"]*)"|'([^']*)')/g;
35115
+ HTML_COMMENT = /<!--[\s\S]*?-->/g;
35116
+ inventoryVueTemplateSinks = (files) => {
35117
+ const hits = [];
35118
+ for (const file of files) {
35119
+ if (!file.path.endsWith(".vue") || !file.vueTemplate) continue;
35120
+ const template = file.vueTemplate.replace(
35121
+ HTML_COMMENT,
35122
+ (comment) => comment.replace(/[^\r\n]/g, " ")
35123
+ );
35124
+ for (const match of template.matchAll(BINDING)) {
35125
+ const attribute = match[1] ?? "";
35126
+ const expression = (match[2] ?? match[3] ?? "").trim();
35127
+ if (!expression) continue;
35128
+ if (attribute === "v-html" && /^(['"]).*\1$/.test(expression)) continue;
35129
+ hits.push({
35130
+ file: file.path,
35131
+ line: template.slice(0, match.index).split("\n").length,
35132
+ binding: attribute === "v-html" ? "v-html" : "dynamic-url",
35133
+ attribute,
35134
+ assessment: "unresolved"
35135
+ });
35136
+ if (hits.length >= 500) return hits;
35137
+ }
35138
+ }
35139
+ return hits.sort(
35140
+ (a, b) => a.file.localeCompare(b.file) || a.line - b.line || a.attribute.localeCompare(b.attribute)
35141
+ );
35142
+ };
34550
35143
  HTTP_VERBS = /* @__PURE__ */ new Set(["get", "post", "put", "patch", "delete"]);
34551
35144
  lineOf39 = (content, offset) => {
34552
35145
  let line2 = 1;
@@ -34752,7 +35345,7 @@ ${methods.join("\n\n")}
34752
35345
  if (seg === "*" || seg === "**") return ":param";
34753
35346
  return seg;
34754
35347
  };
34755
- normalizePath4 = (path2) => {
35348
+ normalizePath5 = (path2) => {
34756
35349
  if (!path2 || path2 === "/") return "/";
34757
35350
  let p = path2.trim();
34758
35351
  p = p.replace(/\/+$/, "");
@@ -34779,7 +35372,7 @@ ${methods.join("\n\n")}
34779
35372
  const matchedBeIndices = /* @__PURE__ */ new Set();
34780
35373
  const beNormalized = backendEndpoints.map((be) => ({
34781
35374
  endpoint: be,
34782
- normalizedPath: normalizePath4(be.path)
35375
+ normalizedPath: normalizePath5(be.path)
34783
35376
  }));
34784
35377
  for (let i = 0; i < clientRefs.length; i++) {
34785
35378
  const fe = clientRefs[i];
@@ -34787,7 +35380,7 @@ ${methods.join("\n\n")}
34787
35380
  if (fe.urlKind === "dynamic" || !fe.pathTemplate) {
34788
35381
  continue;
34789
35382
  }
34790
- const feNormPath = normalizePath4(fe.pathTemplate);
35383
+ const feNormPath = normalizePath5(fe.pathTemplate);
34791
35384
  for (let j = 0; j < beNormalized.length; j++) {
34792
35385
  const beItem = beNormalized[j];
34793
35386
  if (!beItem) continue;
@@ -42001,7 +42594,7 @@ function convertSlashes(path, separator) {
42001
42594
  function isRootDirectory(path) {
42002
42595
  return path === "/" || WINDOWS_ROOT_DIR_REGEX.test(path);
42003
42596
  }
42004
- function normalizePath5(path, options) {
42597
+ function normalizePath6(path, options) {
42005
42598
  const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
42006
42599
  const pathNeedsCleaning = process.platform === "win32" && path.includes("/") || path.startsWith(".");
42007
42600
  if (resolvePaths) path = resolve(path);
@@ -42295,7 +42888,7 @@ var init_dist6 = __esm({
42295
42888
  constructor(root, options, callback$1) {
42296
42889
  this.isSynchronous = !callback$1;
42297
42890
  this.callbackInvoker = build$1(options, this.isSynchronous);
42298
- this.root = normalizePath5(root, options);
42891
+ this.root = normalizePath6(root, options);
42299
42892
  this.state = {
42300
42893
  root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
42301
42894
  paths: [""].slice(0, 0),
@@ -42339,13 +42932,13 @@ var init_dist6 = __esm({
42339
42932
  let path = joinPathWithBasePath(entry.name, directoryPath);
42340
42933
  this.resolveSymlink(path, this.state, (stat8, resolvedPath) => {
42341
42934
  if (stat8.isDirectory()) {
42342
- resolvedPath = normalizePath5(resolvedPath, this.state.options);
42935
+ resolvedPath = normalizePath6(resolvedPath, this.state.options);
42343
42936
  if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
42344
42937
  this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
42345
42938
  } else {
42346
42939
  resolvedPath = useRealPaths ? resolvedPath : path;
42347
42940
  const filename = basename(resolvedPath);
42348
- const directoryPath$1 = normalizePath5(dirname(resolvedPath), this.state.options);
42941
+ const directoryPath$1 = normalizePath6(dirname(resolvedPath), this.state.options);
42349
42942
  resolvedPath = this.joinPath(filename, directoryPath$1);
42350
42943
  this.pushFile(resolvedPath, files, this.state.counts, filters);
42351
42944
  }
@@ -51484,7 +52077,7 @@ var init_libsql = __esm({
51484
52077
  init_session2();
51485
52078
  }
51486
52079
  });
51487
- var __defProp2, __export2, schema_exports, reviewRuns, findings, buildCacheTable, aiCache, ruleCache, parseCache, astGraphNodes, astGraphEdges, astGraphMeta, SQLITE_BUSY_TIMEOUT_MS, isInMemory, toLibsqlUrl, createDb, DEFAULT_RETRY_DELAYS_MS, isSqliteBusyError, wait, withSqliteBusyRetry, hereDir, defaultMigrationsDir, ensureTrackingTable, listMigrations, alreadyApplied, runMigrations, RULE_EXECUTION_SKIP_REASONS, decodeSkipReasons, encodeSkipReasons, decodeRetryBacklog, decodeRetryIds, parseAiStatsJson, parseRuleResultsJson, parseFixJson, parseFindingMetadataJson, serializeAiStats, serializeRuleResults, serializeFix, serializeFindingMetadata, rowToSummary, rowToFinding, findingFingerprint, runUpsertStatement, findingInsertStatement, createReviewStore, TABLE_BY_NAMESPACE, purgeExpired, createSqliteCacheStore, AST_GRAPH_SCHEMA_VERSION, KNOWN_EDGE_KINDS, parseSymbols, rowToNode, rowToEdge, stringOrNull, createAstGraphStore, clearAstGraphForProject, migration0001, migration0002, migration0003, migration0004, migration0005, migration0006, migration0007, migration0008, migration0009, migration0010, migration0011, migration0012, migration0013, migration0014, migration0015, migration0016, migration0017, migration0018, migration0019, migration0020, migration0021, migration0022, migration0023, migration0024, migration0025, migration0026, migration0027, migration0028, migration0029, migration0030, migration0031, migration0032, migration0033, migration0034, migration0035, migration0036, migration0037, migration0038, migration0039, migration0040, migration0041, migration0042, migration0043, migration0044, migration0045, migration0046, migration0047, mutableRequestStatusPredicate, migration0048, migration0049, previousDefaultAndRetiredModels, mutableRequestPredicate, updatedAt, migration0050, migration0051, migration0052, migration0053, migration0054, migration0055, migration0056, migration0057, migration0058, MARIADB_MIGRATIONS;
52080
+ var __defProp2, __export2, schema_exports, reviewRuns, findings, buildCacheTable, aiCache, ruleCache, parseCache, astGraphNodes, astGraphEdges, astGraphMeta, SQLITE_BUSY_TIMEOUT_MS, isInMemory, toLibsqlUrl, createDb, DEFAULT_RETRY_DELAYS_MS, isSqliteBusyError, wait, withSqliteBusyRetry, hereDir, defaultMigrationsDir, ensureTrackingTable, listMigrations, alreadyApplied, runMigrations, RULE_EXECUTION_SKIP_REASONS, decodeSkipReasons, encodeSkipReasons, decodeRetryBacklog, decodeRetryIds, parseAiStatsJson, parseRuleResultsJson, parseFixJson, parseFindingMetadataJson, serializeAiStats, serializeRuleResults, serializeFix, serializeFindingMetadata, rowToSummary, rowToFinding, findingFingerprint, runUpsertStatement, findingInsertStatement, createReviewStore, TABLE_BY_NAMESPACE, purgeExpired, createSqliteCacheStore, AST_GRAPH_SCHEMA_VERSION, KNOWN_EDGE_KINDS, parseSymbols, rowToNode, rowToEdge, stringOrNull, createAstGraphStore, clearAstGraphForProject, migration0001, migration0002, migration0003, migration0004, migration0005, migration0006, migration0007, migration0008, migration0009, migration0010, migration0011, migration0012, migration0013, migration0014, migration0015, migration0016, migration0017, migration0018, migration0019, migration0020, migration0021, migration0022, migration0023, migration0024, migration0025, migration0026, migration0027, migration0028, migration0029, migration0030, migration0031, migration0032, migration0033, migration0034, migration0035, migration0036, migration0037, migration0038, migration0039, migration0040, migration0041, migration0042, migration0043, migration0044, migration0045, migration0046, migration0047, mutableRequestStatusPredicate, migration0048, migration0049, previousDefaultAndRetiredModels, mutableRequestPredicate, updatedAt, migration0050, migration0051, migration0052, migration0053, migration0054, migration0055, migration0056, migration0057, migration0058, migration0059, MARIADB_MIGRATIONS;
51488
52081
  var init_dist9 = __esm({
51489
52082
  "../storage/dist/index.js"() {
51490
52083
  init_libsql();
@@ -54679,6 +55272,13 @@ var init_dist9 = __esm({
54679
55272
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`
54680
55273
  ]
54681
55274
  };
55275
+ migration0059 = {
55276
+ version: 59,
55277
+ name: "pentest-preferred-build-script",
55278
+ statements: [
55279
+ "ALTER TABLE pentest_requests ADD COLUMN IF NOT EXISTS preferred_build_script VARCHAR(128) NULL"
55280
+ ]
55281
+ };
54682
55282
  MARIADB_MIGRATIONS = [
54683
55283
  migration0001,
54684
55284
  migration0002,
@@ -54737,7 +55337,8 @@ var init_dist9 = __esm({
54737
55337
  migration0055,
54738
55338
  migration0056,
54739
55339
  migration0057,
54740
- migration0058
55340
+ migration0058,
55341
+ migration0059
54741
55342
  ];
54742
55343
  MARIADB_MIGRATIONS[MARIADB_MIGRATIONS.length - 1]?.version ?? 0;
54743
55344
  }
@@ -56649,11 +57250,11 @@ var definedBuildValue = (value, fallback) => typeof value === "string" && value.
56649
57250
  var getCliBuildMetadata = (version2) => ({
56650
57251
  version: version2,
56651
57252
  gitSha: definedBuildValue(
56652
- "f7d82b659a24" ,
57253
+ "cf8265572651" ,
56653
57254
  "unknown"
56654
57255
  ),
56655
57256
  buildTimestamp: definedBuildValue(
56656
- "2026-09-24T08:58:28.797Z" ,
57257
+ "2026-09-26T09:41:22.440Z" ,
56657
57258
  "unknown"
56658
57259
  ),
56659
57260
  configSchemaRange: definedBuildValue(
@@ -56673,7 +57274,395 @@ init_composition();
56673
57274
  init_load();
56674
57275
  init_exit_codes();
56675
57276
  init_find_files();
56676
- var FRONTEND_GLOBS = ["**/*.ts", "**/*.js", "**/*.tsx", "**/*.jsx", "**/*.vue"];
57277
+
57278
+ // src/commands/pentest-verify-io.ts
57279
+ init_dist3();
57280
+ init_zod();
57281
+ var SUITE_MANIFEST = "code-sentinel-suite.json";
57282
+ var DAST_MANIFEST = "code-sentinel-dast.json";
57283
+ var DAST_PROBE_FILE2 = "probe-results.json";
57284
+ var CLIENT_SUITE_MANIFEST = "code-sentinel-client-suite.json";
57285
+ var toolVersion = () => {
57286
+ const req = createRequire(import.meta.url);
57287
+ for (const candidate of ["../../package.json", "../package.json"]) {
57288
+ try {
57289
+ const pkg3 = req(candidate);
57290
+ if (typeof pkg3.version === "string") return pkg3.version;
57291
+ } catch {
57292
+ }
57293
+ }
57294
+ return void 0;
57295
+ };
57296
+ var methodSchema = external_exports.object({
57297
+ methodName: external_exports.string(),
57298
+ checklistId: external_exports.string(),
57299
+ vulnerabilityClass: external_exports.string(),
57300
+ title: external_exports.string(),
57301
+ sinkFile: external_exports.string(),
57302
+ sinkLine: external_exports.number(),
57303
+ idorTarget: external_exports.object({
57304
+ httpMethod: external_exports.string(),
57305
+ path: external_exports.string(),
57306
+ kind: external_exports.enum(["query", "path", "body", "header", "dom"]),
57307
+ candidate: external_exports.object({
57308
+ operation: external_exports.enum(["read", "create", "update", "delete"]),
57309
+ reference: external_exports.string(),
57310
+ requires: external_exports.array(external_exports.string()),
57311
+ signals: external_exports.array(
57312
+ external_exports.object({
57313
+ file: external_exports.string(),
57314
+ line: external_exports.number(),
57315
+ kind: external_exports.enum(["request-flow", "scope-convention", "authorization-control"]),
57316
+ note: external_exports.string()
57317
+ })
57318
+ )
57319
+ })
57320
+ }).optional()
57321
+ });
57322
+ var manifestSchema = external_exports.object({
57323
+ schemaVersion: external_exports.literal(1),
57324
+ generatedAt: external_exports.string(),
57325
+ toolVersion: external_exports.string().optional(),
57326
+ // [ADR-0053] `#2`: the suite's content identity. MUST be declared here — a Zod object STRIPS
57327
+ // unknown keys, so omitting it would silently discard the stamp at the file boundary and leave
57328
+ // every run `unverified` no matter what the generator wrote. Optional, so a pre-[ADR-0053]
57329
+ // manifest still validates (and honestly reads as `suite-identity-absent`).
57330
+ suiteHash: external_exports.string().optional(),
57331
+ targetPath: external_exports.string(),
57332
+ tests: external_exports.array(
57333
+ external_exports.object({
57334
+ className: external_exports.string(),
57335
+ checklistId: external_exports.string(),
57336
+ vulnerabilityClass: external_exports.string(),
57337
+ framework: external_exports.literal("spring-mockmvc"),
57338
+ methods: external_exports.array(methodSchema)
57339
+ })
57340
+ ),
57341
+ skipped: external_exports.array(
57342
+ external_exports.object({
57343
+ checklistId: external_exports.string(),
57344
+ vulnerabilityClass: external_exports.string(),
57345
+ reason: external_exports.string()
57346
+ })
57347
+ )
57348
+ });
57349
+ var readSuiteManifest = async (manifestPath) => {
57350
+ const raw = await readFile(manifestPath, "utf8");
57351
+ return manifestSchema.parse(JSON.parse(raw));
57352
+ };
57353
+ var dastScenarioRefSchema = external_exports.object({
57354
+ scenarioId: external_exports.string(),
57355
+ checklistId: external_exports.string(),
57356
+ vulnerabilityClass: external_exports.string(),
57357
+ sinkFile: external_exports.string(),
57358
+ sinkLine: external_exports.number(),
57359
+ // [ADR-0071] additive: the sink-family discriminator stamped onto the scenario. Kept so Zod
57360
+ // does not STRIP it on read (mirrors the `#8.3.2` rule below).
57361
+ sinkId: external_exports.string().optional()
57362
+ });
57363
+ var dastProbeSpecSchema = external_exports.object({
57364
+ kind: external_exports.literal("object-store-cross-tenant"),
57365
+ method: external_exports.string(),
57366
+ urlPath: external_exports.string(),
57367
+ params: external_exports.array(
57368
+ external_exports.object({
57369
+ name: external_exports.string(),
57370
+ kind: external_exports.enum(["query", "path", "body", "header"]),
57371
+ value: external_exports.string()
57372
+ })
57373
+ ),
57374
+ bodyJson: external_exports.string().optional(),
57375
+ e1GateClass: external_exports.string()
57376
+ });
57377
+ var dastManifestSchema = external_exports.object({
57378
+ schemaVersion: external_exports.literal(2),
57379
+ generatedAt: external_exports.string(),
57380
+ toolVersion: external_exports.string().optional(),
57381
+ targetPath: external_exports.string(),
57382
+ contextName: external_exports.string(),
57383
+ targets: external_exports.array(
57384
+ external_exports.object({
57385
+ executionTargetId: external_exports.string(),
57386
+ scanRuleId: external_exports.number(),
57387
+ scanRuleName: external_exports.string(),
57388
+ httpMethod: external_exports.string(),
57389
+ path: external_exports.string(),
57390
+ injectionName: external_exports.string(),
57391
+ injectionKind: external_exports.enum(["query", "path", "body", "header"]),
57392
+ scenarios: external_exports.array(dastScenarioRefSchema),
57393
+ // [ADR-0071] additive: the canary probe the runtime harness MAY execute for this surface.
57394
+ probe: dastProbeSpecSchema.optional()
57395
+ })
57396
+ ),
57397
+ skipped: external_exports.array(
57398
+ external_exports.object({
57399
+ checklistId: external_exports.string(),
57400
+ vulnerabilityClass: external_exports.string(),
57401
+ reason: external_exports.string()
57402
+ })
57403
+ ),
57404
+ // ADR-0051 `#8.3.2`: optional expected provenance (additive — schemaVersion stays 2). Kept so
57405
+ // Zod does not STRIP it on read (an unknown key would be dropped), which would blind the verifier.
57406
+ expectedProvenance: external_exports.object({
57407
+ scanPlanHash: external_exports.string(),
57408
+ targetManifestHash: external_exports.string(),
57409
+ expectedRuleIds: external_exports.array(external_exports.number()),
57410
+ expectedImageDigest: external_exports.string().optional()
57411
+ }).optional()
57412
+ });
57413
+ var readDastManifest = async (manifestPath) => {
57414
+ const raw = await readFile(manifestPath, "utf8");
57415
+ return dastManifestSchema.parse(JSON.parse(raw));
57416
+ };
57417
+ var dastAttestationSchema = external_exports.object({
57418
+ schemaVersion: external_exports.literal(1),
57419
+ method: external_exports.literal("ci-boundary"),
57420
+ attestorIdentity: external_exports.string(),
57421
+ attemptId: external_exports.string(),
57422
+ runtimeImageDigest: external_exports.string(),
57423
+ reportHash: external_exports.string(),
57424
+ scanPlanHash: external_exports.string().optional(),
57425
+ startedAt: external_exports.string().optional(),
57426
+ finishedAt: external_exports.string().optional(),
57427
+ exitCode: external_exports.number().optional(),
57428
+ completionState: external_exports.enum(["completed", "failed", "timed-out", "unknown"])
57429
+ });
57430
+ var readDastAttestation = async (attestationPath) => {
57431
+ const raw = await readFile(attestationPath, "utf8");
57432
+ return dastAttestationSchema.parse(JSON.parse(raw));
57433
+ };
57434
+ var dastProbeAttemptSchema = external_exports.object({
57435
+ executionTargetId: external_exports.string(),
57436
+ e1GateClass: external_exports.string(),
57437
+ gate: external_exports.enum([
57438
+ "e1-baseline-passed",
57439
+ "e1-baseline-missing",
57440
+ "e1-baseline-skipped",
57441
+ "e1-baseline-errored"
57442
+ ]),
57443
+ canaryMatched: external_exports.boolean(),
57444
+ canaryToken: external_exports.string().optional(),
57445
+ httpStatus: external_exports.number().optional(),
57446
+ requestedPath: external_exports.string().optional(),
57447
+ note: external_exports.string().optional()
57448
+ });
57449
+ var dastProbeResultsSchema = external_exports.object({
57450
+ schemaVersion: external_exports.literal(1),
57451
+ generatedAt: external_exports.string(),
57452
+ attempts: external_exports.array(dastProbeAttemptSchema)
57453
+ });
57454
+ var dastCallbackObservationSchema = external_exports.object({
57455
+ executionTargetId: external_exports.string(),
57456
+ observed: external_exports.boolean(),
57457
+ requestedPath: external_exports.string().optional(),
57458
+ canaryToken: external_exports.string().optional(),
57459
+ requestCount: external_exports.number().optional()
57460
+ });
57461
+ var dastCallbackResultsSchema = external_exports.object({
57462
+ schemaVersion: external_exports.literal(1),
57463
+ generatedAt: external_exports.string(),
57464
+ observations: external_exports.array(dastCallbackObservationSchema)
57465
+ });
57466
+ var readDastCallbacks = async (callbackPath) => {
57467
+ let raw;
57468
+ try {
57469
+ raw = await readFile(callbackPath, "utf8");
57470
+ } catch (e) {
57471
+ if (e.code === "ENOENT") return [];
57472
+ throw e;
57473
+ }
57474
+ return dastCallbackResultsSchema.parse(JSON.parse(raw)).observations;
57475
+ };
57476
+ var readDastProbesIfPresent = async (planDir) => {
57477
+ const probesPath = join(planDir, DAST_PROBE_FILE2);
57478
+ let raw;
57479
+ try {
57480
+ raw = await readFile(probesPath, "utf8");
57481
+ } catch (e) {
57482
+ if (e.code === "ENOENT") return [];
57483
+ throw e;
57484
+ }
57485
+ return dastProbeResultsSchema.parse(JSON.parse(raw)).attempts;
57486
+ };
57487
+ var dastDefenseObservationSchema = external_exports.object({
57488
+ negativeOracleId: external_exports.string(),
57489
+ decision: external_exports.enum(["reject", "deny", "allow"]),
57490
+ producerAuthority: external_exports.string(),
57491
+ collector: external_exports.literal("harness-controller"),
57492
+ assurance: external_exports.string(),
57493
+ attemptId: external_exports.string(),
57494
+ executionTargetId: external_exports.string(),
57495
+ effectWindow: external_exports.enum(["complete", "partial", "unknown"]),
57496
+ responseStatus: external_exports.number().optional(),
57497
+ evidenceRef: external_exports.string().optional()
57498
+ });
57499
+ var dastNegativeOracleFileSchema = external_exports.object({
57500
+ schemaVersion: external_exports.literal(1),
57501
+ observations: external_exports.array(dastDefenseObservationSchema)
57502
+ });
57503
+ var readDastDefenseObservations = async (path) => {
57504
+ const raw = await readFile(path, "utf8");
57505
+ const parsed = dastNegativeOracleFileSchema.parse(JSON.parse(raw));
57506
+ return parsed.observations;
57507
+ };
57508
+ var readDastMessages = async (rawPath) => {
57509
+ const path = resolve(rawPath);
57510
+ let raw;
57511
+ try {
57512
+ raw = await readFile(path, "utf8");
57513
+ } catch (e) {
57514
+ return { kind: "unreadable", path, message: e.message };
57515
+ }
57516
+ const messages = parseZapMessages(raw);
57517
+ return messages.length === 0 ? { kind: "empty", path } : { kind: "ok", path, messages };
57518
+ };
57519
+ var warnEmptyMessages = (path, planTargetCount) => planTargetCount === 0 ? `Export messages ZAP t\u1EA1i ${path} r\u1ED7ng \u2014 \u0110\xDANG nh\u01B0 mong \u0111\u1EE3i: k\u1EBF ho\u1EA1ch DAST c\xF3 0 scan target (cs assess kh\xF4ng x\xE1c nh\u1EADn l\u1ED7 h\u1ED5ng n\xE0o \u0111\u1EC3 qu\xE9t), n\xEAn kh\xF4ng c\xF3 g\xEC \u0111\u1EC3 ph\u1EE7. Kh\xF4ng ph\u1EA3i file h\u1ECFng.` : `Export messages ZAP t\u1EA1i ${path} kh\xF4ng parse \u0111\u01B0\u1EE3c b\u1EA3n ghi n\xE0o \u2014 B\u1ECE QUA \u0111\u1ED9 ph\u1EE7 (kh\xF4ng d\xE1m k\u1EBFt lu\u1EADn "not-reached"). Ki\u1EC3m tra l\u1EA1i file c\xF3 \u0111\xFAng d\u1EA1ng \`core/view/messages\` kh\xF4ng.`;
57520
+ var findJUnitXml = async (resultsPath) => {
57521
+ const info = await stat(resultsPath);
57522
+ if (info.isFile()) return resultsPath.toLowerCase().endsWith(".xml") ? [resultsPath] : [];
57523
+ const out = [];
57524
+ const walk3 = async (dir) => {
57525
+ const entries = await readdir(dir, { withFileTypes: true });
57526
+ for (const e of entries) {
57527
+ const full = join(dir, e.name);
57528
+ if (e.isDirectory()) await walk3(full);
57529
+ else if (e.isFile() && e.name.toLowerCase().endsWith(".xml")) out.push(full);
57530
+ }
57531
+ };
57532
+ await walk3(resultsPath);
57533
+ out.sort();
57534
+ return out;
57535
+ };
57536
+ var clientMethodSchema = external_exports.object({
57537
+ testName: external_exports.string(),
57538
+ checklistId: external_exports.string(),
57539
+ vulnerabilityClass: external_exports.string(),
57540
+ title: external_exports.string(),
57541
+ sinkFile: external_exports.string(),
57542
+ sinkLine: external_exports.number(),
57543
+ routeKind: external_exports.enum(["resolved", "needs-route"]),
57544
+ deliveryKind: external_exports.enum(["query", "path", "window-name", "manual"]),
57545
+ url: external_exports.string(),
57546
+ // Tier annotation ([ADR-0043] slice 02) — ADDITIVE: an older manifest omits it
57547
+ // (reads as the page tier); schemaVersion stays 1 (no breaking shape change).
57548
+ tier: external_exports.enum(["page", "component"]).optional(),
57549
+ componentClass: external_exports.string().optional()
57550
+ });
57551
+ var clientManifestSchema = external_exports.object({
57552
+ schemaVersion: external_exports.literal(1),
57553
+ generatedAt: external_exports.string(),
57554
+ toolVersion: external_exports.string().optional(),
57555
+ targetPath: external_exports.string(),
57556
+ runnable: external_exports.boolean().optional(),
57557
+ tests: external_exports.array(
57558
+ external_exports.object({
57559
+ fileName: external_exports.string(),
57560
+ checklistId: external_exports.string(),
57561
+ vulnerabilityClass: external_exports.string(),
57562
+ framework: external_exports.literal("playwright"),
57563
+ tier: external_exports.enum(["page", "component"]).optional(),
57564
+ methods: external_exports.array(clientMethodSchema)
57565
+ })
57566
+ ),
57567
+ skipped: external_exports.array(
57568
+ external_exports.object({
57569
+ checklistId: external_exports.string(),
57570
+ vulnerabilityClass: external_exports.string(),
57571
+ reason: external_exports.string()
57572
+ })
57573
+ )
57574
+ });
57575
+ var readClientSuiteManifest = async (manifestPath) => {
57576
+ const raw = await readFile(manifestPath, "utf8");
57577
+ return clientManifestSchema.parse(JSON.parse(raw));
57578
+ };
57579
+ var findPlaywrightJson = async (resultsPath) => {
57580
+ const info = await stat(resultsPath);
57581
+ if (info.isFile()) return resultsPath.toLowerCase().endsWith(".json") ? [resultsPath] : [];
57582
+ const out = [];
57583
+ const walk3 = async (dir) => {
57584
+ const entries = await readdir(dir, { withFileTypes: true });
57585
+ for (const e of entries) {
57586
+ const full = join(dir, e.name);
57587
+ if (e.isDirectory()) await walk3(full);
57588
+ else if (e.isFile() && e.name.toLowerCase().endsWith(".json")) out.push(full);
57589
+ }
57590
+ };
57591
+ await walk3(resultsPath);
57592
+ out.sort();
57593
+ return out;
57594
+ };
57595
+ var findEvidenceJson = async (evidencePath) => {
57596
+ const info = await stat(evidencePath);
57597
+ if (info.isFile()) return evidencePath.toLowerCase().endsWith(".json") ? [evidencePath] : [];
57598
+ const out = [];
57599
+ const walk3 = async (dir) => {
57600
+ const entries = await readdir(dir, { withFileTypes: true });
57601
+ for (const e of entries) {
57602
+ const full = join(dir, e.name);
57603
+ if (e.isDirectory()) await walk3(full);
57604
+ else if (e.isFile() && e.name.toLowerCase().endsWith(".json")) out.push(full);
57605
+ }
57606
+ };
57607
+ await walk3(evidencePath);
57608
+ out.sort();
57609
+ return out;
57610
+ };
57611
+ var routeConfigSchema = external_exports.object({
57612
+ version: external_exports.literal(1),
57613
+ routes: external_exports.array(
57614
+ external_exports.object({
57615
+ component: external_exports.string().min(1),
57616
+ file: external_exports.string().min(1),
57617
+ url: external_exports.string().min(1)
57618
+ })
57619
+ )
57620
+ });
57621
+ var readRouteConfig = async (configPath) => {
57622
+ const raw = await readFile(configPath, "utf8");
57623
+ return routeConfigSchema.parse(JSON.parse(raw)).routes;
57624
+ };
57625
+ var runtimeInputSchema = external_exports.object({
57626
+ schemaVersion: external_exports.literal(1),
57627
+ values: external_exports.record(external_exports.string().min(1), external_exports.string())
57628
+ });
57629
+ var readRuntimeInput = async (inputPath) => {
57630
+ const raw = await readFile(inputPath, "utf8");
57631
+ return runtimeInputSchema.parse(parse(raw));
57632
+ };
57633
+ var RUNTIME_PLAN_FILE = "code-sentinel-runtime-plan.json";
57634
+ var runtimePlanSchema = external_exports.object({
57635
+ version: external_exports.literal(1),
57636
+ plan: external_exports.object({
57637
+ schemaProvisioning: external_exports.string().optional(),
57638
+ boot: external_exports.object({
57639
+ deviations: external_exports.array(external_exports.string()),
57640
+ schemaResolution: external_exports.object({
57641
+ mode: external_exports.string(),
57642
+ note: external_exports.string(),
57643
+ missingFromEntitySchema: external_exports.array(external_exports.string()).optional()
57644
+ }).passthrough().optional()
57645
+ }).passthrough()
57646
+ }).passthrough()
57647
+ }).passthrough();
57648
+ var readRuntimePlanDeviations = async (planPath) => {
57649
+ const raw = await readFile(planPath, "utf8");
57650
+ const doc = runtimePlanSchema.parse(JSON.parse(raw));
57651
+ return {
57652
+ deviations: doc.plan.boot.deviations,
57653
+ ...doc.plan.boot.schemaResolution !== void 0 ? { schemaResolution: doc.plan.boot.schemaResolution } : {},
57654
+ ...doc.plan.schemaProvisioning !== void 0 ? { schemaProvisioning: doc.plan.schemaProvisioning } : {}
57655
+ };
57656
+ };
57657
+
57658
+ // src/commands/ai-flow-review.command.ts
57659
+ var FRONTEND_GLOBS = [
57660
+ "**/*.ts",
57661
+ "**/*.js",
57662
+ "**/*.tsx",
57663
+ "**/*.jsx",
57664
+ "**/*.vue"
57665
+ ];
56677
57666
  var EXCLUDES = [
56678
57667
  "**/node_modules/**",
56679
57668
  "**/dist/**",
@@ -56684,6 +57673,7 @@ var DEFAULT_OUTPUT = "code-sentinel-ai-flow-review.md";
56684
57673
  var SIDECAR_SUFFIX = ".ai-flow-review.json";
56685
57674
  var CODE_CHUNK_CHAR_BUDGET = 12e4;
56686
57675
  var asRecord7 = (v) => typeof v === "object" && v !== null && !Array.isArray(v) ? v : null;
57676
+ var redactAdvisory = (value) => value.replace(/\bBearer\s+[A-Za-z0-9._-]+/gi, "Bearer [REDACTED]").replace(/\b(password|passwd|token|secret|api[_-]?key)\s*[=:]\s*[^\s,;]+/gi, "$1=[REDACTED]").replace(/\b[A-Za-z0-9_-]{40,}\b/g, "[REDACTED]");
56687
57677
  var extractBucketQuestions = (rawAssessment, hasFrontendFiles) => {
56688
57678
  const doc = asRecord7(rawAssessment);
56689
57679
  if (!doc || !Array.isArray(doc.items)) return { questions: [], skippedBackendOnly: [] };
@@ -56763,20 +57753,28 @@ var relatedGuardFiles = (sinkPath, inventory, files) => {
56763
57753
  const out = [];
56764
57754
  let used = 0;
56765
57755
  for (const f of ordered) {
56766
- if (used + f.content.length > CODE_CHUNK_CHAR_BUDGET) continue;
57756
+ const size = f.content.length + (f.vueTemplate?.length ?? 0);
57757
+ if (used + size > CODE_CHUNK_CHAR_BUDGET) continue;
56767
57758
  out.push(f);
56768
- used += f.content.length;
57759
+ used += size;
56769
57760
  }
56770
57761
  return out;
56771
57762
  };
56772
- var renderSinkCode = (parts, sinkFile) => parts.map(
56773
- (f) => `--- ${f.path}${f.path === sinkFile ? " (CH\u1EE8A SINK)" : " (guard/ng\u1EEF c\u1EA3nh)"} ---
56774
- ${f.content}`
56775
- ).join("\n\n");
57763
+ var renderSinkCode = (parts, sinkFile) => parts.map((f) => {
57764
+ const numbered = (content) => content.split("\n").map((line2, index2) => `${index2 + 1}: ${line2}`).join("\n");
57765
+ return `--- ${f.path}${f.path === sinkFile ? " (CH\u1EE8A SINK)" : " (guard/ng\u1EEF c\u1EA3nh)"} ---
57766
+ ${numbered(f.content)}${f.vueTemplate ? `
57767
+ --- ${f.path} (Vue template, c\xF9ng t\u1ECDa \u0111\u1ED9) ---
57768
+ ${numbered(f.vueTemplate)}` : ""}`;
57769
+ }).join("\n\n");
56776
57770
  var parseAiVerdict = (text2) => {
56777
57771
  const start = text2.indexOf("{");
56778
57772
  if (start === -1) {
56779
- return { verdict: "unclear", evidence: [], note: "AI kh\xF4ng tr\u1EA3 JSON (kh\xF4ng c\xF3 \u0111\u1ED1i t\u01B0\u1EE3ng n\xE0o)." };
57773
+ return {
57774
+ verdict: "unclear",
57775
+ evidence: [],
57776
+ note: "AI kh\xF4ng tr\u1EA3 JSON (kh\xF4ng c\xF3 \u0111\u1ED1i t\u01B0\u1EE3ng n\xE0o)."
57777
+ };
56780
57778
  }
56781
57779
  let depth = 0;
56782
57780
  let inString = false;
@@ -56803,8 +57801,10 @@ var parseAiVerdict = (text2) => {
56803
57801
  const o = asRecord7(obj) ?? {};
56804
57802
  const v = o.verdict;
56805
57803
  const verdict = v === "likely-blocked" || v === "likely-vulnerable" ? v : "unclear";
56806
- const evidence18 = Array.isArray(o.evidence) ? o.evidence.filter((e) => typeof e === "string") : [];
56807
- const note = typeof o.note === "string" ? o.note : "";
57804
+ const evidence18 = Array.isArray(o.evidence) ? o.evidence.filter(
57805
+ (e) => typeof e === "string" && /^[^\r\n]{1,240}:\d+\s*[—-]/.test(e)
57806
+ ).slice(0, 8).map((e) => redactAdvisory(e.slice(0, 300))) : [];
57807
+ const note = typeof o.note === "string" ? redactAdvisory(o.note.slice(0, 600)) : "";
56808
57808
  return { verdict, evidence: evidence18, note };
56809
57809
  }
56810
57810
  }
@@ -56826,7 +57826,10 @@ var resolveAiFlowReviewPromptPath = () => {
56826
57826
  const here2 = dirname(fileURLToPath(import.meta.url));
56827
57827
  const root = aiEngineRoot();
56828
57828
  const candidates = [
56829
- ...root.length > 0 ? [resolve(root, "dist/prompt/templates/ai-flow-review.md"), resolve(root, "src/prompt/templates/ai-flow-review.md")] : [],
57829
+ ...root.length > 0 ? [
57830
+ resolve(root, "dist/prompt/templates/ai-flow-review.md"),
57831
+ resolve(root, "src/prompt/templates/ai-flow-review.md")
57832
+ ] : [],
56830
57833
  resolve(here2, "../../../prompt/templates/ai-flow-review.md")
56831
57834
  ];
56832
57835
  for (const c of candidates) if (existsSync(c)) return c;
@@ -56836,7 +57839,10 @@ var isRateLimitError = (error) => JSON.stringify(error ?? {}).includes("Rate lim
56836
57839
  var askAi = async (client, prompt, logger) => {
56837
57840
  if (!client) return null;
56838
57841
  const retryMax = Math.max(0, Number(process.env.CODE_SENTINEL_AI_FLOW_RETRY_MAX ?? 3) || 0);
56839
- const retryWaitMs = Math.max(0, Number(process.env.CODE_SENTINEL_AI_FLOW_RETRY_WAIT_MS ?? 65e3) || 0);
57842
+ const retryWaitMs = Math.max(
57843
+ 0,
57844
+ Number(process.env.CODE_SENTINEL_AI_FLOW_RETRY_WAIT_MS ?? 65e3) || 0
57845
+ );
56840
57846
  for (let attempt = 0; ; attempt += 1) {
56841
57847
  try {
56842
57848
  const res = await client.complete({
@@ -56858,7 +57864,10 @@ var askAi = async (client, prompt, logger) => {
56858
57864
  await new Promise((r) => setTimeout(r, retryWaitMs));
56859
57865
  continue;
56860
57866
  }
56861
- logger?.warn({}, `[ai-flow-review] Provider t\u1EEB ch\u1ED1i: ${JSON.stringify(res.error ?? {}).slice(0, 200)}`);
57867
+ logger?.warn(
57868
+ {},
57869
+ `[ai-flow-review] Provider t\u1EEB ch\u1ED1i: ${JSON.stringify(res.error ?? {}).slice(0, 200)}`
57870
+ );
56862
57871
  return null;
56863
57872
  }
56864
57873
  return parseAiVerdict(res.value.text);
@@ -56932,6 +57941,48 @@ var runAiFlowReviewCommand = async (options) => {
56932
57941
  questions = [];
56933
57942
  }
56934
57943
  }
57944
+ if (options.clientSuite && options.clientResults) {
57945
+ try {
57946
+ const manifest = await readClientSuiteManifest(
57947
+ resolve(options.clientSuite, "code-sentinel-client-suite.json")
57948
+ );
57949
+ const cases = [];
57950
+ for (const path of await findPlaywrightJson(resolve(options.clientResults))) {
57951
+ cases.push(...parsePlaywrightReport(await readFile(path, "utf8")));
57952
+ }
57953
+ const resolved = ingestClientVerification(manifest, cases).resolutions;
57954
+ const settled = new Set(
57955
+ resolved.filter((r) => r.verdict === "exploited").map((r) => `${r.checklistId}:${r.sinkFile}:${r.sinkLine}`)
57956
+ );
57957
+ questions = questions.filter((q) => !settled.has(`${q.checklistId}:${q.sink}`));
57958
+ questions = [
57959
+ ...questions,
57960
+ ...resolved.filter((r) => r.testName.startsWith("vueTemplateProbe") && r.verdict !== "exploited").map(
57961
+ (r) => ({
57962
+ checklistId: r.checklistId,
57963
+ bucket: "ct-suspected",
57964
+ vulnerabilityClass: r.vulnerabilityClass,
57965
+ question: "Vue v-html component probe d\xF9ng route/store mock. D\u1EEF li\u1EC7u trong app th\u1EADt c\xF3 th\u1EC3 b\u1ECB ng\u01B0\u1EDDi d\xF9ng ki\u1EC3m so\xE1t v\xE0 \u0111i qua l\u1EDBp sanitize/guard n\xE0o tr\u01B0\u1EDBc sink n\xE0y?",
57966
+ sink: `${r.sinkFile}:${r.sinkLine}`,
57967
+ sinkFile: r.sinkFile
57968
+ })
57969
+ )
57970
+ ];
57971
+ } catch (e) {
57972
+ logger.warn(
57973
+ `[ai-flow-review] Kh\xF4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c component evidence: ${e.message.slice(0, 160)}; gi\u1EEF c\xE1c bucket static.`
57974
+ );
57975
+ }
57976
+ }
57977
+ questions = [
57978
+ ...new Map(questions.map((q) => [`${q.checklistId}:${q.sink}:${q.bucket}`, q])).values()
57979
+ ];
57980
+ const maxBuckets = Math.max(
57981
+ 0,
57982
+ Math.min(100, Number(process.env.CODE_SENTINEL_AI_FLOW_MAX_BUCKETS ?? 30) || 0)
57983
+ );
57984
+ const deferredCount = Math.max(0, questions.length - maxBuckets);
57985
+ questions = questions.slice(0, maxBuckets);
56935
57986
  if (questions.length === 0) {
56936
57987
  logger.info(
56937
57988
  "[ai-flow-review] Kh\xF4ng c\xF3 bucket question n\xE0o (truy\u1EC1n --assessment <audit.json> t\u1EEB `cs assess --json` \u0111\u1EC3 m\u1EDF c\xE1c bucket CT m\xF9). B\xE1o c\xE1o ghi nh\u1EADn tr\u1EA1ng th\xE1i r\u1ED7ng \u2014 KH\xD4NG k\u1EBFt lu\u1EADn g\xEC v\u1EC1 b\u1EA3o m\u1EADt."
@@ -56950,7 +58001,9 @@ var runAiFlowReviewCommand = async (options) => {
56950
58001
  for (const question of questions) {
56951
58002
  const codeParts = relatedGuardFiles(question.sinkFile, inventory, files);
56952
58003
  const chunkGuardNotes = codeParts.flatMap(
56953
- (f) => (inventory.byFile.get(f.path) ?? []).map((g) => `- ${f.path}:${g.line} ${g.name} (${g.kind})`)
58004
+ (f) => (inventory.byFile.get(f.path) ?? []).map(
58005
+ (g) => `- ${f.path}:${g.line} ${g.name} (${g.kind})`
58006
+ )
56954
58007
  ).join("\n");
56955
58008
  const clientGuardsVar = guardsText.length > 0 ? `${guardsText}${chunkGuardNotes.length > 0 ? `
56956
58009
  Trong c\xE1c file c\u1EE7a code chunk d\u01B0\u1EDBi \u0111\xE2y c\xF2n c\xF3:
@@ -57012,6 +58065,7 @@ ${chunkGuardNotes}` : ""}` : "Qu\xE9t t\u1EA5t \u0111\u1ECBnh KH\xD4NG t\xECm th
57012
58065
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
57013
58066
  source,
57014
58067
  questionCount: questions.length,
58068
+ deferredCount,
57015
58069
  entries
57016
58070
  },
57017
58071
  null,
@@ -59130,386 +60184,6 @@ var findWorkspaceLink = async (startDir) => {
59130
60184
  return null;
59131
60185
  };
59132
60186
 
59133
- // src/commands/pentest-verify-io.ts
59134
- init_dist3();
59135
- init_zod();
59136
- var SUITE_MANIFEST = "code-sentinel-suite.json";
59137
- var DAST_MANIFEST = "code-sentinel-dast.json";
59138
- var DAST_PROBE_FILE2 = "probe-results.json";
59139
- var CLIENT_SUITE_MANIFEST = "code-sentinel-client-suite.json";
59140
- var toolVersion = () => {
59141
- const req = createRequire(import.meta.url);
59142
- for (const candidate of ["../../package.json", "../package.json"]) {
59143
- try {
59144
- const pkg3 = req(candidate);
59145
- if (typeof pkg3.version === "string") return pkg3.version;
59146
- } catch {
59147
- }
59148
- }
59149
- return void 0;
59150
- };
59151
- var methodSchema = external_exports.object({
59152
- methodName: external_exports.string(),
59153
- checklistId: external_exports.string(),
59154
- vulnerabilityClass: external_exports.string(),
59155
- title: external_exports.string(),
59156
- sinkFile: external_exports.string(),
59157
- sinkLine: external_exports.number(),
59158
- idorTarget: external_exports.object({
59159
- httpMethod: external_exports.string(),
59160
- path: external_exports.string(),
59161
- kind: external_exports.enum(["query", "path", "body", "header", "dom"]),
59162
- candidate: external_exports.object({
59163
- operation: external_exports.enum(["read", "create", "update", "delete"]),
59164
- reference: external_exports.string(),
59165
- requires: external_exports.array(external_exports.string()),
59166
- signals: external_exports.array(
59167
- external_exports.object({
59168
- file: external_exports.string(),
59169
- line: external_exports.number(),
59170
- kind: external_exports.enum(["request-flow", "scope-convention", "authorization-control"]),
59171
- note: external_exports.string()
59172
- })
59173
- )
59174
- })
59175
- }).optional()
59176
- });
59177
- var manifestSchema = external_exports.object({
59178
- schemaVersion: external_exports.literal(1),
59179
- generatedAt: external_exports.string(),
59180
- toolVersion: external_exports.string().optional(),
59181
- // [ADR-0053] `#2`: the suite's content identity. MUST be declared here — a Zod object STRIPS
59182
- // unknown keys, so omitting it would silently discard the stamp at the file boundary and leave
59183
- // every run `unverified` no matter what the generator wrote. Optional, so a pre-[ADR-0053]
59184
- // manifest still validates (and honestly reads as `suite-identity-absent`).
59185
- suiteHash: external_exports.string().optional(),
59186
- targetPath: external_exports.string(),
59187
- tests: external_exports.array(
59188
- external_exports.object({
59189
- className: external_exports.string(),
59190
- checklistId: external_exports.string(),
59191
- vulnerabilityClass: external_exports.string(),
59192
- framework: external_exports.literal("spring-mockmvc"),
59193
- methods: external_exports.array(methodSchema)
59194
- })
59195
- ),
59196
- skipped: external_exports.array(
59197
- external_exports.object({
59198
- checklistId: external_exports.string(),
59199
- vulnerabilityClass: external_exports.string(),
59200
- reason: external_exports.string()
59201
- })
59202
- )
59203
- });
59204
- var readSuiteManifest = async (manifestPath) => {
59205
- const raw = await readFile(manifestPath, "utf8");
59206
- return manifestSchema.parse(JSON.parse(raw));
59207
- };
59208
- var dastScenarioRefSchema = external_exports.object({
59209
- scenarioId: external_exports.string(),
59210
- checklistId: external_exports.string(),
59211
- vulnerabilityClass: external_exports.string(),
59212
- sinkFile: external_exports.string(),
59213
- sinkLine: external_exports.number(),
59214
- // [ADR-0071] additive: the sink-family discriminator stamped onto the scenario. Kept so Zod
59215
- // does not STRIP it on read (mirrors the `#8.3.2` rule below).
59216
- sinkId: external_exports.string().optional()
59217
- });
59218
- var dastProbeSpecSchema = external_exports.object({
59219
- kind: external_exports.literal("object-store-cross-tenant"),
59220
- method: external_exports.string(),
59221
- urlPath: external_exports.string(),
59222
- params: external_exports.array(
59223
- external_exports.object({
59224
- name: external_exports.string(),
59225
- kind: external_exports.enum(["query", "path", "body", "header"]),
59226
- value: external_exports.string()
59227
- })
59228
- ),
59229
- bodyJson: external_exports.string().optional(),
59230
- e1GateClass: external_exports.string()
59231
- });
59232
- var dastManifestSchema = external_exports.object({
59233
- schemaVersion: external_exports.literal(2),
59234
- generatedAt: external_exports.string(),
59235
- toolVersion: external_exports.string().optional(),
59236
- targetPath: external_exports.string(),
59237
- contextName: external_exports.string(),
59238
- targets: external_exports.array(
59239
- external_exports.object({
59240
- executionTargetId: external_exports.string(),
59241
- scanRuleId: external_exports.number(),
59242
- scanRuleName: external_exports.string(),
59243
- httpMethod: external_exports.string(),
59244
- path: external_exports.string(),
59245
- injectionName: external_exports.string(),
59246
- injectionKind: external_exports.enum(["query", "path", "body", "header"]),
59247
- scenarios: external_exports.array(dastScenarioRefSchema),
59248
- // [ADR-0071] additive: the canary probe the runtime harness MAY execute for this surface.
59249
- probe: dastProbeSpecSchema.optional()
59250
- })
59251
- ),
59252
- skipped: external_exports.array(
59253
- external_exports.object({
59254
- checklistId: external_exports.string(),
59255
- vulnerabilityClass: external_exports.string(),
59256
- reason: external_exports.string()
59257
- })
59258
- ),
59259
- // ADR-0051 `#8.3.2`: optional expected provenance (additive — schemaVersion stays 2). Kept so
59260
- // Zod does not STRIP it on read (an unknown key would be dropped), which would blind the verifier.
59261
- expectedProvenance: external_exports.object({
59262
- scanPlanHash: external_exports.string(),
59263
- targetManifestHash: external_exports.string(),
59264
- expectedRuleIds: external_exports.array(external_exports.number()),
59265
- expectedImageDigest: external_exports.string().optional()
59266
- }).optional()
59267
- });
59268
- var readDastManifest = async (manifestPath) => {
59269
- const raw = await readFile(manifestPath, "utf8");
59270
- return dastManifestSchema.parse(JSON.parse(raw));
59271
- };
59272
- var dastAttestationSchema = external_exports.object({
59273
- schemaVersion: external_exports.literal(1),
59274
- method: external_exports.literal("ci-boundary"),
59275
- attestorIdentity: external_exports.string(),
59276
- attemptId: external_exports.string(),
59277
- runtimeImageDigest: external_exports.string(),
59278
- reportHash: external_exports.string(),
59279
- scanPlanHash: external_exports.string().optional(),
59280
- startedAt: external_exports.string().optional(),
59281
- finishedAt: external_exports.string().optional(),
59282
- exitCode: external_exports.number().optional(),
59283
- completionState: external_exports.enum(["completed", "failed", "timed-out", "unknown"])
59284
- });
59285
- var readDastAttestation = async (attestationPath) => {
59286
- const raw = await readFile(attestationPath, "utf8");
59287
- return dastAttestationSchema.parse(JSON.parse(raw));
59288
- };
59289
- var dastProbeAttemptSchema = external_exports.object({
59290
- executionTargetId: external_exports.string(),
59291
- e1GateClass: external_exports.string(),
59292
- gate: external_exports.enum([
59293
- "e1-baseline-passed",
59294
- "e1-baseline-missing",
59295
- "e1-baseline-skipped",
59296
- "e1-baseline-errored"
59297
- ]),
59298
- canaryMatched: external_exports.boolean(),
59299
- canaryToken: external_exports.string().optional(),
59300
- httpStatus: external_exports.number().optional(),
59301
- requestedPath: external_exports.string().optional(),
59302
- note: external_exports.string().optional()
59303
- });
59304
- var dastProbeResultsSchema = external_exports.object({
59305
- schemaVersion: external_exports.literal(1),
59306
- generatedAt: external_exports.string(),
59307
- attempts: external_exports.array(dastProbeAttemptSchema)
59308
- });
59309
- var dastCallbackObservationSchema = external_exports.object({
59310
- executionTargetId: external_exports.string(),
59311
- observed: external_exports.boolean(),
59312
- requestedPath: external_exports.string().optional(),
59313
- canaryToken: external_exports.string().optional(),
59314
- requestCount: external_exports.number().optional()
59315
- });
59316
- var dastCallbackResultsSchema = external_exports.object({
59317
- schemaVersion: external_exports.literal(1),
59318
- generatedAt: external_exports.string(),
59319
- observations: external_exports.array(dastCallbackObservationSchema)
59320
- });
59321
- var readDastCallbacks = async (callbackPath) => {
59322
- let raw;
59323
- try {
59324
- raw = await readFile(callbackPath, "utf8");
59325
- } catch (e) {
59326
- if (e.code === "ENOENT") return [];
59327
- throw e;
59328
- }
59329
- return dastCallbackResultsSchema.parse(JSON.parse(raw)).observations;
59330
- };
59331
- var readDastProbesIfPresent = async (planDir) => {
59332
- const probesPath = join(planDir, DAST_PROBE_FILE2);
59333
- let raw;
59334
- try {
59335
- raw = await readFile(probesPath, "utf8");
59336
- } catch (e) {
59337
- if (e.code === "ENOENT") return [];
59338
- throw e;
59339
- }
59340
- return dastProbeResultsSchema.parse(JSON.parse(raw)).attempts;
59341
- };
59342
- var dastDefenseObservationSchema = external_exports.object({
59343
- negativeOracleId: external_exports.string(),
59344
- decision: external_exports.enum(["reject", "deny", "allow"]),
59345
- producerAuthority: external_exports.string(),
59346
- collector: external_exports.literal("harness-controller"),
59347
- assurance: external_exports.string(),
59348
- attemptId: external_exports.string(),
59349
- executionTargetId: external_exports.string(),
59350
- effectWindow: external_exports.enum(["complete", "partial", "unknown"]),
59351
- responseStatus: external_exports.number().optional(),
59352
- evidenceRef: external_exports.string().optional()
59353
- });
59354
- var dastNegativeOracleFileSchema = external_exports.object({
59355
- schemaVersion: external_exports.literal(1),
59356
- observations: external_exports.array(dastDefenseObservationSchema)
59357
- });
59358
- var readDastDefenseObservations = async (path) => {
59359
- const raw = await readFile(path, "utf8");
59360
- const parsed = dastNegativeOracleFileSchema.parse(JSON.parse(raw));
59361
- return parsed.observations;
59362
- };
59363
- var readDastMessages = async (rawPath) => {
59364
- const path = resolve(rawPath);
59365
- let raw;
59366
- try {
59367
- raw = await readFile(path, "utf8");
59368
- } catch (e) {
59369
- return { kind: "unreadable", path, message: e.message };
59370
- }
59371
- const messages = parseZapMessages(raw);
59372
- return messages.length === 0 ? { kind: "empty", path } : { kind: "ok", path, messages };
59373
- };
59374
- var warnEmptyMessages = (path, planTargetCount) => planTargetCount === 0 ? `Export messages ZAP t\u1EA1i ${path} r\u1ED7ng \u2014 \u0110\xDANG nh\u01B0 mong \u0111\u1EE3i: k\u1EBF ho\u1EA1ch DAST c\xF3 0 scan target (cs assess kh\xF4ng x\xE1c nh\u1EADn l\u1ED7 h\u1ED5ng n\xE0o \u0111\u1EC3 qu\xE9t), n\xEAn kh\xF4ng c\xF3 g\xEC \u0111\u1EC3 ph\u1EE7. Kh\xF4ng ph\u1EA3i file h\u1ECFng.` : `Export messages ZAP t\u1EA1i ${path} kh\xF4ng parse \u0111\u01B0\u1EE3c b\u1EA3n ghi n\xE0o \u2014 B\u1ECE QUA \u0111\u1ED9 ph\u1EE7 (kh\xF4ng d\xE1m k\u1EBFt lu\u1EADn "not-reached"). Ki\u1EC3m tra l\u1EA1i file c\xF3 \u0111\xFAng d\u1EA1ng \`core/view/messages\` kh\xF4ng.`;
59375
- var findJUnitXml = async (resultsPath) => {
59376
- const info = await stat(resultsPath);
59377
- if (info.isFile()) return resultsPath.toLowerCase().endsWith(".xml") ? [resultsPath] : [];
59378
- const out = [];
59379
- const walk3 = async (dir) => {
59380
- const entries = await readdir(dir, { withFileTypes: true });
59381
- for (const e of entries) {
59382
- const full = join(dir, e.name);
59383
- if (e.isDirectory()) await walk3(full);
59384
- else if (e.isFile() && e.name.toLowerCase().endsWith(".xml")) out.push(full);
59385
- }
59386
- };
59387
- await walk3(resultsPath);
59388
- out.sort();
59389
- return out;
59390
- };
59391
- var clientMethodSchema = external_exports.object({
59392
- testName: external_exports.string(),
59393
- checklistId: external_exports.string(),
59394
- vulnerabilityClass: external_exports.string(),
59395
- title: external_exports.string(),
59396
- sinkFile: external_exports.string(),
59397
- sinkLine: external_exports.number(),
59398
- routeKind: external_exports.enum(["resolved", "needs-route"]),
59399
- deliveryKind: external_exports.enum(["query", "path", "window-name", "manual"]),
59400
- url: external_exports.string(),
59401
- // Tier annotation ([ADR-0043] slice 02) — ADDITIVE: an older manifest omits it
59402
- // (reads as the page tier); schemaVersion stays 1 (no breaking shape change).
59403
- tier: external_exports.enum(["page", "component"]).optional(),
59404
- componentClass: external_exports.string().optional()
59405
- });
59406
- var clientManifestSchema = external_exports.object({
59407
- schemaVersion: external_exports.literal(1),
59408
- generatedAt: external_exports.string(),
59409
- toolVersion: external_exports.string().optional(),
59410
- targetPath: external_exports.string(),
59411
- runnable: external_exports.boolean().optional(),
59412
- tests: external_exports.array(
59413
- external_exports.object({
59414
- fileName: external_exports.string(),
59415
- checklistId: external_exports.string(),
59416
- vulnerabilityClass: external_exports.string(),
59417
- framework: external_exports.literal("playwright"),
59418
- tier: external_exports.enum(["page", "component"]).optional(),
59419
- methods: external_exports.array(clientMethodSchema)
59420
- })
59421
- ),
59422
- skipped: external_exports.array(
59423
- external_exports.object({
59424
- checklistId: external_exports.string(),
59425
- vulnerabilityClass: external_exports.string(),
59426
- reason: external_exports.string()
59427
- })
59428
- )
59429
- });
59430
- var readClientSuiteManifest = async (manifestPath) => {
59431
- const raw = await readFile(manifestPath, "utf8");
59432
- return clientManifestSchema.parse(JSON.parse(raw));
59433
- };
59434
- var findPlaywrightJson = async (resultsPath) => {
59435
- const info = await stat(resultsPath);
59436
- if (info.isFile()) return resultsPath.toLowerCase().endsWith(".json") ? [resultsPath] : [];
59437
- const out = [];
59438
- const walk3 = async (dir) => {
59439
- const entries = await readdir(dir, { withFileTypes: true });
59440
- for (const e of entries) {
59441
- const full = join(dir, e.name);
59442
- if (e.isDirectory()) await walk3(full);
59443
- else if (e.isFile() && e.name.toLowerCase().endsWith(".json")) out.push(full);
59444
- }
59445
- };
59446
- await walk3(resultsPath);
59447
- out.sort();
59448
- return out;
59449
- };
59450
- var findEvidenceJson = async (evidencePath) => {
59451
- const info = await stat(evidencePath);
59452
- if (info.isFile()) return evidencePath.toLowerCase().endsWith(".json") ? [evidencePath] : [];
59453
- const out = [];
59454
- const walk3 = async (dir) => {
59455
- const entries = await readdir(dir, { withFileTypes: true });
59456
- for (const e of entries) {
59457
- const full = join(dir, e.name);
59458
- if (e.isDirectory()) await walk3(full);
59459
- else if (e.isFile() && e.name.toLowerCase().endsWith(".json")) out.push(full);
59460
- }
59461
- };
59462
- await walk3(evidencePath);
59463
- out.sort();
59464
- return out;
59465
- };
59466
- var routeConfigSchema = external_exports.object({
59467
- version: external_exports.literal(1),
59468
- routes: external_exports.array(
59469
- external_exports.object({
59470
- component: external_exports.string().min(1),
59471
- file: external_exports.string().min(1),
59472
- url: external_exports.string().min(1)
59473
- })
59474
- )
59475
- });
59476
- var readRouteConfig = async (configPath) => {
59477
- const raw = await readFile(configPath, "utf8");
59478
- return routeConfigSchema.parse(JSON.parse(raw)).routes;
59479
- };
59480
- var runtimeInputSchema = external_exports.object({
59481
- schemaVersion: external_exports.literal(1),
59482
- values: external_exports.record(external_exports.string().min(1), external_exports.string())
59483
- });
59484
- var readRuntimeInput = async (inputPath) => {
59485
- const raw = await readFile(inputPath, "utf8");
59486
- return runtimeInputSchema.parse(parse(raw));
59487
- };
59488
- var RUNTIME_PLAN_FILE = "code-sentinel-runtime-plan.json";
59489
- var runtimePlanSchema = external_exports.object({
59490
- version: external_exports.literal(1),
59491
- plan: external_exports.object({
59492
- schemaProvisioning: external_exports.string().optional(),
59493
- boot: external_exports.object({
59494
- deviations: external_exports.array(external_exports.string()),
59495
- schemaResolution: external_exports.object({
59496
- mode: external_exports.string(),
59497
- note: external_exports.string(),
59498
- missingFromEntitySchema: external_exports.array(external_exports.string()).optional()
59499
- }).passthrough().optional()
59500
- }).passthrough()
59501
- }).passthrough()
59502
- }).passthrough();
59503
- var readRuntimePlanDeviations = async (planPath) => {
59504
- const raw = await readFile(planPath, "utf8");
59505
- const doc = runtimePlanSchema.parse(JSON.parse(raw));
59506
- return {
59507
- deviations: doc.plan.boot.deviations,
59508
- ...doc.plan.boot.schemaResolution !== void 0 ? { schemaResolution: doc.plan.boot.schemaResolution } : {},
59509
- ...doc.plan.schemaProvisioning !== void 0 ? { schemaProvisioning: doc.plan.schemaProvisioning } : {}
59510
- };
59511
- };
59512
-
59513
60187
  // src/commands/assess.command.ts
59514
60188
  var DEFAULT_OUTPUT2 = "code-sentinel-assessment.md";
59515
60189
  var ASSESSMENT_SCOPE = "injection-tier-a + config-tier-b + code-tier-a (crypto/browser-storage) + manual-tier-c";
@@ -60941,6 +61615,8 @@ var runAssess = async (options, deps = {}) => {
60941
61615
  }
60942
61616
  }
60943
61617
  let clientRouteIndex;
61618
+ let clientHashRouting = false;
61619
+ let clientBasePath = "";
60944
61620
  if (options.emitDast !== void 0) {
60945
61621
  const scenarios = report2.items.flatMap((i) => i.scenarios);
60946
61622
  const dastAuthAvailable = buildRuntimeAuthRecipe(
@@ -60952,7 +61628,10 @@ var runAssess = async (options, deps = {}) => {
60952
61628
  }
60953
61629
  ) !== null;
60954
61630
  if (clientRouteIndex === void 0) {
60955
- clientRouteIndex = resolveComponentRoutes(files, { projectRoot: target });
61631
+ const resolved = resolveComponentRoutesByFramework(files, { projectRoot: target });
61632
+ clientRouteIndex = resolved.index;
61633
+ clientHashRouting = resolved.navigationMode === "hash";
61634
+ clientBasePath = resolved.basePath;
60956
61635
  if (options.routeConfig !== void 0) {
60957
61636
  let sharedOverrides;
60958
61637
  try {
@@ -60977,7 +61656,11 @@ var runAssess = async (options, deps = {}) => {
60977
61656
  ...options.dastHttpEvidence === true ? { reportTemplate: "traditional-json-plus" } : {},
60978
61657
  ...apiCreateSeedPlan !== void 0 ? { apiCreateSeedPlan } : {},
60979
61658
  ...endpointMatch.matched.length > 0 ? { endpointLinks: endpointMatch.matched } : {},
60980
- spaRoutes: spaRouteIndex
61659
+ spaRoutes: spaRouteIndex,
61660
+ // DEV-0093 (Vue): a hash SPA exposes no route path to ZAP (try_files answers
61661
+ // every path with index.html), so emitting /route HTTP targets would be a
61662
+ // false coverage signal. Suppress them; origin + observed API stay.
61663
+ spaHashRouting: clientHashRouting
60981
61664
  });
60982
61665
  const spaTargets = plan.targets.filter((t) => t.vulnerabilityClass === "spa-route-reach");
60983
61666
  if (spaTargets.length > 0) {
@@ -61050,7 +61733,10 @@ var runAssess = async (options, deps = {}) => {
61050
61733
  if (options.emitClientTests !== void 0) {
61051
61734
  const scenarios = report2.items.flatMap((i) => i.scenarios);
61052
61735
  if (clientRouteIndex === void 0) {
61053
- clientRouteIndex = resolveComponentRoutes(files, { projectRoot: target });
61736
+ const resolved = resolveComponentRoutesByFramework(files, { projectRoot: target });
61737
+ clientRouteIndex = resolved.index;
61738
+ clientHashRouting = resolved.navigationMode === "hash";
61739
+ clientBasePath = resolved.basePath;
61054
61740
  if (options.routeConfig !== void 0) {
61055
61741
  let sharedOverrides;
61056
61742
  try {
@@ -61068,13 +61754,51 @@ var runAssess = async (options, deps = {}) => {
61068
61754
  }
61069
61755
  }
61070
61756
  const routeConfigApplied = 0;
61071
- const suite = generateClientVerificationSuite(scenarios, clientRouteIndex);
61072
- const angularResolved = graph !== null && existsSync(resolve(target, "node_modules/@angular/core"));
61757
+ const suite = generateClientVerificationSuite(scenarios, clientRouteIndex ?? /* @__PURE__ */ new Map(), {
61758
+ hashRouting: clientHashRouting,
61759
+ basePath: clientBasePath
61760
+ });
61761
+ const angularResolved = graph !== null;
61762
+ const packageFiles = await findFiles({
61763
+ projectRoot: target,
61764
+ include: ["**/package.json"],
61765
+ exclude: ["**/node_modules/**", "**/dist/**"]
61766
+ });
61767
+ const vueFramework = packageFiles.ok ? packageFiles.value.map((f) => {
61768
+ try {
61769
+ const pkg3 = JSON.parse(f.content);
61770
+ const version3 = pkg3.dependencies?.vue ?? pkg3.devDependencies?.vue ?? "";
61771
+ if (/(^|[^0-9])2\./.test(version3)) return "vue2";
61772
+ if (/(^|[^0-9])3\./.test(version3)) return "vue3";
61773
+ } catch {
61774
+ }
61775
+ return null;
61776
+ }).find((v) => v !== null) : void 0;
61777
+ const vueTemplateProbes = inventoryVueTemplateSinks(files).filter((sink) => sink.binding === "v-html").filter(
61778
+ (sink) => !scenarios.some((s) => s.sinkFile === sink.file && s.sinkLine === sink.line)
61779
+ ).slice(0, 50).map((sink) => ({
61780
+ checklistId: "97",
61781
+ vulnerabilityClass: "dom-xss",
61782
+ title: "Vue template sink exploratory component probe",
61783
+ severity: "warning",
61784
+ httpMethod: "GET",
61785
+ path: null,
61786
+ injectionPoint: { name: "vue/template-probe", kind: "query" },
61787
+ payloads: ["<img src=x onerror=alert(document.domain)>"],
61788
+ requestExample: "Mock route/store payload in isolated Vue component",
61789
+ expectedIfVulnerable: "Marked browser oracle fires in the isolated component.",
61790
+ expectedIfSafe: "The component escapes or sanitizes the injected value.",
61791
+ sinkFile: sink.file,
61792
+ sinkLine: sink.line,
61793
+ verdict: "suspected",
61794
+ confidence: 50
61795
+ }));
61073
61796
  const componentSuite = generateComponentVerificationSuite(
61074
- scenarios,
61797
+ [...scenarios, ...vueTemplateProbes],
61075
61798
  graph ?? createAstDependencyGraph({ fingerprint: "", nodes: [], edges: [] }),
61076
61799
  {
61077
61800
  angularResolved,
61801
+ ...vueFramework ? { vueFramework } : {},
61078
61802
  clientRunnable: options.clientRunnable === true,
61079
61803
  files
61080
61804
  }
@@ -61082,6 +61806,22 @@ var runAssess = async (options, deps = {}) => {
61082
61806
  const emitDir = resolve(target, options.emitClientTests);
61083
61807
  try {
61084
61808
  await mkdir(emitDir, { recursive: true });
61809
+ if (files.some((f) => f.path.endsWith(".vue"))) {
61810
+ await writeFile(
61811
+ resolve(emitDir, "vue-template-sinks.json"),
61812
+ `${JSON.stringify(
61813
+ {
61814
+ schemaVersion: 1,
61815
+ assessment: "unresolved",
61816
+ sinks: inventoryVueTemplateSinks(files)
61817
+ },
61818
+ null,
61819
+ 2
61820
+ )}
61821
+ `,
61822
+ "utf8"
61823
+ );
61824
+ }
61085
61825
  for (const test of suite.tests) {
61086
61826
  await writeFile(resolve(emitDir, test.fileName), test.content, "utf8");
61087
61827
  }
@@ -61104,7 +61844,16 @@ var runAssess = async (options, deps = {}) => {
61104
61844
  await writeFile(resolve(emitDir, "playwright.config.ts"), pkg3.playwrightConfig, "utf8");
61105
61845
  await writeFile(resolve(emitDir, "tsconfig.json"), pkg3.tsconfig, "utf8");
61106
61846
  if (componentSuite.tests.length > 0) {
61107
- await writeFile(resolve(emitDir, "build.mjs"), renderComponentBuildScript(), "utf8");
61847
+ const hasVueTests = componentSuite.tests.some(
61848
+ (t) => t.methods.some((m) => m.sinkFile.endsWith(".vue"))
61849
+ );
61850
+ await writeFile(
61851
+ resolve(emitDir, "build.mjs"),
61852
+ hasVueTests && vueFramework ? renderVueComponentBuildScript(vueFramework) : renderComponentBuildScript(),
61853
+ "utf8"
61854
+ );
61855
+ if (hasVueTests && vueFramework)
61856
+ await writeFile(resolve(emitDir, "vue-framework.txt"), vueFramework, "utf8");
61108
61857
  }
61109
61858
  }
61110
61859
  await writeFile(
@@ -66134,7 +66883,7 @@ function createPattern(matcher) {
66134
66883
  }
66135
66884
  return () => false;
66136
66885
  }
66137
- function normalizePath6(path) {
66886
+ function normalizePath7(path) {
66138
66887
  if (typeof path !== "string")
66139
66888
  throw new Error("string expected");
66140
66889
  path = sp2.normalize(path);
@@ -66148,7 +66897,7 @@ function normalizePath6(path) {
66148
66897
  return path;
66149
66898
  }
66150
66899
  function matchPatterns(patterns, testString, stats) {
66151
- const path = normalizePath6(testString);
66900
+ const path = normalizePath7(testString);
66152
66901
  for (let index2 = 0; index2 < patterns.length; index2++) {
66153
66902
  const pattern = patterns[index2];
66154
66903
  if (pattern(path, stats)) {
@@ -71928,6 +72677,9 @@ H\xE3y ch\u1EA1y \`cs auth login\`.`
71928
72677
  if (link.codebaseId) {
71929
72678
  formData.append("repositoryId", link.codebaseId);
71930
72679
  }
72680
+ if (options.preferredBuildScript) {
72681
+ formData.append("preferredBuildScript", options.preferredBuildScript);
72682
+ }
71931
72683
  const res = await fetch(url, {
71932
72684
  method: "POST",
71933
72685
  headers: { authorization: `Bearer ${token}` },
@@ -76475,7 +77227,7 @@ var buildProgram = () => {
76475
77227
  ).option(
76476
77228
  "--assessment <json>",
76477
77229
  "audit.json t\u1EEB `cs assess --json` (m\u1EDF bucket CT suspected / INCONCLUSIVE)"
76478
- ).option("-o, --output <md>", "report markdown (default code-sentinel-ai-flow-review.md)").option("--config <file>", "file c\u1EA5u h\xECnh t\u01B0\u1EDDng minh (khai b\xE1o AI provider/key)").action(async (source, opts) => {
77230
+ ).option("--client-suite <dir>", "th\u01B0 m\u1EE5c manifest component/page test").option("--client-results <path>", "file ho\u1EB7c th\u01B0 m\u1EE5c Playwright JSON").option("-o, --output <md>", "report markdown (default code-sentinel-ai-flow-review.md)").option("--config <file>", "file c\u1EA5u h\xECnh t\u01B0\u1EDDng minh (khai b\xE1o AI provider/key)").action(async (source, opts) => {
76479
77231
  if (typeof source !== "string" || source.length === 0) {
76480
77232
  console.error("Thi\u1EBFu <source> \u2014 th\u01B0 m\u1EE5c ngu\u1ED3n Angular c\u1EA7n soi (vd: cs ai-flow-review .).");
76481
77233
  process.exitCode = EXIT.USAGE;
@@ -76484,6 +77236,8 @@ var buildProgram = () => {
76484
77236
  process.exitCode = await runAiFlowReview({
76485
77237
  source,
76486
77238
  ...typeof opts.assessment === "string" && opts.assessment.length > 0 ? { assessment: opts.assessment } : {},
77239
+ ...typeof opts.clientSuite === "string" && opts.clientSuite.length > 0 ? { clientSuite: opts.clientSuite } : {},
77240
+ ...typeof opts.clientResults === "string" && opts.clientResults.length > 0 ? { clientResults: opts.clientResults } : {},
76487
77241
  ...typeof opts.output === "string" && opts.output.length > 0 ? { output: opts.output } : {},
76488
77242
  ...typeof opts.config === "string" && opts.config.length > 0 ? { config: opts.config } : {}
76489
77243
  });
@@ -76667,14 +77421,20 @@ var buildProgram = () => {
76667
77421
  "--module <path>",
76668
77422
  "module c\u1EA7n \u0111\xF3ng g\xF3i, \u0111\u01B0\u1EDDng d\u1EABn t\u01B0\u01A1ng \u0111\u1ED1i so v\u1EDBi g\u1ED1c repo"
76669
77423
  ).hideHelp()
77424
+ ).addOption(
77425
+ new Option(
77426
+ "--preferred-build-script <name>",
77427
+ "DEV-0093 (Vue): t\xEAn script build Vue CLI ch\u1ECDn khi project c\xF3 nhi\u1EC1u build:* (vd. build:motcua, build:dvc). Server ch\u1EC9 ch\u1EA5p nh\u1EADn T\xCAN script, kh\xF4ng ph\u1EA3i chu\u1ED7i shell."
77428
+ )
76670
77429
  ).action(
76671
77430
  async (targetDir, options) => {
76672
77431
  process.exitCode = await runPackageCommand({
76673
77432
  ...options,
76674
77433
  source: options.source ?? ".",
76675
77434
  targetDir,
76676
- push: true
77435
+ push: true,
76677
77436
  // Always push by default for pentest
77437
+ ...typeof options.preferredBuildScript === "string" && options.preferredBuildScript.length > 0 ? { preferredBuildScript: options.preferredBuildScript } : {}
76678
77438
  });
76679
77439
  }
76680
77440
  );
@@ -76711,6 +77471,11 @@ var buildProgram = () => {
76711
77471
  "\u0110\xF3ng g\xF3i xong t\u1EF1 \u0111\u1ED9ng \u0111\u1EA9y l\xEAn m\xE1y ch\u1EE7 Pentest (t\u01B0\u01A1ng \u0111\u01B0\u01A1ng upload Dashboard)"
76712
77472
  ).hideHelp()
76713
77473
  // We are migrating users to use 'cs pentest' instead.
77474
+ ).addOption(
77475
+ new Option(
77476
+ "--preferred-build-script <name>",
77477
+ "DEV-0093 (Vue): t\xEAn script build Vue CLI ch\u1ECDn khi project c\xF3 nhi\u1EC1u build:* (vd. build:motcua, build:dvc). Server ch\u1EC9 ch\u1EA5p nh\u1EADn T\xCAN script, kh\xF4ng ph\u1EA3i chu\u1ED7i shell."
77478
+ )
76714
77479
  ).action(
76715
77480
  async (targetDir, options) => {
76716
77481
  process.exitCode = await runPackageCommand({
@@ -76720,7 +77485,8 @@ var buildProgram = () => {
76720
77485
  resolveAuth: options.resolveAuth === true,
76721
77486
  resolveDataSeed: options.resolveDataSeed === true,
76722
77487
  ...typeof options.config === "string" && options.config.length > 0 ? { config: options.config } : {},
76723
- push: options.push === true
77488
+ push: options.push === true,
77489
+ ...typeof options.preferredBuildScript === "string" && options.preferredBuildScript.length > 0 ? { preferredBuildScript: options.preferredBuildScript } : {}
76724
77490
  });
76725
77491
  }
76726
77492
  );