@code-sentinel-cli/code-sentinel-cli 4.0.13-avtest.0 → 4.0.13
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/bin.js +675 -99
- package/dist/builtin-rules/ai/angular/api-service-contract-risk.prompt.md +21 -0
- package/dist/builtin-rules/ai/angular/api-service-contract-risk.rule.yaml +3 -2
- package/dist/builtin-rules/ai/angular/component-state-flow.prompt.md +6 -0
- package/dist/builtin-rules/ai/angular/component-state-flow.rule.yaml +1 -1
- package/dist/builtin-rules/ai/angular/reactive-form-flow.prompt.md +6 -0
- package/dist/builtin-rules/ai/angular/reactive-form-flow.rule.yaml +1 -1
- package/dist/builtin-rules/ai/angular/rxjs-flow-risk.prompt.md +17 -4
- package/dist/builtin-rules/ai/angular/rxjs-flow-risk.rule.yaml +3 -2
- package/dist/builtin-rules/ai/angular/template-contract-risk.prompt.md +7 -1
- package/dist/builtin-rules/ai/angular/template-contract-risk.rule.yaml +1 -1
- package/dist/builtin-rules/ai/general/code-clarity.prompt.md +4 -0
- package/dist/builtin-rules/ai/general/code-clarity.rule.yaml +1 -1
- package/dist/builtin-rules/static/angular/button-accessible-name.rule.js +261 -5
- package/dist/builtin-rules/static/angular/no-leaky-subscription.rule.js +141 -30
- package/dist/builtin-rules/static/angular/onpush-required.rule.js +7 -7
- package/dist/builtin-rules/static/angular/template-dom-xss.rule.js +41 -38
- package/dist/builtin-rules/static/general/no-circular-import.rule.js +1 -1
- package/dist/builtin-rules/static/general/no-unresolved-import-symbol.rule.js +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +676 -100
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import { randomBytes, createCipheriv, createDecipheriv, createHash, randomUUID,
|
|
|
6
6
|
import * as sp2 from 'path';
|
|
7
7
|
import { dirname, resolve, isAbsolute, join, extname, relative, basename, sep, posix, normalize } from 'path';
|
|
8
8
|
import { Language, Parser, Query } from 'web-tree-sitter';
|
|
9
|
-
import { Project,
|
|
9
|
+
import { Project, Node, ts, SyntaxKind, 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
|
-
import { existsSync, mkdirSync, readFileSync, mkdtempSync, statSync, rmSync, constants,
|
|
12
|
+
import { existsSync, mkdirSync, readFileSync, mkdtempSync, statSync, rmSync, constants, realpathSync, createReadStream, readdirSync, writeFileSync, stat as stat$1, realpath, readdir as readdir$1, unwatchFile, watchFile, watch as watch$1, openSync, readSync, closeSync, fstatSync } from 'fs';
|
|
13
13
|
import { createGunzip, inflateRawSync, deflateRawSync } from 'zlib';
|
|
14
14
|
import { Socket } from 'net';
|
|
15
15
|
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
|
@@ -1036,7 +1036,7 @@ function correlateFindings(doc, perf) {
|
|
|
1036
1036
|
endpointsUnmatched
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
1039
|
-
var SEVERITY_ORDER, severityRank, meetsSeverity, LANGUAGES, languageFromExtension, languageFromPath, SOURCE_TOOLS, CORE_PACK, rulePackOf, compareFindings, editsOverlap, AI_GATE_POLICIES, isAiGatePolicy, AI_SKIP_GATE_POLICIES, isAiSkipGatePolicy, aiCoverageGates, findingGates, toRunIngestDto, AI_SKIP_REASONS, isRecallRiskSkip, isRetryableSkip, countRecallRiskSkips, LAYER_FLOW_MAP, sortEdges, createAstDependencyGraph, scenarioVerdictFromOutcome, CLIENT_TIERS, isClientTier, summarizeClientCoverage, summarizeComponentCoverage, CLIENT_TEST_OUTCOMES, isClientTestOutcome, CLIENT_ORACLE_FAILURE_MARKER, CLIENT_RT_ORACLE_FAILURE_MARKER, isClientOracleFailure, isClientRtOracleFailure, clientScenarioVerdictFromOutcome, clientScenarioVerdictFromTieredOutcome, AUTH_FILL_KINDS, isAuthFillKind, STR, STR_LIST, MOCK_USER_RE, ANONYMOUS_RE, JWT_AUTHORITY, JWT_AUTHORITY_LIST, JWT_RE, WMU_ARG, WITH_MOCK_USER_RE, WITH_USER_DETAILS_RE, ALLOWED_IMPORT_RE, isRecord, isSafeLine, validateImports, validateAuthFill, MAX_STATE_WRITES, MAX_HASH_FIELDS, MAX_CLAIMS, MAX_CLAIM_ARRAY, MAX_EVIDENCE, MAX_KEY_LEN, MAX_VALUE_LEN, MAX_EVIDENCE_LEN, TRANSPORTS, ALGORITHMS, VALUE_SOURCES, NAME_RE, CLAIM_NAME_RE, SCHEME_RE, FORBIDDEN_KEY_RE, CONTROL_RE, isRecord2, isSafeText, isSafeKey, isSafeField, INVALID, normaliseKeyFromClaim, normaliseClaimValue, normaliseClaims, normaliseHashFields, normaliseStateWrite, normaliseEvidence, validateRuntimeAuthHypothesis, resolveStateWriteKeys, describeRuntimeAuthHypothesisProblem, MAX_TARGETS, MAX_ROWS, MAX_COLUMNS, MAX_EVIDENCE2, MAX_STRING_VALUE, MAX_EVIDENCE_LEN2, MAX_OBJECT_KEY, MAX_SEED_OBJECT_BYTES, MAX_CONTENT_BASE64, MAX_JSON_BODY_CHARS, MAX_JSON_STRING_VALUE, MAX_JSON_BODY_DEPTH, SQL_IDENTIFIER_RE, isSqlIdentifier, OBJECT_BUCKET_RE, isIpShaped, isObjectBucket, isObjectKey, BASE64_RE, isBase64Content, CONTENT_TYPE_RE, isObjectContentType, PATH_RE, METHOD_RE, CONTROL_RE2, isRecord3, isSafeText2, normaliseValue, normaliseRow, normaliseEvidence2, normaliseTarget, normaliseObjectTarget, jsonShapeOk, normaliseApiCreateRequest, normaliseApiCreateTarget, validateRuntimeDataSeedHypothesis, validateSqlInsertHypothesis, validateObjectPutHypothesis, validateApiCreateHypothesis, describeRuntimeDataSeedHypothesisProblem, runtimeDataSeedDeviationBanner, CHECKLIST_VERDICTS, rollupChecklistDecisions, UNASSESSED_REASONS, CWE_PROFILES, CLASS_FALLBACK, enrichItem, ASSESSMENT_SCHEMA_VERSION, emptyByVerdict, summarize, toAssessmentDocument, rollupRuntime, combinedRuntimeStance, DEFAULT_PENTEST_POLICY, PENTEST_POLICY_PROVENANCE, resolvePentestPolicy, policyProvenanceNote, PENTEST_POLICY_CONSUMERS, PENTEST_POLICY_CONDITIONAL_CONSUMERS, flattenPolicy, readPath, policyOverriddenPaths, appliedPolicyThresholds, PROVENANCE_POLICIES, isProvenancePolicy, canonicalDastId, normalizeRouteTemplate, dastExecutionTargetId, dastScenarioId, dastScenarioVerdict, DAST_TARGET_COVERAGES, classifyDastCoverage, COVERAGE_FIELD, rollupDastCoverage, dastReportHash, dastScanPlanHash, dastTargetManifestHash, resolveDastProvenance, cmpStr, COVERAGE_BINDING_WINDOW_MS, parseInstant, hasExplicitOffset, resolveDastCoverageProvenance, TRUST_TIERS, isTrustTier, PRODUCER_AUTHORITIES, isProducerAuthority, assuranceForAuthority, AUTHORITY_BY_TIER, isAuthorityPermitted, ORACLE_CATALOG, verdictContextFor, isProvenanceSound, deriveVerdict, VALIDATION_REJECT_CLASSES, DAST_NEGATIVE_ORACLE_CATALOG, dastNegativeOracleSpecFor, evaluateDastNegativeOracle, sastCorroborationState, rollupE1Provenance, canonicalE1Id, cmpStr2, e1SuiteHash, parseIso, hasExplicitOffset2, AMBIGUOUS_TIMESTAMP_TOLERANCE_MS, STATUS_RANK, resolveCurrentRunId, classify, resolveE1Provenance, HYPOTHESIS_KINDS, HYPOTHESIS_ENVELOPE_SCHEMA_VERSION, MAX_TEXT_LEN, MAX_ATTEMPTS, MAX_TEMPERATURE, SHA256_HEX_RE, EXPLICIT_OFFSET_RE, CONTROL_RE3, isRecord4, isSafeText3, isSha256Hex, stableStringify, canonicalHypothesisInput, hypothesisInputHash, hypothesisContentHash, validateHypothesisProvenance, readPinnedHypothesis, resolveHypothesisProvenance, describeHypothesisProvenance, TRUST_RANK, canonicalHarnessPlan, validateHarnessPlan, KAFKA_BROKER_STATES, isKafkaBrokerState, CLEAN_STATES, KNOWN_KAFKA_LANES, isKnownKafkaLane, parseKafkaStateArg, CONSEQUENCE, brokerStateDeviation, unrecognizedDeviation, inconsistentDeviation, inconsistentFlagDeviation, kafkaStateDeviations, RUNTIME_OUTCOME_SCHEMA_VERSION, RUNTIME_TIERS, isRuntimeTier, RUNTIME_STOP_REASONS, isRuntimeStopReason, tierForStopReason, REQUIRED_DELIVERABLES, reachedTier, classifyRuntimeOutcome, classifyPreflight, BOOT_CAUSE_SOURCES, isBootCauseSource, validateRuntimeOutcome, PERF_SCHEMA_VERSION, LOAD_PLAN_SCHEMA_VERSION, ENV_CLASSES, isEnvClass, SOAK_DURATION_MARGIN_SECONDS, SOAK_DEFAULT_DRIFT_RATIO, SPIKE_MAX_PEAK_SECONDS, SPIKE_PHASE, TOKEN_REFRESH_MARGIN_SECONDS, TOKEN_REFRESH_MAX_FAILURES, MIN_RAMP_SECONDS, WRITE_METHODS, WRITE_ALLOWED_ENV_CLASSES, computePlanHash, TOOL_DEFAULT_SLO, LOAD_RUN_SCHEMA_VERSION, SYSTEMIC_REQUEST_CLASSES, MAX_DROPPED_ITERATION_SHARE,
|
|
1039
|
+
var SEVERITY_ORDER, severityRank, meetsSeverity, LANGUAGES, languageFromExtension, languageFromPath, SOURCE_TOOLS, CORE_PACK, rulePackOf, compareFindings, normalizePath, createFindingContextEnricher, formatFindingSnippet, editsOverlap, AI_GATE_POLICIES, isAiGatePolicy, AI_SKIP_GATE_POLICIES, isAiSkipGatePolicy, aiCoverageGates, findingGates, toRunIngestDto, AI_SKIP_REASONS, isRecallRiskSkip, isRetryableSkip, countRecallRiskSkips, LAYER_FLOW_MAP, sortEdges, createAstDependencyGraph, scenarioVerdictFromOutcome, CLIENT_TIERS, isClientTier, summarizeClientCoverage, summarizeComponentCoverage, CLIENT_TEST_OUTCOMES, isClientTestOutcome, CLIENT_ORACLE_FAILURE_MARKER, CLIENT_RT_ORACLE_FAILURE_MARKER, isClientOracleFailure, isClientRtOracleFailure, clientScenarioVerdictFromOutcome, clientScenarioVerdictFromTieredOutcome, AUTH_FILL_KINDS, isAuthFillKind, STR, STR_LIST, MOCK_USER_RE, ANONYMOUS_RE, JWT_AUTHORITY, JWT_AUTHORITY_LIST, JWT_RE, WMU_ARG, WITH_MOCK_USER_RE, WITH_USER_DETAILS_RE, ALLOWED_IMPORT_RE, isRecord, isSafeLine, validateImports, validateAuthFill, MAX_STATE_WRITES, MAX_HASH_FIELDS, MAX_CLAIMS, MAX_CLAIM_ARRAY, MAX_EVIDENCE, MAX_KEY_LEN, MAX_VALUE_LEN, MAX_EVIDENCE_LEN, TRANSPORTS, ALGORITHMS, VALUE_SOURCES, NAME_RE, CLAIM_NAME_RE, SCHEME_RE, FORBIDDEN_KEY_RE, CONTROL_RE, isRecord2, isSafeText, isSafeKey, isSafeField, INVALID, normaliseKeyFromClaim, normaliseClaimValue, normaliseClaims, normaliseHashFields, normaliseStateWrite, normaliseEvidence, validateRuntimeAuthHypothesis, resolveStateWriteKeys, describeRuntimeAuthHypothesisProblem, MAX_TARGETS, MAX_ROWS, MAX_COLUMNS, MAX_EVIDENCE2, MAX_STRING_VALUE, MAX_EVIDENCE_LEN2, MAX_OBJECT_KEY, MAX_SEED_OBJECT_BYTES, MAX_CONTENT_BASE64, MAX_JSON_BODY_CHARS, MAX_JSON_STRING_VALUE, MAX_JSON_BODY_DEPTH, SQL_IDENTIFIER_RE, isSqlIdentifier, OBJECT_BUCKET_RE, isIpShaped, isObjectBucket, isObjectKey, BASE64_RE, isBase64Content, CONTENT_TYPE_RE, isObjectContentType, PATH_RE, METHOD_RE, CONTROL_RE2, isRecord3, isSafeText2, normaliseValue, normaliseRow, normaliseEvidence2, normaliseTarget, normaliseObjectTarget, jsonShapeOk, normaliseApiCreateRequest, normaliseApiCreateTarget, validateRuntimeDataSeedHypothesis, validateSqlInsertHypothesis, validateObjectPutHypothesis, validateApiCreateHypothesis, describeRuntimeDataSeedHypothesisProblem, runtimeDataSeedDeviationBanner, CHECKLIST_VERDICTS, rollupChecklistDecisions, UNASSESSED_REASONS, CWE_PROFILES, CLASS_FALLBACK, enrichItem, ASSESSMENT_SCHEMA_VERSION, emptyByVerdict, summarize, toAssessmentDocument, rollupRuntime, combinedRuntimeStance, DEFAULT_PENTEST_POLICY, PENTEST_POLICY_PROVENANCE, resolvePentestPolicy, policyProvenanceNote, PENTEST_POLICY_CONSUMERS, PENTEST_POLICY_CONDITIONAL_CONSUMERS, flattenPolicy, readPath, policyOverriddenPaths, appliedPolicyThresholds, PROVENANCE_POLICIES, isProvenancePolicy, canonicalDastId, normalizeRouteTemplate, dastExecutionTargetId, dastScenarioId, dastScenarioVerdict, DAST_TARGET_COVERAGES, classifyDastCoverage, COVERAGE_FIELD, rollupDastCoverage, dastReportHash, dastScanPlanHash, dastTargetManifestHash, resolveDastProvenance, cmpStr, COVERAGE_BINDING_WINDOW_MS, parseInstant, hasExplicitOffset, resolveDastCoverageProvenance, TRUST_TIERS, isTrustTier, PRODUCER_AUTHORITIES, isProducerAuthority, assuranceForAuthority, AUTHORITY_BY_TIER, isAuthorityPermitted, ORACLE_CATALOG, verdictContextFor, isProvenanceSound, deriveVerdict, VALIDATION_REJECT_CLASSES, DAST_NEGATIVE_ORACLE_CATALOG, dastNegativeOracleSpecFor, evaluateDastNegativeOracle, sastCorroborationState, rollupE1Provenance, canonicalE1Id, cmpStr2, e1SuiteHash, parseIso, hasExplicitOffset2, AMBIGUOUS_TIMESTAMP_TOLERANCE_MS, STATUS_RANK, resolveCurrentRunId, classify, resolveE1Provenance, HYPOTHESIS_KINDS, HYPOTHESIS_ENVELOPE_SCHEMA_VERSION, MAX_TEXT_LEN, MAX_ATTEMPTS, MAX_TEMPERATURE, SHA256_HEX_RE, EXPLICIT_OFFSET_RE, CONTROL_RE3, isRecord4, isSafeText3, isSha256Hex, stableStringify, canonicalHypothesisInput, hypothesisInputHash, hypothesisContentHash, validateHypothesisProvenance, readPinnedHypothesis, resolveHypothesisProvenance, describeHypothesisProvenance, TRUST_RANK, canonicalHarnessPlan, validateHarnessPlan, KAFKA_BROKER_STATES, isKafkaBrokerState, CLEAN_STATES, KNOWN_KAFKA_LANES, isKnownKafkaLane, parseKafkaStateArg, CONSEQUENCE, brokerStateDeviation, unrecognizedDeviation, inconsistentDeviation, inconsistentFlagDeviation, kafkaStateDeviations, RUNTIME_OUTCOME_SCHEMA_VERSION, RUNTIME_TIERS, isRuntimeTier, RUNTIME_STOP_REASONS, isRuntimeStopReason, tierForStopReason, REQUIRED_DELIVERABLES, runtimeEnvBlockerNames, reachedTier, classifyRuntimeOutcome, classifyPreflight, BOOT_CAUSE_SOURCES, isBootCauseSource, validateRuntimeOutcome, PERF_SCHEMA_VERSION, LOAD_PLAN_SCHEMA_VERSION, ENV_CLASSES, isEnvClass, SOAK_DURATION_MARGIN_SECONDS, SOAK_DEFAULT_DRIFT_RATIO, SPIKE_MAX_PEAK_SECONDS, SPIKE_PHASE, TOKEN_REFRESH_MARGIN_SECONDS, TOKEN_REFRESH_MAX_FAILURES, MIN_RAMP_SECONDS, WRITE_METHODS, WRITE_ALLOWED_ENV_CLASSES, computePlanHash, TOOL_DEFAULT_SLO, LOAD_RUN_SCHEMA_VERSION, SYSTEMIC_REQUEST_CLASSES, MAX_DROPPED_ITERATION_SHARE, normalizePath2, normalizedEntry, normalizedModuleRoot, DEFAULT_RELEASE_HEADROOM, NETWORK_PATH_UNDECLARED, stepAt, MIN_SOAK_VALID_WINDOWS, errorRate, total, SERVER_SIGNALS, FINDING_MECHANISM, normMethod, computeRuleSetHash, buildRuleResults, reviewProject;
|
|
1040
1040
|
var init_dist2 = __esm({
|
|
1041
1041
|
"../core/dist/index.js"() {
|
|
1042
1042
|
init_dist();
|
|
@@ -1160,6 +1160,40 @@ var init_dist2 = __esm({
|
|
|
1160
1160
|
if (a.ruleId !== b.ruleId) return a.ruleId < b.ruleId ? -1 : 1;
|
|
1161
1161
|
return 0;
|
|
1162
1162
|
};
|
|
1163
|
+
normalizePath = (path) => path.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
1164
|
+
createFindingContextEnricher = (files) => {
|
|
1165
|
+
const sources = new Map(files.map((file) => [normalizePath(file.path), file]));
|
|
1166
|
+
const linesByPath = /* @__PURE__ */ new Map();
|
|
1167
|
+
return (finding) => {
|
|
1168
|
+
const path = normalizePath(finding.file);
|
|
1169
|
+
const source = sources.get(path);
|
|
1170
|
+
const line2 = finding.range.line;
|
|
1171
|
+
if (!source || !Number.isSafeInteger(line2) || line2 < 1) return finding;
|
|
1172
|
+
let lines = linesByPath.get(path);
|
|
1173
|
+
if (!lines) {
|
|
1174
|
+
lines = (source.originalContent ?? source.content).replace(/\r\n/g, "\n").split("\n");
|
|
1175
|
+
if (lines.length > 1 && lines.at(-1) === "") lines = lines.slice(0, -1);
|
|
1176
|
+
linesByPath.set(path, lines);
|
|
1177
|
+
}
|
|
1178
|
+
if (line2 > lines.length) return finding;
|
|
1179
|
+
const start = Math.max(0, Math.min(line2 - 5, lines.length - 10));
|
|
1180
|
+
const snippet = lines.slice(start, start + 10).map((text2) => text2.length > 1600 ? `${text2.slice(0, 1599)}\u2026` : text2).join("\n");
|
|
1181
|
+
if (!snippet.trim()) return finding;
|
|
1182
|
+
return { ...finding, snippet, snippetStartLine: start + 1 };
|
|
1183
|
+
};
|
|
1184
|
+
};
|
|
1185
|
+
formatFindingSnippet = (finding) => {
|
|
1186
|
+
if (!finding.snippet) return void 0;
|
|
1187
|
+
if (finding.snippetStartLine === void 0) return finding.snippet;
|
|
1188
|
+
const start = finding.snippetStartLine;
|
|
1189
|
+
const lines = finding.snippet.split("\n");
|
|
1190
|
+
const width = String(start + lines.length - 1).length;
|
|
1191
|
+
return lines.map((text2, index2) => {
|
|
1192
|
+
const line2 = start + index2;
|
|
1193
|
+
const marker = line2 >= finding.range.line && line2 <= (finding.range.endLine ?? finding.range.line) ? ">" : " ";
|
|
1194
|
+
return `${marker} ${String(line2).padStart(width)} | ${text2}`;
|
|
1195
|
+
}).join("\n");
|
|
1196
|
+
};
|
|
1163
1197
|
editsOverlap = (a, b) => {
|
|
1164
1198
|
if (a.file !== b.file) return false;
|
|
1165
1199
|
const aStartsAfterBEnd = a.startLine > b.endLine || a.startLine === b.endLine && a.startColumn >= b.endColumn;
|
|
@@ -3060,6 +3094,7 @@ var init_dist2 = __esm({
|
|
|
3060
3094
|
"nothing-to-verify",
|
|
3061
3095
|
"auth-gate",
|
|
3062
3096
|
"baseline-unreachable",
|
|
3097
|
+
"synthetic-env-blocked",
|
|
3063
3098
|
"complete",
|
|
3064
3099
|
"runner-fault"
|
|
3065
3100
|
];
|
|
@@ -3077,6 +3112,7 @@ var init_dist2 = __esm({
|
|
|
3077
3112
|
case "nothing-to-verify":
|
|
3078
3113
|
case "auth-gate":
|
|
3079
3114
|
case "baseline-unreachable":
|
|
3115
|
+
case "synthetic-env-blocked":
|
|
3080
3116
|
return "T3";
|
|
3081
3117
|
case "complete":
|
|
3082
3118
|
return "T4";
|
|
@@ -3098,6 +3134,22 @@ var init_dist2 = __esm({
|
|
|
3098
3134
|
"correlation"
|
|
3099
3135
|
]
|
|
3100
3136
|
};
|
|
3137
|
+
runtimeEnvBlockerNames = (evidence18) => {
|
|
3138
|
+
const names = /* @__PURE__ */ new Set();
|
|
3139
|
+
for (const row2 of evidence18) {
|
|
3140
|
+
if (row2.source !== "correlation.runtimeEnvBlockers") continue;
|
|
3141
|
+
try {
|
|
3142
|
+
const raw = JSON.parse(row2.verbatim);
|
|
3143
|
+
if (!Array.isArray(raw) || raw.length > 256 || !raw.every(
|
|
3144
|
+
(value) => typeof value === "string" && /^[A-Za-z_][A-Za-z0-9_]{0,255}$/.test(value)
|
|
3145
|
+
))
|
|
3146
|
+
continue;
|
|
3147
|
+
for (const value of raw) names.add(value);
|
|
3148
|
+
} catch {
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
return [...names].sort().slice(0, 256);
|
|
3152
|
+
};
|
|
3101
3153
|
reachedTier = (s) => {
|
|
3102
3154
|
if (!s.archiveReadable || s.sourceFilesFound === 0) return "T0";
|
|
3103
3155
|
if (!s.staticAssessmentCompleted) return "T0";
|
|
@@ -3122,6 +3174,9 @@ var init_dist2 = __esm({
|
|
|
3122
3174
|
if (s.scenariosGenerated === 0) return { tier: "T3", stopReason: "nothing-to-verify" };
|
|
3123
3175
|
if (s.scenariosConcluded === 0) {
|
|
3124
3176
|
if (s.appDiedAbnormally === true) return { tier: "T3", stopReason: "runner-fault" };
|
|
3177
|
+
if ((s.syntheticEnvBlockedCount ?? 0) > 0) {
|
|
3178
|
+
return { tier: "T3", stopReason: "synthetic-env-blocked" };
|
|
3179
|
+
}
|
|
3125
3180
|
const baseline = s.authBaselineStatus;
|
|
3126
3181
|
const e2Scanned = s.e2ScannedCount;
|
|
3127
3182
|
const e2Gated = s.e2AuthGatedCount;
|
|
@@ -3194,6 +3249,12 @@ var init_dist2 = __esm({
|
|
|
3194
3249
|
detail: `stopReason '${o.stopReason}' carries no evidence`
|
|
3195
3250
|
});
|
|
3196
3251
|
}
|
|
3252
|
+
if (o.stopReason === "synthetic-env-blocked" && runtimeEnvBlockerNames(o.evidence).length === 0) {
|
|
3253
|
+
violations.push({
|
|
3254
|
+
invariant: "I4",
|
|
3255
|
+
detail: "stopReason 'synthetic-env-blocked' must carry named correlation.runtimeEnvBlockers"
|
|
3256
|
+
});
|
|
3257
|
+
}
|
|
3197
3258
|
if (o.stopReason === "boot-blocked" && !o.evidence.some((e) => isBootCauseSource(e.source))) {
|
|
3198
3259
|
violations.push({
|
|
3199
3260
|
invariant: "I4",
|
|
@@ -3247,9 +3308,9 @@ var init_dist2 = __esm({
|
|
|
3247
3308
|
"timeout"
|
|
3248
3309
|
];
|
|
3249
3310
|
MAX_DROPPED_ITERATION_SHARE = 0.01;
|
|
3250
|
-
|
|
3311
|
+
normalizePath2 = (path) => path.replaceAll("\\", "/").replace(/\/{2,}/g, "/").replace(/\/+$/, "");
|
|
3251
3312
|
normalizedEntry = (path) => {
|
|
3252
|
-
let p =
|
|
3313
|
+
let p = normalizePath2(path);
|
|
3253
3314
|
while (p.startsWith("./")) p = p.slice(2);
|
|
3254
3315
|
if (p === "" || p === ".") return null;
|
|
3255
3316
|
const segments = p.split("/");
|
|
@@ -3260,7 +3321,7 @@ var init_dist2 = __esm({
|
|
|
3260
3321
|
};
|
|
3261
3322
|
normalizedModuleRoot = (moduleRoot) => {
|
|
3262
3323
|
if (moduleRoot === void 0) return "";
|
|
3263
|
-
let p =
|
|
3324
|
+
let p = normalizePath2(moduleRoot);
|
|
3264
3325
|
while (p.startsWith("./")) p = p.slice(2);
|
|
3265
3326
|
if (p === "" || p === ".") return "";
|
|
3266
3327
|
if (p.startsWith("/") || /^[a-zA-Z]:/.test(p)) return null;
|
|
@@ -3409,12 +3470,16 @@ var init_dist2 = __esm({
|
|
|
3409
3470
|
);
|
|
3410
3471
|
const findings2 = [...input4.initialFindings ?? []];
|
|
3411
3472
|
const addedFindings = [];
|
|
3473
|
+
const enrichFinding = createFindingContextEnricher([
|
|
3474
|
+
...input4.contextFiles ?? [],
|
|
3475
|
+
...input4.files
|
|
3476
|
+
]);
|
|
3412
3477
|
const findingKeys = new Set(
|
|
3413
3478
|
findings2.map(
|
|
3414
3479
|
(finding) => `${finding.ruleId}\0${finding.file}\0${finding.range.line}\0${finding.range.endLine ?? ""}\0${finding.message}\0${finding.suggestion ?? ""}`
|
|
3415
3480
|
)
|
|
3416
3481
|
);
|
|
3417
|
-
for await (const
|
|
3482
|
+
for await (const rawFinding of executor.execute(executionRules, input4.files, {
|
|
3418
3483
|
runId,
|
|
3419
3484
|
projectRoot: input4.projectPath,
|
|
3420
3485
|
...input4.minSeverity !== void 0 ? { minSeverity: input4.minSeverity } : {},
|
|
@@ -3427,9 +3492,10 @@ var init_dist2 = __esm({
|
|
|
3427
3492
|
// Each is optional; passing them conditionally keeps Zod's
|
|
3428
3493
|
// strict-undefined contract happy when the executor's options
|
|
3429
3494
|
// pass through a schema check downstream.
|
|
3430
|
-
...input4.onFinding !== void 0 ? { onFinding: input4.onFinding } : {},
|
|
3495
|
+
...input4.onFinding !== void 0 ? { onFinding: (finding) => input4.onFinding?.(enrichFinding(finding)) } : {},
|
|
3431
3496
|
...input4.onFileComplete !== void 0 ? { onFileComplete: input4.onFileComplete } : {}
|
|
3432
3497
|
})) {
|
|
3498
|
+
const finding = enrichFinding(rawFinding);
|
|
3433
3499
|
const key = `${finding.ruleId}\0${finding.file}\0${finding.range.line}\0${finding.range.endLine ?? ""}\0${finding.message}\0${finding.suggestion ?? ""}`;
|
|
3434
3500
|
if (findingKeys.has(key)) continue;
|
|
3435
3501
|
findingKeys.add(key);
|
|
@@ -10276,12 +10342,177 @@ async function createDefaultTaintAnalyzer() {
|
|
|
10276
10342
|
createJavaTaintAnalyzer(javaLanguage)
|
|
10277
10343
|
]);
|
|
10278
10344
|
}
|
|
10279
|
-
function
|
|
10345
|
+
function returnsPrimitiveString(method, cls, visiting = /* @__PURE__ */ new Set()) {
|
|
10346
|
+
if (cls.getExtends() || visiting.has(method.getName()) || method.getReturnTypeNode()?.getText() !== "string")
|
|
10347
|
+
return false;
|
|
10348
|
+
if (method.isAsync() || method.getParameters().some((p) => p.getTypeNode()?.getText() !== "string"))
|
|
10349
|
+
return false;
|
|
10350
|
+
const sf = cls.getSourceFile();
|
|
10351
|
+
if (cls.getConstructors().length) return false;
|
|
10352
|
+
if (cls.getDescendants().some(
|
|
10353
|
+
(n) => Node.isBinaryExpression(n) && n.getLeft().getText().startsWith("this.") && /^(?:=|\+=|\|\|=|\?\?=)$/.test(n.getOperatorToken().getText())
|
|
10354
|
+
))
|
|
10355
|
+
return false;
|
|
10356
|
+
const nativeRegExp = !sf.getImportDeclarations().some(
|
|
10357
|
+
(d) => d.getNamedImports().some((i) => (i.getAliasNode()?.getText() ?? i.getName()) === "RegExp") || d.getDefaultImport()?.getText() === "RegExp"
|
|
10358
|
+
) && !sf.getClasses().some((c) => c.getName() === "RegExp") && !sf.getFunctions().some((f) => f.getName() === "RegExp") && !sf.getVariableDeclarations().some((d) => d.getName() === "RegExp") && !method.getParameters().some((p) => p.getName() === "RegExp");
|
|
10359
|
+
const body = method.getBody();
|
|
10360
|
+
if (!body || !Node.isBlock(body)) return false;
|
|
10361
|
+
if (body.getDescendants().some(
|
|
10362
|
+
(n) => Node.isAsExpression(n) || Node.isTypeAssertion(n) || Node.isAwaitExpression(n) || Node.isBinaryExpression(n) && /^(?:=|\+=|\|\|=|\?\?=)$/.test(n.getOperatorToken().getText())
|
|
10363
|
+
))
|
|
10364
|
+
return false;
|
|
10365
|
+
if (body.getDescendants().filter(Node.isIfStatement).some(
|
|
10366
|
+
(n) => n.getExpression().getDescendants().some(Node.isCallExpression) || Node.isCallExpression(n.getExpression())
|
|
10367
|
+
))
|
|
10368
|
+
return false;
|
|
10369
|
+
const active = new Set(visiting).add(method.getName());
|
|
10370
|
+
const parameters = new Set(method.getParameters().map((p) => p.getName()));
|
|
10371
|
+
const locals = /* @__PURE__ */ new Map();
|
|
10372
|
+
for (const statement of body.getStatements()) {
|
|
10373
|
+
if (Node.isVariableStatement(statement)) {
|
|
10374
|
+
if (statement.getDeclarationKind() !== "const") return false;
|
|
10375
|
+
for (const decl of statement.getDeclarations()) {
|
|
10376
|
+
const value = decl.getInitializer();
|
|
10377
|
+
if (!value) return false;
|
|
10378
|
+
locals.set(decl.getName(), value);
|
|
10379
|
+
}
|
|
10380
|
+
} else if (!Node.isReturnStatement(statement) && !Node.isIfStatement(statement)) return false;
|
|
10381
|
+
}
|
|
10382
|
+
const stringValue = (node, hops = 0) => {
|
|
10383
|
+
if (!node || hops > 10) return false;
|
|
10384
|
+
if (Node.isStringLiteral(node) || Node.isNoSubstitutionTemplateLiteral(node)) return true;
|
|
10385
|
+
if (Node.isTemplateExpression(node))
|
|
10386
|
+
return node.getTemplateSpans().every((span) => stringValue(span.getExpression(), hops + 1));
|
|
10387
|
+
if (Node.isParenthesizedExpression(node)) return stringValue(node.getExpression(), hops + 1);
|
|
10388
|
+
if (Node.isIdentifier(node))
|
|
10389
|
+
return parameters.has(node.getText()) || stringValue(locals.get(node.getText()), hops + 1);
|
|
10390
|
+
if (Node.isBinaryExpression(node) && ["??", "||", "+"].includes(node.getOperatorToken().getText()))
|
|
10391
|
+
return stringValue(node.getLeft(), hops + 1) && stringValue(node.getRight(), hops + 1);
|
|
10392
|
+
if (!Node.isCallExpression(node)) return false;
|
|
10393
|
+
const callee = node.getExpression();
|
|
10394
|
+
if (!Node.isPropertyAccessExpression(callee)) return false;
|
|
10395
|
+
if (callee.getName() === "replace" && stringValue(callee.getExpression(), hops + 1)) {
|
|
10396
|
+
const [pattern, replacement] = node.getArguments();
|
|
10397
|
+
const regex = pattern && (Node.isRegularExpressionLiteral(pattern) || Node.isIdentifier(pattern) && (() => {
|
|
10398
|
+
const init = locals.get(pattern.getText());
|
|
10399
|
+
return nativeRegExp && !!init && Node.isNewExpression(init) && init.getExpression().getText() === "RegExp";
|
|
10400
|
+
})());
|
|
10401
|
+
return node.getArguments().length === 2 && !!regex && stringValue(replacement, hops + 1);
|
|
10402
|
+
}
|
|
10403
|
+
if (callee.getExpression().getText() !== "this") return false;
|
|
10404
|
+
const helper = cls.getMethod(callee.getName());
|
|
10405
|
+
return !!helper && helper.getScope() === "private" && node.getArguments().every((arg) => stringValue(arg, hops + 1)) && returnsPrimitiveString(helper, cls, active);
|
|
10406
|
+
};
|
|
10407
|
+
const producedString = (node, hops = 0) => {
|
|
10408
|
+
if (!node || hops > 10) return false;
|
|
10409
|
+
if (Node.isIdentifier(node))
|
|
10410
|
+
return !parameters.has(node.getText()) && producedString(locals.get(node.getText()), hops + 1);
|
|
10411
|
+
if (Node.isParenthesizedExpression(node)) return producedString(node.getExpression(), hops + 1);
|
|
10412
|
+
if (Node.isBinaryExpression(node)) return false;
|
|
10413
|
+
return stringValue(node);
|
|
10414
|
+
};
|
|
10415
|
+
const returns = body.getDescendants().filter(Node.isReturnStatement);
|
|
10416
|
+
return returns.length > 0 && returns.every((r) => producedString(r.getExpression()));
|
|
10417
|
+
}
|
|
10418
|
+
function provenStringPipes(component, files) {
|
|
10419
|
+
const project = new Project({ useInMemoryFileSystem: true, skipFileDependencyResolution: true });
|
|
10420
|
+
const source = project.createSourceFile(component.path, component.content);
|
|
10421
|
+
const cls = source.getClasses().find((c) => c.getDecorator("Component"));
|
|
10422
|
+
const metadata = cls?.getDecorator("Component")?.getCallExpression()?.getArguments()[0];
|
|
10423
|
+
if (!metadata || !Node.isObjectLiteralExpression(metadata)) return /* @__PURE__ */ new Set();
|
|
10424
|
+
const imports = metadata.getProperty("imports");
|
|
10425
|
+
const listed = imports && Node.isPropertyAssignment(imports) ? imports.getInitializer() : void 0;
|
|
10426
|
+
if (!listed || !Node.isArrayLiteralExpression(listed)) return /* @__PURE__ */ new Set();
|
|
10427
|
+
const used = new Set(
|
|
10428
|
+
listed.getElements().filter(Node.isIdentifier).map((n) => n.getText())
|
|
10429
|
+
);
|
|
10430
|
+
let resolution;
|
|
10431
|
+
const resolveContext = () => {
|
|
10432
|
+
if (resolution !== void 0) return resolution;
|
|
10433
|
+
resolution = null;
|
|
10434
|
+
try {
|
|
10435
|
+
const configPath = ts.findConfigFile(dirname(component.absolutePath), ts.sys.fileExists);
|
|
10436
|
+
if (!configPath) return null;
|
|
10437
|
+
const config = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
10438
|
+
if (config.error) return null;
|
|
10439
|
+
const parsed = ts.parseJsonConfigFileContent(config.config, ts.sys, dirname(configPath));
|
|
10440
|
+
if (parsed.errors.some((e) => e.code !== 18003 && e.code !== 18002)) return null;
|
|
10441
|
+
resolution = {
|
|
10442
|
+
options: parsed.options,
|
|
10443
|
+
root: realpathSync(resolve(dirname(configPath), "src"))
|
|
10444
|
+
};
|
|
10445
|
+
} catch {
|
|
10446
|
+
return null;
|
|
10447
|
+
}
|
|
10448
|
+
return resolution;
|
|
10449
|
+
};
|
|
10450
|
+
const pipes = /* @__PURE__ */ new Set();
|
|
10451
|
+
const declaredPipeNames = /* @__PURE__ */ new Set();
|
|
10452
|
+
const ambiguousPipeNames = /* @__PURE__ */ new Set();
|
|
10453
|
+
for (const declaration of source.getImportDeclarations())
|
|
10454
|
+
for (const named of declaration.getNamedImports()) {
|
|
10455
|
+
if (!used.has(named.getAliasNode()?.getText() ?? named.getName())) continue;
|
|
10456
|
+
const specifier = declaration.getModuleSpecifierValue();
|
|
10457
|
+
let content;
|
|
10458
|
+
const relativePath = resolve(dirname(component.absolutePath), specifier);
|
|
10459
|
+
content = files.find(
|
|
10460
|
+
(f) => [`${relativePath}.ts`, `${relativePath}/index.ts`].includes(f.absolutePath)
|
|
10461
|
+
)?.content;
|
|
10462
|
+
if (content === void 0)
|
|
10463
|
+
try {
|
|
10464
|
+
const context = resolveContext();
|
|
10465
|
+
if (!context) continue;
|
|
10466
|
+
const target = ts.resolveModuleName(
|
|
10467
|
+
specifier,
|
|
10468
|
+
component.absolutePath,
|
|
10469
|
+
context.options,
|
|
10470
|
+
ts.sys
|
|
10471
|
+
).resolvedModule?.resolvedFileName;
|
|
10472
|
+
if (!target || !target.endsWith(".ts") || target.endsWith(".d.ts")) continue;
|
|
10473
|
+
const root = context.root;
|
|
10474
|
+
const actual = realpathSync(target);
|
|
10475
|
+
const within = relative(root, actual);
|
|
10476
|
+
if (isAbsolute(within) || within.startsWith(`..${sep}`) || within === ".." || actual.includes(`${sep}node_modules${sep}`))
|
|
10477
|
+
continue;
|
|
10478
|
+
content = readFileSync(actual, "utf8");
|
|
10479
|
+
} catch {
|
|
10480
|
+
continue;
|
|
10481
|
+
}
|
|
10482
|
+
if (content === void 0) continue;
|
|
10483
|
+
const pipeSource = project.createSourceFile(
|
|
10484
|
+
`context-${pipes.size}-${named.getName()}.ts`,
|
|
10485
|
+
content,
|
|
10486
|
+
{ overwrite: true }
|
|
10487
|
+
);
|
|
10488
|
+
const pipeClass = pipeSource.getClass(named.getName());
|
|
10489
|
+
const decorator = pipeClass?.getDecorators().find((d) => {
|
|
10490
|
+
const binding = pipeSource.getImportDeclarations().filter((i) => i.getModuleSpecifierValue() === "@angular/core").flatMap((i) => i.getNamedImports()).find(
|
|
10491
|
+
(i) => i.getName() === "Pipe" && (i.getAliasNode()?.getText() ?? i.getName()) === d.getName()
|
|
10492
|
+
);
|
|
10493
|
+
return !!binding;
|
|
10494
|
+
});
|
|
10495
|
+
const options = decorator?.getCallExpression()?.getArguments()[0];
|
|
10496
|
+
const name = options && Node.isObjectLiteralExpression(options) ? options.getProperty("name") : void 0;
|
|
10497
|
+
const value = name && Node.isPropertyAssignment(name) ? name.getInitializer() : void 0;
|
|
10498
|
+
const transform = pipeClass?.getMethod("transform");
|
|
10499
|
+
if (value && Node.isStringLiteral(value)) {
|
|
10500
|
+
const pipeName = value.getLiteralValue();
|
|
10501
|
+
if (declaredPipeNames.has(pipeName)) ambiguousPipeNames.add(pipeName);
|
|
10502
|
+
declaredPipeNames.add(pipeName);
|
|
10503
|
+
if (!ambiguousPipeNames.has(pipeName) && transform && pipeClass && returnsPrimitiveString(transform, pipeClass))
|
|
10504
|
+
pipes.add(pipeName);
|
|
10505
|
+
else pipes.delete(pipeName);
|
|
10506
|
+
}
|
|
10507
|
+
}
|
|
10508
|
+
return pipes;
|
|
10509
|
+
}
|
|
10510
|
+
function normalizePath3(p) {
|
|
10280
10511
|
return posix.normalize(p.replace(/\\/g, "/")).replace(/^\.\//, "");
|
|
10281
10512
|
}
|
|
10282
10513
|
function resolveTemplatePath(componentPath, templateUrl) {
|
|
10283
|
-
const dir = posix.dirname(
|
|
10284
|
-
return
|
|
10514
|
+
const dir = posix.dirname(normalizePath3(componentPath));
|
|
10515
|
+
return normalizePath3(posix.join(dir, templateUrl.replace(/\\/g, "/")));
|
|
10285
10516
|
}
|
|
10286
10517
|
function templateUrlMatches(componentFile, htmlPath) {
|
|
10287
10518
|
const re = /templateUrl\s*:\s*['"`]([^'"`]+)['"`]/g;
|
|
@@ -10388,6 +10619,106 @@ function classifyRhs(rhs, externalMembers) {
|
|
|
10388
10619
|
if (SOURCE_PATTERNS.some((re) => re.test(rhsText))) return "tainted-source";
|
|
10389
10620
|
return null;
|
|
10390
10621
|
}
|
|
10622
|
+
function provenHtmlMethods(cls, sf) {
|
|
10623
|
+
const methods = /* @__PURE__ */ new Set();
|
|
10624
|
+
const assignments = /* @__PURE__ */ new Set([
|
|
10625
|
+
"=",
|
|
10626
|
+
"+=",
|
|
10627
|
+
"-=",
|
|
10628
|
+
"*=",
|
|
10629
|
+
"/=",
|
|
10630
|
+
"%=",
|
|
10631
|
+
"**=",
|
|
10632
|
+
"<<=",
|
|
10633
|
+
">>=",
|
|
10634
|
+
">>>=",
|
|
10635
|
+
"&=",
|
|
10636
|
+
"|=",
|
|
10637
|
+
"^=",
|
|
10638
|
+
"||=",
|
|
10639
|
+
"&&=",
|
|
10640
|
+
"??="
|
|
10641
|
+
]);
|
|
10642
|
+
const purifier = sf.getImportDeclarations().find((d) => d.getModuleSpecifierValue() === "dompurify")?.getDefaultImport()?.getText();
|
|
10643
|
+
const angularSanitizer = sf.getImportDeclarations().filter((d) => d.getModuleSpecifierValue() === "@angular/platform-browser").flatMap((d) => d.getNamedImports()).find((n) => n.getName() === "DomSanitizer");
|
|
10644
|
+
if (!purifier || !angularSanitizer) return methods;
|
|
10645
|
+
if (sf.getDescendantsOfKind(SyntaxKind.CallExpression).some(
|
|
10646
|
+
(c) => new RegExp(
|
|
10647
|
+
`^${purifier}\\.(?:addHook|setConfig|removeHook|removeHooks|removeAllHooks)$`
|
|
10648
|
+
).test(c.getExpression().getText())
|
|
10649
|
+
))
|
|
10650
|
+
return methods;
|
|
10651
|
+
if (sf.getDescendantsOfKind(SyntaxKind.BinaryExpression).some(
|
|
10652
|
+
(n) => n.getLeft().getText().startsWith(`${purifier}.`) && assignments.has(n.getOperatorToken().getText())
|
|
10653
|
+
))
|
|
10654
|
+
return methods;
|
|
10655
|
+
const sanitizerType = angularSanitizer.getAliasNode()?.getText() ?? angularSanitizer.getName();
|
|
10656
|
+
const sanitizerMembers = new Set(
|
|
10657
|
+
cls.getProperties().filter((p) => p.getInitializer()?.getText() === `inject(${sanitizerType})`).map((p) => p.getName())
|
|
10658
|
+
);
|
|
10659
|
+
for (const ctor of cls.getConstructors())
|
|
10660
|
+
for (const param of ctor.getParameters()) {
|
|
10661
|
+
if (param.isParameterProperty() && param.getTypeNode()?.getText() === sanitizerType)
|
|
10662
|
+
sanitizerMembers.add(param.getName());
|
|
10663
|
+
}
|
|
10664
|
+
for (const assignment of cls.getDescendantsOfKind(SyntaxKind.BinaryExpression)) {
|
|
10665
|
+
if (!assignments.has(assignment.getOperatorToken().getText())) continue;
|
|
10666
|
+
const member = thisPropertyName(assignment.getLeft());
|
|
10667
|
+
if (member) sanitizerMembers.delete(member);
|
|
10668
|
+
}
|
|
10669
|
+
const allowedTags = new Set(
|
|
10670
|
+
"p br span strong em u s mark h1 h2 h3 h4 h5 h6 ul ol li a img div b i blockquote pre code table thead tbody tr th td hr".split(
|
|
10671
|
+
" "
|
|
10672
|
+
)
|
|
10673
|
+
);
|
|
10674
|
+
const allowedAttrs = new Set("href target rel src alt title style class data-color".split(" "));
|
|
10675
|
+
const validPolicy = (arg) => {
|
|
10676
|
+
if (!arg) return true;
|
|
10677
|
+
if (!Node.isObjectLiteralExpression(arg)) return false;
|
|
10678
|
+
for (const prop of arg.getProperties()) {
|
|
10679
|
+
if (!Node.isPropertyAssignment(prop)) return false;
|
|
10680
|
+
const key = prop.getName().replace(/^['"]|['"]$/g, "");
|
|
10681
|
+
const value = prop.getInitializer();
|
|
10682
|
+
if (key === "ALLOWED_TAGS" || key === "ALLOWED_ATTR") {
|
|
10683
|
+
if (!value || !Node.isArrayLiteralExpression(value)) return false;
|
|
10684
|
+
const set = key === "ALLOWED_TAGS" ? allowedTags : allowedAttrs;
|
|
10685
|
+
if (!value.getElements().every((n) => Node.isStringLiteral(n) && set.has(n.getLiteralValue())))
|
|
10686
|
+
return false;
|
|
10687
|
+
} else if (key === "ALLOWED_URI_REGEXP") {
|
|
10688
|
+
if (value?.getText() !== "/^(?:https?|mailto):/i") return false;
|
|
10689
|
+
} else return false;
|
|
10690
|
+
}
|
|
10691
|
+
return true;
|
|
10692
|
+
};
|
|
10693
|
+
for (const method of cls.getMethods()) {
|
|
10694
|
+
if (method.getParameters().some((p) => p.getName() === purifier)) continue;
|
|
10695
|
+
const body = method.getBody();
|
|
10696
|
+
const statements = body && Node.isBlock(body) ? body.getStatements() : void 0;
|
|
10697
|
+
if (!statements || statements.length !== 2) continue;
|
|
10698
|
+
const [first, last] = statements;
|
|
10699
|
+
if (!first || !Node.isVariableStatement(first) || first.getDeclarationKind() !== "const" || !last || !Node.isReturnStatement(last))
|
|
10700
|
+
continue;
|
|
10701
|
+
const declarations = first.getDeclarations();
|
|
10702
|
+
if (declarations.length !== 1) continue;
|
|
10703
|
+
const local = declarations[0];
|
|
10704
|
+
const init = local?.getInitializer();
|
|
10705
|
+
if (!local || local.getName() === purifier || !init || !Node.isCallExpression(init) || init.getExpression().getText() !== `${purifier}.sanitize`)
|
|
10706
|
+
continue;
|
|
10707
|
+
const input4 = init.getArguments()[0];
|
|
10708
|
+
if (!input4 || !Node.isIdentifier(input4) || !method.getParameters().some((p) => p.getName() === input4.getText()))
|
|
10709
|
+
continue;
|
|
10710
|
+
if (init.getArguments().length > 2 || !validPolicy(init.getArguments()[1])) continue;
|
|
10711
|
+
const output2 = last.getExpression();
|
|
10712
|
+
if (!output2 || !Node.isCallExpression(output2) || output2.getArguments().length !== 1 || output2.getArguments()[0]?.getText() !== local.getName())
|
|
10713
|
+
continue;
|
|
10714
|
+
const callee = output2.getExpression();
|
|
10715
|
+
if (!Node.isPropertyAccessExpression(callee) || callee.getName() !== "bypassSecurityTrustHtml")
|
|
10716
|
+
continue;
|
|
10717
|
+
const receiver = thisPropertyName(callee.getExpression());
|
|
10718
|
+
if (receiver && sanitizerMembers.has(receiver)) methods.add(method.getName());
|
|
10719
|
+
}
|
|
10720
|
+
return methods;
|
|
10721
|
+
}
|
|
10391
10722
|
function classifyMembers(componentSource, componentPath) {
|
|
10392
10723
|
const origins = /* @__PURE__ */ new Map();
|
|
10393
10724
|
const RANK = {
|
|
@@ -10403,7 +10734,7 @@ function classifyMembers(componentSource, componentPath) {
|
|
|
10403
10734
|
const project = new Project({ useInMemoryFileSystem: true });
|
|
10404
10735
|
const sf = project.createSourceFile(componentPath, componentSource, { overwrite: true });
|
|
10405
10736
|
const cls = findComponentClass(sf);
|
|
10406
|
-
if (!cls) return origins;
|
|
10737
|
+
if (!cls) return { memberOrigins: origins };
|
|
10407
10738
|
const externalMembers = collectExternalMembers(cls);
|
|
10408
10739
|
for (const prop of cls.getProperties()) {
|
|
10409
10740
|
const init = prop.getInitializer();
|
|
@@ -10418,19 +10749,24 @@ function classifyMembers(componentSource, componentPath) {
|
|
|
10418
10749
|
const origin = classifyRhs(bin.getRight(), externalMembers);
|
|
10419
10750
|
if (origin) fold(name, origin);
|
|
10420
10751
|
}
|
|
10421
|
-
return origins;
|
|
10752
|
+
return { memberOrigins: origins, sanitizedHtmlMethods: provenHtmlMethods(cls, sf) };
|
|
10422
10753
|
}
|
|
10423
10754
|
function createTemplateComponentLinker() {
|
|
10424
10755
|
return {
|
|
10425
10756
|
link(htmlFile, options) {
|
|
10426
10757
|
if (htmlFile.language !== "html") return null;
|
|
10427
|
-
const htmlPath =
|
|
10758
|
+
const htmlPath = normalizePath3(htmlFile.path);
|
|
10428
10759
|
try {
|
|
10429
10760
|
for (const f of options.files) {
|
|
10430
10761
|
if (f.language !== "typescript" && f.language !== "javascript") continue;
|
|
10431
10762
|
if (!f.content.includes("templateUrl")) continue;
|
|
10432
10763
|
if (!templateUrlMatches(f, htmlPath)) continue;
|
|
10433
|
-
|
|
10764
|
+
const primitiveStringPipes = provenStringPipes(f, options.files);
|
|
10765
|
+
return {
|
|
10766
|
+
componentPath: f.path,
|
|
10767
|
+
...classifyMembers(f.content, f.path),
|
|
10768
|
+
primitiveStringPipes
|
|
10769
|
+
};
|
|
10434
10770
|
}
|
|
10435
10771
|
} catch {
|
|
10436
10772
|
return null;
|
|
@@ -10839,7 +11175,7 @@ function resolveVueRoutes(files, options = {}) {
|
|
|
10839
11175
|
}
|
|
10840
11176
|
};
|
|
10841
11177
|
}
|
|
10842
|
-
function
|
|
11178
|
+
function normalizePath32(p) {
|
|
10843
11179
|
return posix.normalize(p.replace(/\\/g, "/")).replace(/^\.\//, "");
|
|
10844
11180
|
}
|
|
10845
11181
|
function pathSegments2(value) {
|
|
@@ -10970,9 +11306,9 @@ function loadTsConfig(projectRoot) {
|
|
|
10970
11306
|
const paths = /* @__PURE__ */ new Map();
|
|
10971
11307
|
let baseUrl = "";
|
|
10972
11308
|
const visited = /* @__PURE__ */ new Set();
|
|
10973
|
-
const root =
|
|
11309
|
+
const root = normalizePath32(projectRoot);
|
|
10974
11310
|
const load = (tsRelToRoot) => {
|
|
10975
|
-
const norm2 =
|
|
11311
|
+
const norm2 = normalizePath32(tsRelToRoot);
|
|
10976
11312
|
if (visited.has(norm2) || visited.size > 8) return;
|
|
10977
11313
|
visited.add(norm2);
|
|
10978
11314
|
let json;
|
|
@@ -10984,16 +11320,16 @@ function loadTsConfig(projectRoot) {
|
|
|
10984
11320
|
const dir = posix.dirname(norm2);
|
|
10985
11321
|
if (typeof json.extends === "string" && json.extends.startsWith(".")) {
|
|
10986
11322
|
const ext = json.extends.endsWith(".json") ? json.extends : `${json.extends}.json`;
|
|
10987
|
-
load(
|
|
11323
|
+
load(normalizePath32(posix.join(dir, ext)));
|
|
10988
11324
|
}
|
|
10989
11325
|
const co = json.compilerOptions ?? {};
|
|
10990
11326
|
const fileBaseUrl = typeof co.baseUrl === "string" ? co.baseUrl : ".";
|
|
10991
|
-
if (typeof co.baseUrl === "string") baseUrl =
|
|
11327
|
+
if (typeof co.baseUrl === "string") baseUrl = normalizePath32(posix.join(dir, co.baseUrl));
|
|
10992
11328
|
const rawPaths = co.paths;
|
|
10993
11329
|
if (rawPaths && typeof rawPaths === "object" && !Array.isArray(rawPaths)) {
|
|
10994
11330
|
for (const [pattern, targets] of Object.entries(rawPaths)) {
|
|
10995
11331
|
if (!Array.isArray(targets)) continue;
|
|
10996
|
-
const resolved = targets.filter((t) => typeof t === "string").map((t) =>
|
|
11332
|
+
const resolved = targets.filter((t) => typeof t === "string").map((t) => normalizePath32(posix.join(dir, fileBaseUrl, t)));
|
|
10997
11333
|
if (resolved.length > 0) paths.set(pattern, resolved);
|
|
10998
11334
|
}
|
|
10999
11335
|
}
|
|
@@ -11014,7 +11350,7 @@ function matchPathPattern2(specifier, pattern) {
|
|
|
11014
11350
|
}
|
|
11015
11351
|
function resolveSpecifier(fromPath, specifier, filesByPath, tsconfig) {
|
|
11016
11352
|
if (specifier.startsWith(".")) {
|
|
11017
|
-
const base =
|
|
11353
|
+
const base = normalizePath32(posix.join(posix.dirname(fromPath), specifier));
|
|
11018
11354
|
for (const c of candidatePaths2(base)) if (filesByPath.has(c)) return c;
|
|
11019
11355
|
return null;
|
|
11020
11356
|
}
|
|
@@ -11024,11 +11360,11 @@ function resolveSpecifier(fromPath, specifier, filesByPath, tsconfig) {
|
|
|
11024
11360
|
if (!matched) continue;
|
|
11025
11361
|
for (const target of mapping.targets) {
|
|
11026
11362
|
const applied = target.includes("*") ? target.replace("*", matched.wildcard) : target;
|
|
11027
|
-
for (const c of candidatePaths2(
|
|
11363
|
+
for (const c of candidatePaths2(normalizePath32(applied))) if (filesByPath.has(c)) return c;
|
|
11028
11364
|
}
|
|
11029
11365
|
}
|
|
11030
11366
|
if (tsconfig.baseUrl) {
|
|
11031
|
-
for (const c of candidatePaths2(
|
|
11367
|
+
for (const c of candidatePaths2(normalizePath32(posix.join(tsconfig.baseUrl, specifier)))) {
|
|
11032
11368
|
if (filesByPath.has(c)) return c;
|
|
11033
11369
|
}
|
|
11034
11370
|
}
|
|
@@ -11286,7 +11622,7 @@ function resolveComponentFile2(eng, specifier, fromPath) {
|
|
|
11286
11622
|
if (specifier.startsWith(".")) {
|
|
11287
11623
|
const resolved = resolveSpecifier(fromPath, specifier, eng.filesByPath, eng.tsconfig);
|
|
11288
11624
|
if (resolved) return resolved;
|
|
11289
|
-
const base =
|
|
11625
|
+
const base = normalizePath32(posix.join(posix.dirname(fromPath), specifier));
|
|
11290
11626
|
return TS_EXT_CANDIDATES2.includes(posix.extname(base)) ? base : `${base}.ts`;
|
|
11291
11627
|
}
|
|
11292
11628
|
return resolveSpecifier(fromPath, specifier, eng.filesByPath, eng.tsconfig) ?? specifier;
|
|
@@ -11502,7 +11838,7 @@ function resolveComponentRoutes(files, options = {}) {
|
|
|
11502
11838
|
const filesByPath = /* @__PURE__ */ new Map();
|
|
11503
11839
|
for (const f of files) {
|
|
11504
11840
|
if (TS_LANGS2.has(f.language) && !isVueSfcPath(f.path))
|
|
11505
|
-
filesByPath.set(
|
|
11841
|
+
filesByPath.set(normalizePath32(f.path), f);
|
|
11506
11842
|
}
|
|
11507
11843
|
let tsconfig = options.tsconfig;
|
|
11508
11844
|
if (!tsconfig && options.projectRoot) {
|
|
@@ -11516,7 +11852,7 @@ function resolveComponentRoutes(files, options = {}) {
|
|
|
11516
11852
|
const sfCache = /* @__PURE__ */ new Map();
|
|
11517
11853
|
const ctxCache = /* @__PURE__ */ new Map();
|
|
11518
11854
|
const getSf = (path2) => {
|
|
11519
|
-
const norm2 =
|
|
11855
|
+
const norm2 = normalizePath32(path2);
|
|
11520
11856
|
if (sfCache.has(norm2)) return sfCache.get(norm2) ?? null;
|
|
11521
11857
|
const file = filesByPath.get(norm2);
|
|
11522
11858
|
let sf = null;
|
|
@@ -11531,7 +11867,7 @@ function resolveComponentRoutes(files, options = {}) {
|
|
|
11531
11867
|
return sf;
|
|
11532
11868
|
};
|
|
11533
11869
|
const getContext = (path2) => {
|
|
11534
|
-
const norm2 =
|
|
11870
|
+
const norm2 = normalizePath32(path2);
|
|
11535
11871
|
if (ctxCache.has(norm2)) return ctxCache.get(norm2) ?? null;
|
|
11536
11872
|
const sf = getSf(norm2);
|
|
11537
11873
|
const ctx = sf ? buildFileContext2(sf, norm2) : null;
|
|
@@ -11671,7 +12007,7 @@ function parseParams2(url) {
|
|
|
11671
12007
|
function normalizeUrl(url) {
|
|
11672
12008
|
return url.replace(/^\/+/, "");
|
|
11673
12009
|
}
|
|
11674
|
-
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, SINK_SHAPE_VARIANTS, 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, RESPONSE_STATUS_TEST, isResponseStatusTranslation, firstDenyMatch, denyHitOf, methodKey, endpointGuardKey, sourceRootOf, sameModuleFirst, calleesOf, scanAuthorizationGuards, guardForEndpoint, MAX_EVIDENCE3, REVIEW_SIGNAL_MAP, asJsonRecord, readReviewFinding, parseReviewReport, reviewReportRuleIds, evidenceOf, sortEvidence, EXTERNAL_BYPASS_MARKER, isDecisiveFinding, 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, FRONTEND_EXT_RE, VENDOR_DIR_RE, ANGULAR_LIBRARY_SRC_RE, GENERATED_NAME_RE, JQUERY_PLUGIN_RE, KNOWN_LIBRARY_RE, BANNER_RE, MINIFIED_AVG_LINE, isThirdPartyAsset, 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, 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, VALUE_METHOD_RE, callsPropertyAccessor, TOKEN_COUNT_PREFIXES, FLAG_PREFIXES, MASK_PREFIXES, 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, localNpmTarballs, 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, normalizedPath, lineOf16, maskComments, sourceAt, addEvidence, readBundleIdentity, readPortalRelease, readSourceProduct, readToolchain, databaseVendorOf, readDatabase, isPortalConfigFile, normalizeApplicationBase, readApplicationBase, readSearch, detectLiferayRuntimeProfile, 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, lineOf17, UNSAFE_PATTERNS, collectHits2, SAFE_VALIDATOR_RE, firstSafeValidator, evidence12, item10, scanUnsafeDeserialization, WEAK_RANDOM_SPEC, MAX_EVIDENCE19, lineOf18, 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, lineOf19, WINDOW_LISTENER_PATTERNS, ORIGIN_RE, isFrontend, listenersIn, evidence14, item12, scanPostMessageOrigin, MAX_EVIDENCE21, MAX_PER_KIND, lineOf20, 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, lineOf21, isIndexHtml, isNginxConf, META_HTTP_EQUIV_RE, ADD_HEADER_RE, extractHeaders, hasFrameProtection, evidence15, item13, scanIndexHeaders, asRecord2, asCount, parseClientArtifacts, CLIENT_COOKIE_SPEC, MAX_EVIDENCE23, lineOf22, 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, lineOf23, XML_PARSER_PATTERNS, HARDENING_RE, parsersIn, evidence16, item14, scanXxe, WEAK_TLS_SPEC, MAX_EVIDENCE25, lineOf24, BYPASS_PATTERNS, TLS_SURFACE_RE, bypassesIn, evidence17, item15, scanWeakTls, DOCKERFILE_SPEC, DOCKERFILE_RE, DOCKERFILE_GLOBS, isLoopback, UNREFERENCABLE_BASE_IMAGE, baseImageReference, FLOATING_TAG_RE, unpinnedBaseImageReason, auditDockerfileDependencyConfusion, auditDockerfileContent, scanDockerfile, HOST_HEADER_SPEC, MAX_EVIDENCE26, lineOf26, 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, lineOf27, isOtpLifetimeName, configRank, inconclusive, scanOtpPolicy, PASSWORD_POLICY_SPEC, MAX_EVIDENCE27, lineOf28, 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, lineOf29, scanAuthFile, dedupeSort2, evidenceOf6, item20, scanAccountEnumeration, SPEC2, MAX_EVIDENCE29, LOGOUT_ENDPOINT_RE, LOGOUT_MENTION_RE, INVALIDATION_PATTERNS, lineOf30, invalidationHits, dedupeSort3, evidenceOf7, item21, scanLogoutInvalidation, SPEC3, MAX_EVIDENCE30, OTP_ISSUE_RE, OTP_MENTION_RE, THROTTLE_PATTERNS, lineOf31, firstMatch2, dedupeSort4, evidenceOf8, item22, scanOtpThrottle, MAX_EVIDENCE31, REST_TEMPLATE_CALL_RE, NEW_URL_RE, URL_TAIL_RE, URI_TAIL_RE, OPEN_CONNECTION_RE, SIGNALS, lineOf32, 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, lineOf33, 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, lineOf34, 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, normMethod2, 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, lineOf35, 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, lineOf36, 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, lineOf37, byFileLine2, collectSecrets, scanJwtSecret, PLATFORM_EOL_SPEC, MAX_EVIDENCE38, SPRING_BOOT_OSS_EOL, LIFERAY_KERNEL_MAJOR, stripComments2, lineOf38, springBootHits, liferayHits, BUILD_FILE_RE, scanPlatformEol, SPEC5, MAX_EVIDENCE39, AUTH_TOKEN_REF_RE, TOKEN_COMPARE_RE, CHECK_CSRF_RE, DISABLED_PROP_RE, lineOf39, 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, lineOf40, readBalanced3, getFirstArg, getSecondArg, normalizeTemplateUrl, parseUrlArg, scanFile, extractClientApiCalls, normalizeSegment, normalizePath5, determineConfidence, methodsMatch, matchClientToBackendEndpoints, UPLOAD_CLIENT_SPEC, MAX_EVIDENCE40, lineOf41, 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, lineOf42, isFrontend4, CALL_LABEL, LOGOUT_ENTRY_PATTERNS, CLEAR_STATE_RE, fileClearsState, LOGOUT_CALL_RE, receiverType, clearingLogoutClasses, callsDelegateClear, logoutEntriesIn, evidence21, item26, dedupAndCap2, scanLogoutClear, NUMERIC_BOUND_SPEC, MAX_EVIDENCE42, lineOf43, isFrontend5, isTsLike2, MONEY_NAME_RE, isMoneyName, MIN_BOUND_RE, PATTERN_RE, CONTROL_DECL_RE, moneyControlsIn, moneyInputsIn, evidence22, item27, scanNumericBound;
|
|
12010
|
+
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, loadEmitOptions, emittedImportBindings, 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, SINK_SHAPE_VARIANTS, 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, RESPONSE_STATUS_TEST, isResponseStatusTranslation, firstDenyMatch, denyHitOf, methodKey, endpointGuardKey, sourceRootOf, sameModuleFirst, calleesOf, scanAuthorizationGuards, guardForEndpoint, MAX_EVIDENCE3, REVIEW_SIGNAL_MAP, asJsonRecord, readReviewFinding, parseReviewReport, reviewReportRuleIds, evidenceOf, sortEvidence, EXTERNAL_BYPASS_MARKER, isDecisiveFinding, 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, FRONTEND_EXT_RE, VENDOR_DIR_RE, ANGULAR_LIBRARY_SRC_RE, GENERATED_NAME_RE, JQUERY_PLUGIN_RE, KNOWN_LIBRARY_RE, BANNER_RE, MINIFIED_AVG_LINE, isThirdPartyAsset, 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, 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, VALUE_METHOD_RE, callsPropertyAccessor, TOKEN_COUNT_PREFIXES, FLAG_PREFIXES, MASK_PREFIXES, 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, localNpmTarballs, 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, normalizedPath, lineOf16, maskComments, sourceAt, addEvidence, readBundleIdentity, readPortalRelease, readSourceProduct, readToolchain, databaseVendorOf, readDatabase, isPortalConfigFile, normalizeApplicationBase, readApplicationBase, readSearch, detectLiferayRuntimeProfile, 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, lineOf17, UNSAFE_PATTERNS, collectHits2, SAFE_VALIDATOR_RE, firstSafeValidator, evidence12, item10, scanUnsafeDeserialization, WEAK_RANDOM_SPEC, MAX_EVIDENCE19, lineOf18, 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, lineOf19, WINDOW_LISTENER_PATTERNS, ORIGIN_RE, isFrontend, listenersIn, evidence14, item12, scanPostMessageOrigin, MAX_EVIDENCE21, MAX_PER_KIND, lineOf20, 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, lineOf21, isIndexHtml, isNginxConf, META_HTTP_EQUIV_RE, ADD_HEADER_RE, extractHeaders, hasFrameProtection, evidence15, item13, scanIndexHeaders, asRecord2, asCount, parseClientArtifacts, CLIENT_COOKIE_SPEC, MAX_EVIDENCE23, lineOf22, 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, lineOf23, XML_PARSER_PATTERNS, HARDENING_RE, parsersIn, evidence16, item14, scanXxe, WEAK_TLS_SPEC, MAX_EVIDENCE25, lineOf24, BYPASS_PATTERNS, TLS_SURFACE_RE, bypassesIn, evidence17, item15, scanWeakTls, DOCKERFILE_SPEC, DOCKERFILE_RE, DOCKERFILE_GLOBS, isLoopback, UNREFERENCABLE_BASE_IMAGE, baseImageReference, FLOATING_TAG_RE, unpinnedBaseImageReason, auditDockerfileDependencyConfusion, auditDockerfileContent, scanDockerfile, HOST_HEADER_SPEC, MAX_EVIDENCE26, lineOf26, 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, lineOf27, isOtpLifetimeName, configRank, inconclusive, scanOtpPolicy, PASSWORD_POLICY_SPEC, MAX_EVIDENCE27, lineOf28, 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, lineOf29, scanAuthFile, dedupeSort2, evidenceOf6, item20, scanAccountEnumeration, SPEC2, MAX_EVIDENCE29, LOGOUT_ENDPOINT_RE, LOGOUT_MENTION_RE, INVALIDATION_PATTERNS, lineOf30, invalidationHits, dedupeSort3, evidenceOf7, item21, scanLogoutInvalidation, SPEC3, MAX_EVIDENCE30, OTP_ISSUE_RE, OTP_MENTION_RE, THROTTLE_PATTERNS, lineOf31, firstMatch2, dedupeSort4, evidenceOf8, item22, scanOtpThrottle, MAX_EVIDENCE31, REST_TEMPLATE_CALL_RE, NEW_URL_RE, URL_TAIL_RE, URI_TAIL_RE, OPEN_CONNECTION_RE, SIGNALS, lineOf32, 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, lineOf33, 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, lineOf34, 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, normMethod2, 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, lineOf35, 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, lineOf36, 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, lineOf37, byFileLine2, collectSecrets, scanJwtSecret, PLATFORM_EOL_SPEC, MAX_EVIDENCE38, SPRING_BOOT_OSS_EOL, LIFERAY_KERNEL_MAJOR, stripComments2, lineOf38, springBootHits, liferayHits, BUILD_FILE_RE, scanPlatformEol, SPEC5, MAX_EVIDENCE39, AUTH_TOKEN_REF_RE, TOKEN_COMPARE_RE, CHECK_CSRF_RE, DISABLED_PROP_RE, lineOf39, 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, lineOf40, readBalanced3, getFirstArg, getSecondArg, normalizeTemplateUrl, parseUrlArg, scanFile, extractClientApiCalls, normalizeSegment, normalizePath5, determineConfidence, methodsMatch, matchClientToBackendEndpoints, UPLOAD_CLIENT_SPEC, MAX_EVIDENCE40, lineOf41, 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, lineOf42, isFrontend4, CALL_LABEL, LOGOUT_ENTRY_PATTERNS, CLEAR_STATE_RE, fileClearsState, LOGOUT_CALL_RE, receiverType, clearingLogoutClasses, callsDelegateClear, logoutEntriesIn, evidence21, item26, dedupAndCap2, scanLogoutClear, NUMERIC_BOUND_SPEC, MAX_EVIDENCE42, lineOf43, isFrontend5, isTsLike2, MONEY_NAME_RE, isMoneyName, MIN_BOUND_RE, PATTERN_RE, CONTROL_DECL_RE, moneyControlsIn, moneyInputsIn, evidence22, item27, scanNumericBound;
|
|
11675
12011
|
var init_dist3 = __esm({
|
|
11676
12012
|
"../parsers/dist/index.js"() {
|
|
11677
12013
|
init_dist();
|
|
@@ -12110,14 +12446,14 @@ ${errors.join("\n")}`);
|
|
|
12110
12446
|
const activeIncludes = matchAllGroups(INCLUDE_RE, stripped);
|
|
12111
12447
|
if (activeIncludes.length === 0) return null;
|
|
12112
12448
|
const totalIncludes = matchAllGroups(INCLUDE_RE, master.content).length;
|
|
12113
|
-
const
|
|
12449
|
+
const resolve410 = (include) => {
|
|
12114
12450
|
const needle = include.split("\\").join("/");
|
|
12115
12451
|
return migrationFiles.find((f) => f.path.split("\\").join("/").endsWith(needle));
|
|
12116
12452
|
};
|
|
12117
12453
|
const created = /* @__PURE__ */ new Set();
|
|
12118
12454
|
const targets = [];
|
|
12119
12455
|
for (const inc of activeIncludes) {
|
|
12120
|
-
const f =
|
|
12456
|
+
const f = resolve410(inc);
|
|
12121
12457
|
if (!f) continue;
|
|
12122
12458
|
const body = f.content.replace(XML_COMMENT_RE, "");
|
|
12123
12459
|
for (const t of matchAllGroups(CREATE_TABLE_RE, body)) created.add(t);
|
|
@@ -13104,7 +13440,7 @@ ${errors.join("\n")}`);
|
|
|
13104
13440
|
dummyFor = (varName, propertyPath = "") => {
|
|
13105
13441
|
const v = varName.toUpperCase();
|
|
13106
13442
|
const has = (...ss) => ss.some((s) => v.includes(s));
|
|
13107
|
-
const hasTok = (...
|
|
13443
|
+
const hasTok = (...ts3) => hasToken(v, ...ts3);
|
|
13108
13444
|
if (has("PASSWORD", "PASSWD", "SECRET", "TOKEN", "CREDENTIAL")) return A_SENTINEL;
|
|
13109
13445
|
if (has("ENABLE", "DISABLE", "FLAG", "IS_", "USE_")) return "false";
|
|
13110
13446
|
if (has(
|
|
@@ -13213,7 +13549,7 @@ ${errors.join("\n")}`);
|
|
|
13213
13549
|
identifyByName = (varName) => {
|
|
13214
13550
|
const v = varName.toUpperCase();
|
|
13215
13551
|
const has = (...ss) => ss.some((s) => v.includes(s));
|
|
13216
|
-
const hasTok = (...
|
|
13552
|
+
const hasTok = (...ts3) => hasToken(v, ...ts3);
|
|
13217
13553
|
const endpoint = isEndpointShaped(v);
|
|
13218
13554
|
if (has("REDIS")) {
|
|
13219
13555
|
if (has("HOST")) return { kind: "redis", role: "host" };
|
|
@@ -14278,6 +14614,54 @@ ${errors.join("\n")}`);
|
|
|
14278
14614
|
return { baseUrl: "", paths: [] };
|
|
14279
14615
|
}
|
|
14280
14616
|
};
|
|
14617
|
+
loadEmitOptions = (options) => {
|
|
14618
|
+
const root = options?.projectRoot;
|
|
14619
|
+
const configPath = root ? ts.findConfigFile(root, ts.sys.fileExists) : void 0;
|
|
14620
|
+
if (!configPath) return {};
|
|
14621
|
+
const config = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
14622
|
+
if (config.error) return void 0;
|
|
14623
|
+
const parsed = ts.parseJsonConfigFileContent(
|
|
14624
|
+
config.config,
|
|
14625
|
+
ts.sys,
|
|
14626
|
+
resolve(configPath, "..")
|
|
14627
|
+
);
|
|
14628
|
+
if (parsed.errors.some((error) => error.code !== 18003 && error.code !== 18002)) return void 0;
|
|
14629
|
+
return parsed.options;
|
|
14630
|
+
};
|
|
14631
|
+
emittedImportBindings = (source, options) => {
|
|
14632
|
+
if (!options || !/\.(?:[cm]?ts|tsx)$/.test(source.getFilePath())) return void 0;
|
|
14633
|
+
const output2 = ts.transpileModule(source.getFullText(), {
|
|
14634
|
+
fileName: source.getFilePath(),
|
|
14635
|
+
compilerOptions: {
|
|
14636
|
+
...options,
|
|
14637
|
+
noEmit: false,
|
|
14638
|
+
declaration: false,
|
|
14639
|
+
module: ts.ModuleKind.ESNext
|
|
14640
|
+
},
|
|
14641
|
+
reportDiagnostics: true
|
|
14642
|
+
});
|
|
14643
|
+
if (output2.diagnostics?.some((diagnostic) => diagnostic.category === ts.DiagnosticCategory.Error))
|
|
14644
|
+
return void 0;
|
|
14645
|
+
const emitted = ts.createSourceFile(
|
|
14646
|
+
"emitted.js",
|
|
14647
|
+
output2.outputText,
|
|
14648
|
+
ts.ScriptTarget.Latest,
|
|
14649
|
+
true
|
|
14650
|
+
);
|
|
14651
|
+
const bindings = /* @__PURE__ */ new Map();
|
|
14652
|
+
for (const statement of emitted.statements) {
|
|
14653
|
+
if (!ts.isImportDeclaration(statement) || !ts.isStringLiteral(statement.moduleSpecifier))
|
|
14654
|
+
continue;
|
|
14655
|
+
const names = bindings.get(statement.moduleSpecifier.text) ?? /* @__PURE__ */ new Set();
|
|
14656
|
+
if (statement.importClause?.name) names.add(statement.importClause.name.text);
|
|
14657
|
+
const named = statement.importClause?.namedBindings;
|
|
14658
|
+
if (named && ts.isNamespaceImport(named)) names.add(named.name.text);
|
|
14659
|
+
if (named && ts.isNamedImports(named))
|
|
14660
|
+
for (const element of named.elements) names.add(element.name.text);
|
|
14661
|
+
bindings.set(statement.moduleSpecifier.text, names);
|
|
14662
|
+
}
|
|
14663
|
+
return bindings;
|
|
14664
|
+
};
|
|
14281
14665
|
matchPathPattern = (specifier, pattern) => {
|
|
14282
14666
|
const star = pattern.indexOf("*");
|
|
14283
14667
|
if (star === -1) return specifier === pattern ? { wildcard: "" } : null;
|
|
@@ -14413,7 +14797,6 @@ ${errors.join("\n")}`);
|
|
|
14413
14797
|
}
|
|
14414
14798
|
}
|
|
14415
14799
|
for (const decl of source.getExportDeclarations()) {
|
|
14416
|
-
if (decl.getModuleSpecifierValue()) continue;
|
|
14417
14800
|
for (const named of decl.getNamedExports()) {
|
|
14418
14801
|
const exportedName = named.getAliasNode()?.getText() ?? named.getName();
|
|
14419
14802
|
if (exportedName === "default") addDefaultExport();
|
|
@@ -14440,6 +14823,7 @@ ${edgePart}`);
|
|
|
14440
14823
|
const graphFiles = files.filter((f) => TS_LANGUAGES.has(f.language) && !isVueSfcPath(f.path));
|
|
14441
14824
|
const filesByPath = new Map(graphFiles.map((f) => [f.path, f]));
|
|
14442
14825
|
const tsconfig = await loadTsConfigResolver(options);
|
|
14826
|
+
const emitOptions = loadEmitOptions(options);
|
|
14443
14827
|
const project = new Project({
|
|
14444
14828
|
useInMemoryFileSystem: true,
|
|
14445
14829
|
skipAddingFilesFromTsConfig: true,
|
|
@@ -14479,6 +14863,7 @@ ${edgePart}`);
|
|
|
14479
14863
|
edges.push(edge);
|
|
14480
14864
|
};
|
|
14481
14865
|
for (const [fromPath, source] of sourceByPath) {
|
|
14866
|
+
const retainedImports = emittedImportBindings(source, emitOptions);
|
|
14482
14867
|
for (const decl of source.getImportDeclarations()) {
|
|
14483
14868
|
const toPath = resolveModule(
|
|
14484
14869
|
fromPath,
|
|
@@ -14492,15 +14877,19 @@ ${edgePart}`);
|
|
|
14492
14877
|
let bindingCount = 0;
|
|
14493
14878
|
const addBinding = (localName, importedName, typeOnly) => {
|
|
14494
14879
|
bindingCount += 1;
|
|
14495
|
-
|
|
14880
|
+
const target = sourceByPath.get(toPath);
|
|
14881
|
+
const knownExport = importedName !== "*" && target?.getExportedDeclarations().has(importedName);
|
|
14882
|
+
const erasedByCompiler = !!(knownExport && retainedImports && !retainedImports.get(decl.getModuleSpecifierValue())?.has(localName));
|
|
14883
|
+
const effectiveTypeOnly = typeOnly || erasedByCompiler;
|
|
14884
|
+
bindings.push({ localName, targetPath: toPath, typeOnly: effectiveTypeOnly });
|
|
14496
14885
|
const alias = aliasIfDifferent(importedName, localName);
|
|
14497
14886
|
addEdge({
|
|
14498
14887
|
fromPath,
|
|
14499
14888
|
toPath,
|
|
14500
|
-
kind:
|
|
14889
|
+
kind: effectiveTypeOnly ? "uses-type" : "import",
|
|
14501
14890
|
symbol: importedName,
|
|
14502
14891
|
...alias ? { alias } : {},
|
|
14503
|
-
weight:
|
|
14892
|
+
weight: effectiveTypeOnly ? 70 : 100
|
|
14504
14893
|
});
|
|
14505
14894
|
};
|
|
14506
14895
|
const defaultImport = decl.getDefaultImport()?.getText();
|
|
@@ -16689,9 +17078,9 @@ ${edgePart}`);
|
|
|
16689
17078
|
}
|
|
16690
17079
|
switch (injection.kind) {
|
|
16691
17080
|
case "query": {
|
|
16692
|
-
const
|
|
17081
|
+
const sep42 = endpoint.path.includes("?") ? "&" : "?";
|
|
16693
17082
|
const encoded = encodeURIComponent(payload).replace(/'/g, "%27");
|
|
16694
|
-
return `curl -X ${method} '${host}${endpoint.path}${
|
|
17083
|
+
return `curl -X ${method} '${host}${endpoint.path}${sep42}${injection.name}=${encoded}'`;
|
|
16695
17084
|
}
|
|
16696
17085
|
case "path": {
|
|
16697
17086
|
const encoded = encodeURIComponent(payload);
|
|
@@ -22800,7 +23189,7 @@ ${window}`;
|
|
|
22800
23189
|
applyRuntimeAuthSeed = (plan, options) => {
|
|
22801
23190
|
const commands = plan.commands;
|
|
22802
23191
|
if (commands.length === 0) return Promise.resolve({ ok: true, applied: 0, failures: [] });
|
|
22803
|
-
return new Promise((
|
|
23192
|
+
return new Promise((resolve410) => {
|
|
22804
23193
|
const failures = [];
|
|
22805
23194
|
let applied = 0;
|
|
22806
23195
|
let buf = Buffer.alloc(0);
|
|
@@ -22818,7 +23207,7 @@ ${window}`;
|
|
|
22818
23207
|
error: transportError
|
|
22819
23208
|
});
|
|
22820
23209
|
}
|
|
22821
|
-
|
|
23210
|
+
resolve410({ ok: failures.length === 0, applied, failures });
|
|
22822
23211
|
};
|
|
22823
23212
|
socket.setTimeout(options.timeoutMs ?? DEFAULT_TIMEOUT_MS, () => finish("timed out"));
|
|
22824
23213
|
socket.on("error", (e) => finish(e.message));
|
|
@@ -23718,9 +24107,9 @@ ${window}`;
|
|
|
23718
24107
|
isAggregatorPom = (xml) => /<packaging>\s*pom\s*<\/packaging>/i.test(xml);
|
|
23719
24108
|
declaresParentPath = (xml) => xml.match(/<relativePath>\s*([^<]+?)\s*<\/relativePath>/i)?.[1] ?? null;
|
|
23720
24109
|
declaresSystemPaths = (xml) => [...xml.matchAll(/<systemPath>\s*([^<]+?)\s*<\/systemPath>/gi)].map((match) => match[1] ?? "");
|
|
23721
|
-
resolveAgainst = (pomPath,
|
|
24110
|
+
resolveAgainst = (pomPath, relative42) => {
|
|
23722
24111
|
const segments = pomPath.split("/").slice(0, -1);
|
|
23723
|
-
for (const part of
|
|
24112
|
+
for (const part of relative42.replace(/\\/g, "/").split("/")) {
|
|
23724
24113
|
if (part === "" || part === ".") continue;
|
|
23725
24114
|
if (part === "..") segments.pop();
|
|
23726
24115
|
else segments.push(part);
|
|
@@ -24540,7 +24929,7 @@ ${window}`;
|
|
|
24540
24929
|
DEFAULT_PACKAGE_POLICY = {
|
|
24541
24930
|
exclude: DEFAULT_PACKAGE_EXCLUDES,
|
|
24542
24931
|
maxFileBytes: MAX_FILE_BYTES,
|
|
24543
|
-
maxArchiveBytes:
|
|
24932
|
+
maxArchiveBytes: 1024 * 1024 * 1024
|
|
24544
24933
|
};
|
|
24545
24934
|
toPosix22 = (p) => p.split(sep).join(posix.sep);
|
|
24546
24935
|
isFile2 = (p) => {
|
|
@@ -32026,8 +32415,8 @@ ${runtimeAuthHelper}` : ""}
|
|
|
32026
32415
|
const suiteRe = /<testsuite\b([^>]*?)\/?>/g;
|
|
32027
32416
|
let s = suiteRe.exec(xml);
|
|
32028
32417
|
while (s !== null) {
|
|
32029
|
-
const
|
|
32030
|
-
if (
|
|
32418
|
+
const ts3 = attr(s[1] ?? "", "timestamp");
|
|
32419
|
+
if (ts3 !== void 0 && ts3.length > 0) suiteStamps.push({ at: s.index, timestamp: ts3 });
|
|
32031
32420
|
s = suiteRe.exec(xml);
|
|
32032
32421
|
}
|
|
32033
32422
|
const stampFor = (caseAt) => {
|
|
@@ -35136,14 +35525,14 @@ ${bodyText}` : headerText;
|
|
|
35136
35525
|
if (raw !== "" && !raw.startsWith("#") && isJwt) {
|
|
35137
35526
|
if (ENV_PLACEHOLDER2.test(raw)) {
|
|
35138
35527
|
const inner = raw.slice(2, -1);
|
|
35139
|
-
const
|
|
35528
|
+
const sep42 = inner.indexOf(":");
|
|
35140
35529
|
externalized.push({
|
|
35141
35530
|
file: file.path,
|
|
35142
35531
|
line: lineOf37(file.content, m.index),
|
|
35143
35532
|
// Name only. A `${VAR:s3cr3t}` default is a secret, and this report is
|
|
35144
35533
|
// shared far more widely than the config file it reads.
|
|
35145
|
-
variable: (
|
|
35146
|
-
hasInlineDefault:
|
|
35534
|
+
variable: (sep42 >= 0 ? inner.slice(0, sep42) : inner).trim(),
|
|
35535
|
+
hasInlineDefault: sep42 >= 0
|
|
35147
35536
|
});
|
|
35148
35537
|
} else {
|
|
35149
35538
|
literals.push({
|
|
@@ -37318,17 +37707,17 @@ ${script}
|
|
|
37318
37707
|
}
|
|
37319
37708
|
continue;
|
|
37320
37709
|
}
|
|
37321
|
-
const
|
|
37322
|
-
if (
|
|
37323
|
-
anyMoneyField = anyMoneyField ||
|
|
37710
|
+
const ts3 = moneyControlsIn(f);
|
|
37711
|
+
if (ts3.bounded) {
|
|
37712
|
+
anyMoneyField = anyMoneyField || ts3.anyMoneyField;
|
|
37324
37713
|
const m = MIN_BOUND_RE.exec(f.content);
|
|
37325
37714
|
if (m !== null) configured.push({ file: f.path, line: lineOf43(f.content, m.index) });
|
|
37326
37715
|
MIN_BOUND_RE.lastIndex = 0;
|
|
37327
37716
|
continue;
|
|
37328
37717
|
}
|
|
37329
|
-
if (
|
|
37718
|
+
if (ts3.anyMoneyField) {
|
|
37330
37719
|
anyMoneyField = true;
|
|
37331
|
-
absentHits.push(...
|
|
37720
|
+
absentHits.push(...ts3.hits);
|
|
37332
37721
|
}
|
|
37333
37722
|
}
|
|
37334
37723
|
if (absentHits.length > 0) {
|
|
@@ -37608,7 +37997,7 @@ Language guard retry: the previous response contained an empty or English explan
|
|
|
37608
37997
|
return { status: "error", vulnerable: false, reason: `L\u1ED7i th\u1EF1c thi LLM: ${message}` };
|
|
37609
37998
|
}
|
|
37610
37999
|
}
|
|
37611
|
-
var OLLAMA_DEFAULT_BASE, NETMIND_DEFAULT_BASE, OPENCODE_GO_DEFAULT_BASE, stripTrailingSlash2, buildLanguageModel, resolveModelOverride, pingTarget, shouldUseRawJsonChat, openAICompatibleChatUrl, REASONING_HEADROOM_TOKENS, NETMIND_MINIMAX_M3_MODEL, NETMIND_SMALL_PROMPT_MAX_CHARS, NETMIND_MEDIUM_PROMPT_MAX_CHARS, NETMIND_SMALL_OUTPUT_TOKENS, NETMIND_MEDIUM_OUTPUT_TOKENS, NETMIND_LARGE_OUTPUT_TOKENS, NETMIND_MAX_OUTPUT_TOKENS, supportsNetmindJsonResponseFormat, emptyResponseDiagnostics, effectiveMaxTokensFor, completeRawOpenAICompatibleJsonChat, createAiSdkProvider, createFallbackClient, DEFAULT_RESET_SAFETY_MS, parseProviderRetryDelayMs, numberLines, renderPrompt, cache, loadPromptTemplate, nullableOptional, AI_VIOLATION_MESSAGE_MAX_LENGTH, aiViolationSchema, aiResponseSchema, stripCodeFence, parseAiResponse, createInMemoryCache, VIETNAMESE_OUTPUT_POLICY_VERSION, VIETNAMESE_OUTPUT_INSTRUCTION, TOKEN_BUDGET_WARN_DEFAULT, CHARS_PER_TOKEN, SAFETY_MARGIN, estimateTokens, formatTokenWarning, braceDelta, chunkSourceForAi, renderAuthorizationGuards, CACHE_NAMESPACE, DEFAULT_PROVIDER_RETRY_MAX_RETRIES, DEFAULT_PROVIDER_RETRY_MAX_DELAY_MS, DEFAULT_ADAPTIVE_RETRY_MAX_RETRIES, DEFAULT_ADAPTIVE_CONTEXT_REDUCTION_FACTOR, DEFAULT_ADAPTIVE_TIMEOUT_MULTIPLIER, DEFAULT_ADAPTIVE_MAX_DELAY_MS, DEFAULT_PROVIDER_TIMEOUT_MS, sleep2, providerRetryDelayMs, adaptiveFailureKind, compactClusterContext, findingDedupeKey, dedupeFindings, capFindings, createAiExecutor, PATH_FAST_PATHS, SPRING_BOOT_PATTERNS, ANGULAR_PATTERNS, FLUTTER_PATTERNS, ENTRY_HINTS, ALL_PATTERNS, matchesRule, classifyLayer, classifyLayers, PRIMARY_LAYER_CANDIDATES, TEST_AND_GENERATED, LAYER_SUFFIXES, FILE_SUFFIX_RE, ANY_EXT_RE, dropExt, stripPascalSuffix, normalize2, extractDomainTokens, extractDomainTokensBatch, TRIVIAL_TOKENS, sharesDomainToken, TS_IMPORT_RE, JAVA_IMPORT_RE, extractImports, POSIX_SEP_RE, sharedDirDepth, resolveImportTarget, KIND_STRENGTH, upsertEdge, buildEdges, ADVICE_ANNOTATION, isGlobalAdviceFile, findGlobalAdvicePaths, DEFAULT_MAX_CANDIDATES, DEFAULT_MAX_SUPPORT_FILES, DEFAULT_TOKEN_BUDGET, SCORE_DIRECT_NEIGHBOR, SCORE_SECOND_DEGREE, SCORE_SIBLING_STEM, SCORE_ANGULAR_TEMPLATE_SIBLING, SCORE_DOMAIN_TOKEN, PENALTY_TEST_VS_NON_TEST, PENALTY_GENERATED, SCORE_GLOBAL_ADVICE, prefilterCandidates, layerFlowBonus, isTest, isGenerated, scoreFor, tokensOf, trimToBudget, toMember, clusterIdFor, createClusterAssembler, CLUSTER_TREE_BUILDER_VERSION, DEFAULT_MODULE_DEPTH, posixDirname, moduleGroupKey, uniqueSortedPaths, memberFingerprint, featureNodeFor, moduleNodeFor, appNodeFor, countCrossModuleEdges, createClusterTreeBuilder, TRANSACTIONAL, TYPE_DECL3, METHOD_NAME2, MUTATION_CALL, LEADING_ANNOTATION2, SPRING_TX_SUPPORT_IMPORT, PROGRAMMATIC_TYPE, PROGRAMMATIC_CALL, INLINE_TEMPLATE_CALL, CONTROL_FLOW_NAMES, maskNonCode, methodNameFromHeader, methodAt, delegatedTargetAt, collectProgrammaticReceivers, readAttr, skipToDeclaration2, countMutations, lineOf25, configuredReadOnly, extractProgrammaticFromFile, extractFromFile2, extractTransactionBoundaries, renderPrDiffPrompt, nullableOptional2, prDiffResponseSchema, createPrDiffReviewer, renderGroupedRulePrompt, confidenceLabelSchema, severitySchema, groupedResponseSchema, labelToConfidence, createGroupedRuleReviewer, renderPerRulePrompt, createPerRuleReviewer, DEFAULT_MAX_TOKENS, SYSTEM_PROMPT, SCHEMA_PROMPT, clip, buildUserPrompt, extractJsonObject, describeUnusableAnswer, createRuntimeAuthHypothesisResolver, DEFAULT_MAX_TOKENS2, SYSTEM_PROMPT2, SCHEMA_PROMPT2, clip2, buildUserPrompt2, describeUnusableAnswer2, createRuntimeDataSeedResolver, endpointSchema, extractJsonObject2, HTTP_METHODS, PARAMETER_KINDS, ENGLISH_REASON_WORDS, ENGLISH_TECHNICAL_WORDS, VIETNAMESE_DIACRITICS, isLikelyEnglishReason, normalizeTriageReason, parseEndpointHint;
|
|
38000
|
+
var OLLAMA_DEFAULT_BASE, NETMIND_DEFAULT_BASE, OPENCODE_GO_DEFAULT_BASE, stripTrailingSlash2, buildLanguageModel, resolveModelOverride, pingTarget, shouldUseRawJsonChat, openAICompatibleChatUrl, REASONING_HEADROOM_TOKENS, NETMIND_MINIMAX_M3_MODEL, NETMIND_SMALL_PROMPT_MAX_CHARS, NETMIND_MEDIUM_PROMPT_MAX_CHARS, NETMIND_SMALL_OUTPUT_TOKENS, NETMIND_MEDIUM_OUTPUT_TOKENS, NETMIND_LARGE_OUTPUT_TOKENS, NETMIND_MAX_OUTPUT_TOKENS, supportsNetmindJsonResponseFormat, emptyResponseDiagnostics, effectiveMaxTokensFor, completeRawOpenAICompatibleJsonChat, createAiSdkProvider, createFallbackClient, DEFAULT_RESET_SAFETY_MS, parseProviderRetryDelayMs, numberLines, renderPrompt, cache, loadPromptTemplate, nullableOptional, AI_VIOLATION_MESSAGE_MAX_LENGTH, aiViolationSchema, aiResponseSchema, stripCodeFence, parseAiResponse, createInMemoryCache, VIETNAMESE_OUTPUT_POLICY_VERSION, VIETNAMESE_OUTPUT_INSTRUCTION, TOKEN_BUDGET_WARN_DEFAULT, CHARS_PER_TOKEN, SAFETY_MARGIN, estimateTokens, formatTokenWarning, braceDelta, chunkSourceForAi, renderAuthorizationGuards, CACHE_NAMESPACE, DEFAULT_PROVIDER_RETRY_MAX_RETRIES, DEFAULT_PROVIDER_RETRY_MAX_DELAY_MS, DEFAULT_ADAPTIVE_RETRY_MAX_RETRIES, DEFAULT_ADAPTIVE_CONTEXT_REDUCTION_FACTOR, DEFAULT_ADAPTIVE_TIMEOUT_MULTIPLIER, DEFAULT_ADAPTIVE_MAX_DELAY_MS, DEFAULT_PROVIDER_TIMEOUT_MS, sleep2, providerRetryDelayMs, adaptiveFailureKind, compactClusterContext, findingDedupeKey, dedupeFindings, capFindings, createAiExecutor, PATH_FAST_PATHS, SPRING_BOOT_PATTERNS, ANGULAR_PATTERNS, FLUTTER_PATTERNS, ENTRY_HINTS, ALL_PATTERNS, matchesRule, classifyLayer, classifyLayers, PRIMARY_LAYER_CANDIDATES, TEST_AND_GENERATED, LAYER_SUFFIXES, FILE_SUFFIX_RE, ANY_EXT_RE, dropExt, stripPascalSuffix, normalize2, extractDomainTokens, extractDomainTokensBatch, TRIVIAL_TOKENS, sharesDomainToken, TS_IMPORT_RE, JAVA_IMPORT_RE, extractImports, POSIX_SEP_RE, sharedDirDepth, resolveImportTarget, KIND_STRENGTH, upsertEdge, buildEdges, ADVICE_ANNOTATION, isGlobalAdviceFile, findGlobalAdvicePaths, DEFAULT_MAX_CANDIDATES, DEFAULT_MAX_SUPPORT_FILES, DEFAULT_TOKEN_BUDGET, SCORE_DIRECT_NEIGHBOR, SCORE_SECOND_DEGREE, SCORE_SIBLING_STEM, SCORE_ANGULAR_TEMPLATE_SIBLING, SCORE_DOMAIN_TOKEN, PENALTY_TEST_VS_NON_TEST, PENALTY_GENERATED, SCORE_GLOBAL_ADVICE, prefilterCandidates, layerFlowBonus, isTest, isGenerated, scoreFor, tokensOf, trimToBudget, toMember, clusterIdFor, createClusterAssembler, CLUSTER_TREE_BUILDER_VERSION, DEFAULT_MODULE_DEPTH, posixDirname, moduleGroupKey, uniqueSortedPaths, memberFingerprint, featureNodeFor, moduleNodeFor, appNodeFor, countCrossModuleEdges, createClusterTreeBuilder, TRANSACTIONAL, TYPE_DECL3, METHOD_NAME2, MUTATION_CALL, LEADING_ANNOTATION2, SPRING_TX_SUPPORT_IMPORT, PROGRAMMATIC_TYPE, PROGRAMMATIC_CALL, INLINE_TEMPLATE_CALL, CONTROL_FLOW_NAMES, maskNonCode, methodNameFromHeader, methodAt, delegatedTargetAt, collectProgrammaticReceivers, readAttr, skipToDeclaration2, countMutations, lineOf25, configuredReadOnly, extractProgrammaticFromFile, extractFromFile2, extractTransactionBoundaries, renderPrDiffPrompt, nullableOptional2, prDiffResponseSchema, createPrDiffReviewer, renderGroupedRulePrompt, confidenceLabelSchema, severitySchema, groupedResponseSchema, labelToConfidence, createGroupedRuleReviewer, renderPerRulePrompt, createPerRuleReviewer, DEFAULT_MAX_TOKENS, SYSTEM_PROMPT, SCHEMA_PROMPT, clip, buildUserPrompt, extractJsonObject, describeUnusableAnswer, createRuntimeAuthHypothesisResolver, DEFAULT_MAX_TOKENS2, SYSTEM_PROMPT2, SCHEMA_PROMPT2, clip2, buildUserPrompt2, describeUnusableAnswer2, createRuntimeDataSeedResolver, endpointSchema, extractJsonObject2, HTTP_METHODS, PARAMETER_KINDS, ENGLISH_REASON_WORDS, ENGLISH_TECHNICAL_WORDS, VIETNAMESE_DIACRITICS, isLikelyEnglishReason, normalizeTriageReason, parseEndpointHint, checkAiConnection;
|
|
37612
38001
|
var init_dist4 = __esm({
|
|
37613
38002
|
"../ai-engine/dist/index.js"() {
|
|
37614
38003
|
init_dist();
|
|
@@ -40764,6 +41153,30 @@ ${buildUserPrompt2(request, options.maxEvidenceChars, logger)}`,
|
|
|
40764
41153
|
sinkLine
|
|
40765
41154
|
};
|
|
40766
41155
|
};
|
|
41156
|
+
checkAiConnection = async (client) => {
|
|
41157
|
+
try {
|
|
41158
|
+
const result = await client.complete({
|
|
41159
|
+
user: "Reply with OK.",
|
|
41160
|
+
model: "",
|
|
41161
|
+
maxTokens: 64,
|
|
41162
|
+
timeoutMs: 15e3
|
|
41163
|
+
});
|
|
41164
|
+
if (result.ok && result.value.text.trim().length > 0) {
|
|
41165
|
+
return { status: "connected", provider: client.name, message: "AI connection succeeded." };
|
|
41166
|
+
}
|
|
41167
|
+
return {
|
|
41168
|
+
status: "failed",
|
|
41169
|
+
provider: client.name,
|
|
41170
|
+
message: "AI connection failed. Check API key, model, quota and server network access."
|
|
41171
|
+
};
|
|
41172
|
+
} catch {
|
|
41173
|
+
return {
|
|
41174
|
+
status: "failed",
|
|
41175
|
+
provider: client.name,
|
|
41176
|
+
message: "AI connection failed. Check API key, model, quota and server network access."
|
|
41177
|
+
};
|
|
41178
|
+
}
|
|
41179
|
+
};
|
|
40767
41180
|
}
|
|
40768
41181
|
});
|
|
40769
41182
|
function renderPerfMarkdown(doc) {
|
|
@@ -42000,7 +42413,7 @@ function renderSlowEndpoints(L, doc) {
|
|
|
42000
42413
|
);
|
|
42001
42414
|
L.push("");
|
|
42002
42415
|
}
|
|
42003
|
-
var escapeInline, escapeInlinePreservingCodeSpans, escapeCodeSpan, escapeTableCell, fenceFor, SEVERITY_DESC, severityLabel, groupBySeverity, groupByField, categoryOf, groupFindings, countBySeverity2, topFiles, topRootCauses, SEVERITY_SYMBOL, formatDuration, renderHeader, ruleRecallRiskSkips, ruleSkipReasons, renderAiStats, renderSummary, renderSnippet, languageHintFromPath, renderFinding, renderGroup, renderFindingsSection, renderFooter, renderReport, createMarkdownReporter, SEVERITY_DESC2, SEVERITY_RANK, SEVERITY_LABEL, pickModal, groupByRule, formatDuration2, renderCompactHeader, renderSeverityTable, renderRulesTable, renderCompactSummary, MAX_INLINE_LOCATIONS, renderRuleSection, renderCompactFindings, renderCompactFooter, renderCompactReport, createMarkdownCompactReporter, JSON_SCHEMA_VERSION, buildRunBlock, buildRangeBlock, buildFindingBlock, projectSkipReasons, buildAiStatsBlock, buildJsonDocument, renderJsonReport, createJsonReporter, SARIF_SCHEMA, SARIF_VERSION, SEVERITY_TO_LEVEL, toFileUri, toArtifactUri, buildRegion, buildResult, buildRules, sarifSkipReasons, buildInvocation, buildSarifReport, renderSarifReport, createSarifReporter, VERDICT_LABEL, noteFor, renderHeader2, renderPolicy, countVerdict, renderOverview, renderChecklistTable, renderEvidence, renderScenario, renderConfirmedDetails, renderControlGaps, renderInconclusiveLeads, renderExtraFindings, renderChecklistCoverage, REASON_HEADING, REASON_NOTE, renderUnassessedGroup, renderUnassessed, renderCoverage, renderFooter2, renderEndpointLinks, renderAssessmentReport, renderAssessmentJson, renderVerificationManifest, renderClientVerificationReadme, E1_PROVENANCE_BADGE, VERDICT_BADGE, renderVerificationRunReport, VERDICT_BADGE2, renderClientVerificationRunReport, RUNTIME_BADGE, meaningFor, countSuffix, renderChecklistCorrelation, DB_INVARIANT_CHECKLIST_IDS, schemaInvariantCaveat, CODE_BADGE, DAST_PROVENANCE_BADGE, RUNTIME_BADGE2, runtimeCell, dastFullyUnscanned, dastRuntimeCell, clientRuntimeCell, sastCell, meaningFor2, renderHeader3, renderRuntimeDeviations, renderOverview2, renderClientArtifacts, renderCorrelationReport, PLAN_FILE, MANIFEST_FILE, REPORT_FILE, DAST_PROBE_SCRIPT_FILE2, DAST_PROBE_FILE, DAST_API_SEED_SCRIPT_FILE2, renderDastReadme, VERDICT_BADGE3, verdictCell, PROVENANCE_BADGE, COVERAGE_BADGE, hoursOf2, coverageCause, COVERAGE_COUNT, renderDastRunReport, locationOf, renderSastRunReport, UNASSESSED_LABEL, renderUnassessedSection, metaLine, fileNameOf, renderHandoffPacket, renderHandoffManifest, renderPerfJson, fenceLanguageFor, DANGEROUS_PREFIXES, K6_REQUEST_TIMEOUT, STEP_STRESS_START_SECONDS, jsString, SERVER_SIGNAL_STEP_SECONDS, shellExpr, defOf, TICK, REACH_TEXT, NOT_MEASURED, rps, pct, VERDICT_LABEL2, BLOCKER_TEXT, stepAt2, SOAK_LABEL, SOAK_INCONCLUSIVE_TEXT, SPIKE_LABEL, SPIKE_INCONCLUSIVE_TEXT, cell, TOP_ENDPOINTS;
|
|
42416
|
+
var escapeInline, escapeInlinePreservingCodeSpans, escapeCodeSpan, escapeTableCell, fenceFor, SEVERITY_DESC, severityLabel, groupBySeverity, groupByField, categoryOf, groupFindings, countBySeverity2, topFiles, topRootCauses, SEVERITY_SYMBOL, formatDuration, renderHeader, ruleRecallRiskSkips, ruleSkipReasons, renderAiStats, renderSummary, renderSnippet, languageHintFromPath, renderFindingCodeContext, renderFinding, renderGroup, renderFindingsSection, renderFooter, renderReport, createMarkdownReporter, SEVERITY_DESC2, SEVERITY_RANK, SEVERITY_LABEL, pickModal, groupByRule, formatDuration2, renderCompactHeader, renderSeverityTable, renderRulesTable, renderCompactSummary, MAX_INLINE_LOCATIONS, renderRuleSection, renderCompactFindings, renderCompactFooter, renderCompactReport, createMarkdownCompactReporter, JSON_SCHEMA_VERSION, buildRunBlock, buildRangeBlock, buildFindingBlock, projectSkipReasons, buildAiStatsBlock, buildJsonDocument, renderJsonReport, createJsonReporter, SARIF_SCHEMA, SARIF_VERSION, SEVERITY_TO_LEVEL, toFileUri, toArtifactUri, buildRegion, buildResult, buildRules, sarifSkipReasons, buildInvocation, buildSarifReport, renderSarifReport, createSarifReporter, VERDICT_LABEL, noteFor, renderHeader2, renderPolicy, countVerdict, renderOverview, renderChecklistTable, renderEvidence, renderScenario, renderConfirmedDetails, renderControlGaps, renderInconclusiveLeads, renderExtraFindings, renderChecklistCoverage, REASON_HEADING, REASON_NOTE, renderUnassessedGroup, renderUnassessed, renderCoverage, renderFooter2, renderEndpointLinks, renderAssessmentReport, renderAssessmentJson, renderVerificationManifest, renderClientVerificationReadme, E1_PROVENANCE_BADGE, VERDICT_BADGE, renderVerificationRunReport, VERDICT_BADGE2, renderClientVerificationRunReport, RUNTIME_BADGE, meaningFor, countSuffix, renderChecklistCorrelation, DB_INVARIANT_CHECKLIST_IDS, schemaInvariantCaveat, CODE_BADGE, DAST_PROVENANCE_BADGE, RUNTIME_BADGE2, runtimeCell, dastFullyUnscanned, dastRuntimeCell, clientRuntimeCell, sastCell, meaningFor2, renderHeader3, renderRuntimeDeviations, renderOverview2, renderClientArtifacts, renderCorrelationReport, PLAN_FILE, MANIFEST_FILE, REPORT_FILE, DAST_PROBE_SCRIPT_FILE2, DAST_PROBE_FILE, DAST_API_SEED_SCRIPT_FILE2, renderDastReadme, VERDICT_BADGE3, verdictCell, PROVENANCE_BADGE, COVERAGE_BADGE, hoursOf2, coverageCause, COVERAGE_COUNT, renderDastRunReport, locationOf, renderSastRunReport, UNASSESSED_LABEL, renderUnassessedSection, metaLine, fileNameOf, renderHandoffPacket, renderHandoffManifest, renderPerfJson, fenceLanguageFor, DANGEROUS_PREFIXES, K6_REQUEST_TIMEOUT, STEP_STRESS_START_SECONDS, jsString, SERVER_SIGNAL_STEP_SECONDS, shellExpr, defOf, TICK, REACH_TEXT, NOT_MEASURED, rps, pct, VERDICT_LABEL2, BLOCKER_TEXT, stepAt2, SOAK_LABEL, SOAK_INCONCLUSIVE_TEXT, SPIKE_LABEL, SPIKE_INCONCLUSIVE_TEXT, cell, TOP_ENDPOINTS;
|
|
42004
42417
|
var init_dist5 = __esm({
|
|
42005
42418
|
"../reporters/dist/index.js"() {
|
|
42006
42419
|
init_dist2();
|
|
@@ -42249,6 +42662,14 @@ ${fence}`;
|
|
|
42249
42662
|
return "";
|
|
42250
42663
|
}
|
|
42251
42664
|
};
|
|
42665
|
+
renderFindingCodeContext = (finding) => {
|
|
42666
|
+
const snippet = formatFindingSnippet(finding);
|
|
42667
|
+
if (!snippet) return "";
|
|
42668
|
+
const label = finding.snippetStartLine === void 0 ? "Source context" : `Source context (from line ${finding.snippetStartLine}; > marks the violation)`;
|
|
42669
|
+
return `**${label}**
|
|
42670
|
+
|
|
42671
|
+
${renderSnippet(snippet, languageHintFromPath(finding.file))}`;
|
|
42672
|
+
};
|
|
42252
42673
|
renderFinding = (finding) => {
|
|
42253
42674
|
const lines = [];
|
|
42254
42675
|
const sym = SEVERITY_SYMBOL[finding.severity];
|
|
@@ -42261,7 +42682,7 @@ ${fence}`;
|
|
|
42261
42682
|
lines.push(`> ${escapeInlinePreservingCodeSpans(finding.message)}`);
|
|
42262
42683
|
if (finding.snippet) {
|
|
42263
42684
|
lines.push("");
|
|
42264
|
-
lines.push(
|
|
42685
|
+
lines.push(renderFindingCodeContext(finding));
|
|
42265
42686
|
}
|
|
42266
42687
|
if (finding.suggestion) {
|
|
42267
42688
|
lines.push("");
|
|
@@ -42495,7 +42916,15 @@ ${body}`;
|
|
|
42495
42916
|
const locationLines = group2.findings.map((f) => {
|
|
42496
42917
|
const loc = `${f.file}:${f.range.line}:${f.range.column}`;
|
|
42497
42918
|
const confBadge = f.confidence !== void 0 && f.confidence !== baseline ? ` _(${f.confidence}%)_` : "";
|
|
42498
|
-
|
|
42919
|
+
const context = renderFindingCodeContext(f);
|
|
42920
|
+
return `- ${escapeCodeSpan(loc)}${confBadge}${context ? `
|
|
42921
|
+
|
|
42922
|
+
<details><summary>Code context</summary>
|
|
42923
|
+
|
|
42924
|
+
${context}
|
|
42925
|
+
|
|
42926
|
+
</details>
|
|
42927
|
+
` : ""}`;
|
|
42499
42928
|
});
|
|
42500
42929
|
bodyLines.push("");
|
|
42501
42930
|
if (group2.findings.length > MAX_INLINE_LOCATIONS) {
|
|
@@ -42592,6 +43021,7 @@ ${body}`;
|
|
|
42592
43021
|
file: f.file,
|
|
42593
43022
|
range: buildRangeBlock(f.range),
|
|
42594
43023
|
...f.snippet !== void 0 ? { snippet: f.snippet } : {},
|
|
43024
|
+
...f.snippetStartLine !== void 0 ? { snippetStartLine: f.snippetStartLine } : {},
|
|
42595
43025
|
...f.suggestion !== void 0 ? { suggestion: f.suggestion } : {},
|
|
42596
43026
|
...f.fix !== void 0 ? { fix: f.fix } : {}
|
|
42597
43027
|
});
|
|
@@ -42718,7 +43148,15 @@ ${body}`;
|
|
|
42718
43148
|
{
|
|
42719
43149
|
physicalLocation: {
|
|
42720
43150
|
artifactLocation: { uri: toArtifactUri(f.file), uriBaseId: "%SRCROOT%" },
|
|
42721
|
-
region: buildRegion(f.range, f.snippet)
|
|
43151
|
+
region: buildRegion(f.range, f.snippetStartLine === void 0 ? f.snippet : void 0),
|
|
43152
|
+
...f.snippet && f.snippetStartLine !== void 0 ? {
|
|
43153
|
+
contextRegion: {
|
|
43154
|
+
startLine: f.snippetStartLine,
|
|
43155
|
+
startColumn: 1,
|
|
43156
|
+
endLine: f.snippetStartLine + f.snippet.split("\n").length - 1,
|
|
43157
|
+
snippet: { text: f.snippet }
|
|
43158
|
+
}
|
|
43159
|
+
} : {}
|
|
42722
43160
|
}
|
|
42723
43161
|
}
|
|
42724
43162
|
],
|
|
@@ -47618,7 +48056,8 @@ var init_dist8 = __esm({
|
|
|
47618
48056
|
usesParser: external_exports.boolean().optional(),
|
|
47619
48057
|
usesAstGraph: external_exports.boolean().optional(),
|
|
47620
48058
|
usesTaint: external_exports.boolean().optional(),
|
|
47621
|
-
usesTemplateComponent: external_exports.boolean().optional()
|
|
48059
|
+
usesTemplateComponent: external_exports.boolean().optional(),
|
|
48060
|
+
usesProjectContext: external_exports.boolean().optional()
|
|
47622
48061
|
// `check` is a function, can't validate with Zod; we check at runtime.
|
|
47623
48062
|
});
|
|
47624
48063
|
aiConfigSchema = external_exports.object({
|
|
@@ -48807,7 +49246,7 @@ ${validated.error.issues.map((i) => ` - ${i.path.join(".")}: ${i.message}`).joi
|
|
|
48807
49246
|
...anyRule.defaultOptions ?? {},
|
|
48808
49247
|
...resolvedRuleOptions ?? {}
|
|
48809
49248
|
} : {};
|
|
48810
|
-
const cacheKey = cache3 ? ruleCacheKey(
|
|
49249
|
+
const cacheKey = cache3 && rule.usesProjectContext !== true ? ruleCacheKey(
|
|
48811
49250
|
rule,
|
|
48812
49251
|
file,
|
|
48813
49252
|
rule.usesAstGraph === true ? astGraph?.fingerprint : void 0,
|
|
@@ -49187,8 +49626,8 @@ ${validated.error.issues.map((i) => ` - ${i.path.join(".")}: ${i.message}`).joi
|
|
|
49187
49626
|
"spring-boot/native-query-performance-risk@1",
|
|
49188
49627
|
"spring-boot/cache-consistency-risk@2",
|
|
49189
49628
|
"angular/trackby-required@2",
|
|
49190
|
-
"angular/onpush-required@
|
|
49191
|
-
"angular/no-leaky-subscription@
|
|
49629
|
+
"angular/onpush-required@4",
|
|
49630
|
+
"angular/no-leaky-subscription@7"
|
|
49192
49631
|
];
|
|
49193
49632
|
PERF_PACK_RULES = [
|
|
49194
49633
|
"spring-boot/transaction-holds-remote-call@1",
|
|
@@ -54482,7 +54921,7 @@ var init_libsql = __esm({
|
|
|
54482
54921
|
init_session2();
|
|
54483
54922
|
}
|
|
54484
54923
|
});
|
|
54485
|
-
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, migration0060, migration0061, migration0062, migration0063, migration0064, migration0065, migration0066, migration0067, migration0068, MARIADB_MIGRATIONS;
|
|
54924
|
+
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, migration0060, migration0061, migration0062, migration0063, migration0069, migration0070, migration0064, migration0065, migration0066, migration0067, migration0068, MARIADB_MIGRATIONS;
|
|
54486
54925
|
var init_dist9 = __esm({
|
|
54487
54926
|
"../storage/dist/index.js"() {
|
|
54488
54927
|
init_libsql();
|
|
@@ -54939,6 +55378,8 @@ var init_dist9 = __esm({
|
|
|
54939
55378
|
if (typeof p.profileApplicability === "string" && p.profileApplicability.length > 0) {
|
|
54940
55379
|
out.profileApplicability = p.profileApplicability;
|
|
54941
55380
|
}
|
|
55381
|
+
if (typeof p.snippetStartLine === "number" && Number.isSafeInteger(p.snippetStartLine) && p.snippetStartLine > 0)
|
|
55382
|
+
out.snippetStartLine = p.snippetStartLine;
|
|
54942
55383
|
return Object.keys(out).length > 0 ? out : void 0;
|
|
54943
55384
|
};
|
|
54944
55385
|
serializeAiStats = (run, options = {}) => {
|
|
@@ -54996,6 +55437,7 @@ var init_dist9 = __esm({
|
|
|
54996
55437
|
};
|
|
54997
55438
|
serializeFindingMetadata = (finding) => {
|
|
54998
55439
|
const metadata = {
|
|
55440
|
+
...finding.snippetStartLine !== void 0 ? { snippetStartLine: finding.snippetStartLine } : {},
|
|
54999
55441
|
...finding.category !== void 0 ? { category: finding.category } : {},
|
|
55000
55442
|
...finding.rootCauseKey !== void 0 ? { rootCauseKey: finding.rootCauseKey } : {},
|
|
55001
55443
|
...finding.tags !== void 0 ? { tags: finding.tags } : {},
|
|
@@ -57787,6 +58229,49 @@ var init_dist9 = __esm({
|
|
|
57787
58229
|
MODIFY COLUMN input_id VARCHAR(64) NOT NULL DEFAULT '-'`
|
|
57788
58230
|
]
|
|
57789
58231
|
};
|
|
58232
|
+
migration0069 = {
|
|
58233
|
+
version: 69,
|
|
58234
|
+
name: "investigation-reviews",
|
|
58235
|
+
statements: [
|
|
58236
|
+
`CREATE TABLE IF NOT EXISTS pentest_sandbox_attempt_reviews (
|
|
58237
|
+
id VARCHAR(64) PRIMARY KEY,
|
|
58238
|
+
attempt_id VARCHAR(64) NOT NULL,
|
|
58239
|
+
reviewed_by VARCHAR(384) NOT NULL,
|
|
58240
|
+
decision VARCHAR(32) NOT NULL,
|
|
58241
|
+
reason TEXT NOT NULL,
|
|
58242
|
+
evidence_ids_json TEXT NOT NULL,
|
|
58243
|
+
created_at BIGINT NOT NULL,
|
|
58244
|
+
FOREIGN KEY (attempt_id) REFERENCES pentest_sandbox_attempts(id) ON DELETE CASCADE,
|
|
58245
|
+
INDEX idx_attempt_reviews (attempt_id,created_at)
|
|
58246
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`
|
|
58247
|
+
]
|
|
58248
|
+
};
|
|
58249
|
+
migration0070 = {
|
|
58250
|
+
version: 70,
|
|
58251
|
+
name: "sandbox-executions",
|
|
58252
|
+
statements: [
|
|
58253
|
+
`CREATE TABLE IF NOT EXISTS pentest_sandbox_executions (
|
|
58254
|
+
id VARCHAR(64) PRIMARY KEY,
|
|
58255
|
+
project_id VARCHAR(255) NOT NULL,
|
|
58256
|
+
request_id VARCHAR(384) NOT NULL,
|
|
58257
|
+
sandbox_id VARCHAR(384) NOT NULL,
|
|
58258
|
+
runtime_generation INT NOT NULL,
|
|
58259
|
+
actor_id VARCHAR(384) NOT NULL,
|
|
58260
|
+
idempotency_key VARCHAR(128) NOT NULL,
|
|
58261
|
+
request_fingerprint VARCHAR(64) NOT NULL,
|
|
58262
|
+
state VARCHAR(32) NOT NULL,
|
|
58263
|
+
record_json MEDIUMTEXT NOT NULL,
|
|
58264
|
+
created_at BIGINT NOT NULL,
|
|
58265
|
+
retention_expires_at BIGINT NOT NULL,
|
|
58266
|
+
UNIQUE KEY uq_sandbox_execution_key (project_id, request_id, idempotency_key),
|
|
58267
|
+
INDEX idx_sandbox_execution_active (sandbox_id, state),
|
|
58268
|
+
INDEX idx_sandbox_execution_history (project_id, request_id, id),
|
|
58269
|
+
FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE,
|
|
58270
|
+
FOREIGN KEY (request_id) REFERENCES pentest_requests(id) ON DELETE CASCADE,
|
|
58271
|
+
FOREIGN KEY (sandbox_id) REFERENCES pentest_sandboxes(id) ON DELETE CASCADE
|
|
58272
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`
|
|
58273
|
+
]
|
|
58274
|
+
};
|
|
57790
58275
|
migration0064 = {
|
|
57791
58276
|
version: 64,
|
|
57792
58277
|
name: "pentest-sandboxes",
|
|
@@ -57968,17 +58453,19 @@ var init_dist9 = __esm({
|
|
|
57968
58453
|
`CREATE TABLE IF NOT EXISTS pentest_sandbox_investigations (
|
|
57969
58454
|
id VARCHAR(64) PRIMARY KEY,
|
|
57970
58455
|
project_id VARCHAR(255) NOT NULL,
|
|
57971
|
-
request_id VARCHAR(
|
|
58456
|
+
request_id VARCHAR(384) NOT NULL,
|
|
57972
58457
|
assessment_id VARCHAR(255) NULL,
|
|
57973
58458
|
scenario_id VARCHAR(128) NOT NULL,
|
|
57974
58459
|
variant_id VARCHAR(128) NOT NULL,
|
|
57975
|
-
sandbox_id VARCHAR(
|
|
58460
|
+
sandbox_id VARCHAR(384) NOT NULL,
|
|
57976
58461
|
runtime_generation INT NOT NULL DEFAULT 1,
|
|
57977
58462
|
recipe_version INT NOT NULL DEFAULT 1,
|
|
57978
58463
|
created_by_user_id VARCHAR(384) NULL,
|
|
57979
58464
|
created_at BIGINT NOT NULL,
|
|
57980
58465
|
updated_at BIGINT NOT NULL,
|
|
57981
58466
|
FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE,
|
|
58467
|
+
FOREIGN KEY (request_id) REFERENCES pentest_requests(id) ON DELETE CASCADE,
|
|
58468
|
+
FOREIGN KEY (sandbox_id) REFERENCES pentest_sandboxes(id) ON DELETE CASCADE,
|
|
57982
58469
|
FOREIGN KEY (created_by_user_id) REFERENCES dashboard_users(id) ON DELETE SET NULL,
|
|
57983
58470
|
INDEX idx_investigations_req_scen (request_id, scenario_id),
|
|
57984
58471
|
INDEX idx_investigations_sandbox (sandbox_id)
|
|
@@ -58087,7 +58574,9 @@ var init_dist9 = __esm({
|
|
|
58087
58574
|
migration0065,
|
|
58088
58575
|
migration0066,
|
|
58089
58576
|
migration0067,
|
|
58090
|
-
migration0068
|
|
58577
|
+
migration0068,
|
|
58578
|
+
migration0069,
|
|
58579
|
+
migration0070
|
|
58091
58580
|
];
|
|
58092
58581
|
MARIADB_MIGRATIONS[MARIADB_MIGRATIONS.length - 1]?.version ?? 0;
|
|
58093
58582
|
}
|
|
@@ -58579,7 +59068,7 @@ var init_schema = __esm({
|
|
|
58579
59068
|
targets: external_exports.record(packagingTargetSchema).default({}),
|
|
58580
59069
|
exclude: external_exports.array(external_exports.string().trim().min(1)).default([]).transform((patterns) => [.../* @__PURE__ */ new Set([...DEFAULT_PACKAGING_EXCLUDES, ...patterns])]),
|
|
58581
59070
|
maxFileBytes: configInt({ min: 1, default: 32 * 1024 * 1024 }),
|
|
58582
|
-
maxArchiveBytes: configInt({ min: 1, default:
|
|
59071
|
+
maxArchiveBytes: configInt({ min: 1, default: 1024 * 1024 * 1024 })
|
|
58583
59072
|
}).superRefine((packaging, ctx) => {
|
|
58584
59073
|
if (packaging.defaultTarget !== void 0 && packaging.targets[packaging.defaultTarget] === void 0) {
|
|
58585
59074
|
ctx.addIssue({
|
|
@@ -59766,6 +60255,7 @@ var init_find_files = __esm({
|
|
|
59766
60255
|
absolutePath: resolve(absPath),
|
|
59767
60256
|
language: projected?.language ?? language,
|
|
59768
60257
|
content: effectiveContent,
|
|
60258
|
+
...projected ? { originalContent: content } : {},
|
|
59769
60259
|
hash: sha256(content),
|
|
59770
60260
|
size,
|
|
59771
60261
|
...projected?.template !== void 0 ? { vueTemplate: projected.template } : {}
|
|
@@ -60121,11 +60611,11 @@ var definedBuildValue = (value, fallback) => typeof value === "string" && value.
|
|
|
60121
60611
|
var getCliBuildMetadata = (version2) => ({
|
|
60122
60612
|
version: version2,
|
|
60123
60613
|
gitSha: definedBuildValue(
|
|
60124
|
-
"
|
|
60614
|
+
"9867ea2c91ae" ,
|
|
60125
60615
|
"unknown"
|
|
60126
60616
|
),
|
|
60127
60617
|
buildTimestamp: definedBuildValue(
|
|
60128
|
-
"2026-10-
|
|
60618
|
+
"2026-10-13T08:53:24.941Z" ,
|
|
60129
60619
|
"unknown"
|
|
60130
60620
|
),
|
|
60131
60621
|
configSchemaRange: definedBuildValue(
|
|
@@ -61547,7 +62037,7 @@ var LinuxSecretServiceStore = class {
|
|
|
61547
62037
|
};
|
|
61548
62038
|
var nativeWindowsEntry = async (service, account) => {
|
|
61549
62039
|
const { AsyncEntry } = await import('@napi-rs/keyring');
|
|
61550
|
-
return AsyncEntry
|
|
62040
|
+
return new AsyncEntry(service, account);
|
|
61551
62041
|
};
|
|
61552
62042
|
var WindowsCredentialManagerStore = class {
|
|
61553
62043
|
constructor(entry = nativeWindowsEntry) {
|
|
@@ -61556,10 +62046,13 @@ var WindowsCredentialManagerStore = class {
|
|
|
61556
62046
|
entry;
|
|
61557
62047
|
async read(service, account) {
|
|
61558
62048
|
const bytes = await (await this.entry(service, account)).getSecret();
|
|
61559
|
-
return bytes === void 0 ? null : Buffer.from(bytes).toString("utf8");
|
|
62049
|
+
return bytes === void 0 || bytes === null ? null : Buffer.from(bytes).toString("utf8");
|
|
61560
62050
|
}
|
|
61561
62051
|
async write(service, account, value) {
|
|
61562
62052
|
await (await this.entry(service, account)).setSecret(Buffer.from(value, "utf8"));
|
|
62053
|
+
if (await this.read(service, account) !== value) {
|
|
62054
|
+
throw new Error("Windows Credential Manager did not persist the credential.");
|
|
62055
|
+
}
|
|
61563
62056
|
}
|
|
61564
62057
|
async remove(service, account) {
|
|
61565
62058
|
await (await this.entry(service, account)).deleteCredential();
|
|
@@ -67488,6 +67981,7 @@ var createGitLabClient = (options) => {
|
|
|
67488
67981
|
|
|
67489
67982
|
// src/pr/publisher.ts
|
|
67490
67983
|
init_dist2();
|
|
67984
|
+
init_dist5();
|
|
67491
67985
|
init_dist();
|
|
67492
67986
|
var SUMMARY_MARKER = "<!-- code-sentinel:pr-review -->";
|
|
67493
67987
|
var fingerprintMarker = (fingerprint) => `<!-- code-sentinel:finding ${fingerprint} -->`;
|
|
@@ -67543,6 +68037,17 @@ var renderPrSummary = (options) => {
|
|
|
67543
68037
|
lines.push("### Findings", "");
|
|
67544
68038
|
lines.push("| Severity | Rule | Location | Message |", "|---|---|---|---|");
|
|
67545
68039
|
for (const finding of allFindings) lines.push(renderFindingRow(finding));
|
|
68040
|
+
for (const finding of allFindings) {
|
|
68041
|
+
if (finding.snippet)
|
|
68042
|
+
lines.push(
|
|
68043
|
+
"",
|
|
68044
|
+
`<details><summary>${finding.file.replace(/[&<>]/g, (c) => ({ "&": "&", "<": "<", ">": ">" })[c] ?? c)}:${finding.range.line} \u2014 code context</summary>`,
|
|
68045
|
+
"",
|
|
68046
|
+
renderFindingCodeContext(finding),
|
|
68047
|
+
"",
|
|
68048
|
+
"</details>"
|
|
68049
|
+
);
|
|
68050
|
+
}
|
|
67546
68051
|
}
|
|
67547
68052
|
return lines.join("\n");
|
|
67548
68053
|
};
|
|
@@ -67551,6 +68056,7 @@ var renderInlineComment = (item16) => [
|
|
|
67551
68056
|
`**${item16.finding.ruleId}** (${item16.finding.severity})`,
|
|
67552
68057
|
"",
|
|
67553
68058
|
item16.finding.message,
|
|
68059
|
+
renderFindingCodeContext(item16.finding),
|
|
67554
68060
|
item16.finding.suggestion ? `
|
|
67555
68061
|
Suggestion: ${item16.finding.suggestion}` : ""
|
|
67556
68062
|
].filter((part) => part.length > 0).join("\n");
|
|
@@ -67624,6 +68130,7 @@ var publishPrReview = async (options) => {
|
|
|
67624
68130
|
};
|
|
67625
68131
|
|
|
67626
68132
|
// src/pr/static-review.ts
|
|
68133
|
+
init_dist4();
|
|
67627
68134
|
init_dist2();
|
|
67628
68135
|
init_dist5();
|
|
67629
68136
|
init_dist8();
|
|
@@ -67665,6 +68172,18 @@ var executePrStaticReview = async (options) => {
|
|
|
67665
68172
|
...aiOverrides ? { aiOverrides } : {}
|
|
67666
68173
|
});
|
|
67667
68174
|
try {
|
|
68175
|
+
if (!options.aiOff && options.config.ai.provider !== "none") {
|
|
68176
|
+
if (container.aiClient) {
|
|
68177
|
+
const connection = await checkAiConnection(container.aiClient);
|
|
68178
|
+
if (connection.status !== "connected") {
|
|
68179
|
+
console.error(`WARNING: ${connection.message} PR AI review may be incomplete.`);
|
|
68180
|
+
}
|
|
68181
|
+
} else {
|
|
68182
|
+
console.error(
|
|
68183
|
+
"WARNING: PR AI review has no usable AI client. Check provider settings and API key; AI stages will be skipped."
|
|
68184
|
+
);
|
|
68185
|
+
}
|
|
68186
|
+
}
|
|
67668
68187
|
const trustedResources = resolveTrustedPrResources(options.trustedRuleRoot);
|
|
67669
68188
|
const filesResult = await findFiles({
|
|
67670
68189
|
projectRoot: options.projectRoot,
|
|
@@ -68860,9 +69379,10 @@ var runPrReview = async (options) => {
|
|
|
68860
69379
|
options.aiOff === true ? "AI disabled by --ai-off" : aiClient === null ? "AI client is unavailable" : "No changed diff packets"
|
|
68861
69380
|
);
|
|
68862
69381
|
}
|
|
69382
|
+
const enrichFinding = createFindingContextEnricher(staticResult.allSourceFiles);
|
|
68863
69383
|
const mergedFindings = [
|
|
68864
69384
|
...mergePrCandidateFindings(staticResult.run.findings, aiFindings, changedPaths)
|
|
68865
|
-
].sort(compareFindings);
|
|
69385
|
+
].map(enrichFinding).sort(compareFindings);
|
|
68866
69386
|
const classified = classifyPrFindings(mergedFindings, changedPaths, lineMap);
|
|
68867
69387
|
const aiStats = mergePrAiStats(
|
|
68868
69388
|
staticResult.run.aiStats,
|
|
@@ -71376,6 +71896,21 @@ var runReview = async (options = {}) => {
|
|
|
71376
71896
|
console.error(red(`Failed to initialize: ${e.message}`));
|
|
71377
71897
|
return EXIT.RUNTIME;
|
|
71378
71898
|
}
|
|
71899
|
+
if (!effectiveAiOff && container.aiClient) {
|
|
71900
|
+
const connection = await checkAiConnection(container.aiClient);
|
|
71901
|
+
if (connection.status !== "connected") {
|
|
71902
|
+
console.error(yellow(`WARNING: ${connection.message} AI review may be incomplete.`));
|
|
71903
|
+
} else if (!silent) {
|
|
71904
|
+
console.log(`AI connection OK (${connection.provider}).`);
|
|
71905
|
+
}
|
|
71906
|
+
}
|
|
71907
|
+
if (!effectiveAiOff && config.ai.provider !== "none" && !container.aiClient) {
|
|
71908
|
+
console.error(
|
|
71909
|
+
yellow(
|
|
71910
|
+
"WARNING: AI is configured but no usable AI client is available. Check provider settings and API key; AI review will be skipped."
|
|
71911
|
+
)
|
|
71912
|
+
);
|
|
71913
|
+
}
|
|
71379
71914
|
const activeAiProvider = effectiveAiOff ? null : container.aiClient?.name ?? null;
|
|
71380
71915
|
const activeAiModel = activeAiProvider === null ? null : resolveActiveModel(config);
|
|
71381
71916
|
const aiEnabled = !effectiveAiOff && container.aiExecutor !== void 0;
|
|
@@ -71988,7 +72523,10 @@ var runReview = async (options = {}) => {
|
|
|
71988
72523
|
includeSnippets: false
|
|
71989
72524
|
})
|
|
71990
72525
|
);
|
|
71991
|
-
for (const finding of archiveDoc.findings ?? [])
|
|
72526
|
+
for (const finding of archiveDoc.findings ?? []) {
|
|
72527
|
+
finding.snippet = void 0;
|
|
72528
|
+
finding.snippetStartLine = void 0;
|
|
72529
|
+
}
|
|
71992
72530
|
await writeFile(findingsArchivePath, JSON.stringify(archiveDoc), "utf8");
|
|
71993
72531
|
log2(quiet, dim(` Findings archive: ${findingsArchivePath}`));
|
|
71994
72532
|
await pruneFindingsArchives(dirname(findingsArchivePath), config.storage.retainRuns);
|
|
@@ -77123,32 +77661,28 @@ H\xE3y ch\u1EA1y \`cs auth login\`.`
|
|
|
77123
77661
|
}
|
|
77124
77662
|
}
|
|
77125
77663
|
try {
|
|
77126
|
-
const
|
|
77127
|
-
|
|
77128
|
-
|
|
77129
|
-
|
|
77130
|
-
|
|
77131
|
-
|
|
77132
|
-
const remoteConfig = payload.config ?? payload;
|
|
77133
|
-
const ai = remoteConfig?.ai;
|
|
77134
|
-
const provider = ai?.provider ?? remoteConfig?.aiProvider ?? "viettel-netmind";
|
|
77135
|
-
if (provider && provider !== "none" && provider !== "ollama") {
|
|
77136
|
-
const STORED_SECRET_PLACEHOLDER = "${CODE_SENTINEL_STORED_SECRET}";
|
|
77137
|
-
const pKey = provider === "viettel-netmind" ? "viettelNetmind" : provider === "openai-compatible" ? "openaiCompatible" : provider === "opencode-go" ? "opencodeGo" : provider;
|
|
77138
|
-
const providerConf = typeof ai?.[pKey] === "object" && ai?.[pKey] !== null ? ai[pKey] : {};
|
|
77139
|
-
const rawProviderApiKey = typeof providerConf.apiKey === "string" ? providerConf.apiKey.trim() : typeof ai?.apiKey === "string" ? ai.apiKey.trim() : "";
|
|
77140
|
-
const hasServerSecret = rawProviderApiKey === STORED_SECRET_PLACEHOLDER || rawProviderApiKey === "<configured server secret>" || rawProviderApiKey.startsWith("csenc:v1:");
|
|
77141
|
-
const hasExplicitKey = rawProviderApiKey.length > 0 && !hasServerSecret && !/^\$\{[A-Z0-9_]+\}$/.test(rawProviderApiKey);
|
|
77142
|
-
if (!hasServerSecret && !hasExplicitKey) {
|
|
77143
|
-
process.stderr.write(
|
|
77144
|
-
`
|
|
77145
|
-
\u26A0 Project ch\u01B0a c\xF3 API key cho ${provider}; request v\u1EABn \u0111\u01B0\u1EE3c g\u1EEDi v\xE0 server s\u1EBD d\xF9ng to\xE0n b\u1ED9 resolver deterministic. Tr\u1EA1ng th\xE1i AI degraded ch\u1EC9 l\xE0 metadata preparation.
|
|
77146
|
-
`
|
|
77147
|
-
);
|
|
77148
|
-
}
|
|
77664
|
+
const checkRes = await fetch(
|
|
77665
|
+
`${serverUrl.replace(/\/+$/, "")}/api/projects/${encodeURIComponent(link.projectId)}/ai-connection`,
|
|
77666
|
+
{
|
|
77667
|
+
method: "POST",
|
|
77668
|
+
headers: { authorization: `Bearer ${token}` },
|
|
77669
|
+
signal: AbortSignal.timeout(2e4)
|
|
77149
77670
|
}
|
|
77671
|
+
);
|
|
77672
|
+
const check = checkRes.ok ? await checkRes.json() : null;
|
|
77673
|
+
if (check?.status === "connected") {
|
|
77674
|
+
process.stderr.write("\n\u2713 AI connection OK tr\xEAn server.\n");
|
|
77675
|
+
} else {
|
|
77676
|
+
process.stderr.write(
|
|
77677
|
+
`
|
|
77678
|
+
\u26A0 ${check?.message ?? "Kh\xF4ng ki\u1EC3m tra \u0111\u01B0\u1EE3c k\u1EBFt n\u1ED1i AI tr\xEAn server."} Request v\u1EABn \u0111\u01B0\u1EE3c g\u1EEDi; c\xE1c b\u01B0\u1EDBc AI c\xF3 th\u1EC3 b\u1ECB b\u1ECF qua.
|
|
77679
|
+
`
|
|
77680
|
+
);
|
|
77150
77681
|
}
|
|
77151
77682
|
} catch {
|
|
77683
|
+
process.stderr.write(
|
|
77684
|
+
"\n\u26A0 Kh\xF4ng ki\u1EC3m tra \u0111\u01B0\u1EE3c k\u1EBFt n\u1ED1i AI tr\xEAn server. Request v\u1EABn \u0111\u01B0\u1EE3c g\u1EEDi; c\xE1c b\u01B0\u1EDBc AI c\xF3 th\u1EC3 b\u1ECB b\u1ECF qua.\n"
|
|
77685
|
+
);
|
|
77152
77686
|
}
|
|
77153
77687
|
}
|
|
77154
77688
|
const rawPlan = planServicePackage(repoRoot, modulePath, {
|
|
@@ -77496,7 +78030,7 @@ var bundleXcarchiveToTmpZip = (xcarchiveDir) => {
|
|
|
77496
78030
|
missingSystemJars: [],
|
|
77497
78031
|
totalBytes: 0,
|
|
77498
78032
|
excludedBytes: 0,
|
|
77499
|
-
maxArchiveBytes:
|
|
78033
|
+
maxArchiveBytes: 1024 * 1024 * 1024,
|
|
77500
78034
|
excludedFiles: picked.skippedDirs.map((dir) => ({
|
|
77501
78035
|
name: posix5(relative(xcarchiveDir, dir)),
|
|
77502
78036
|
reason: "generated-or-local-directory"
|
|
@@ -77875,7 +78409,7 @@ var runPentestMobileCommand = async (options) => {
|
|
|
77875
78409
|
missingSystemJars: [],
|
|
77876
78410
|
totalBytes: 0,
|
|
77877
78411
|
excludedBytes: 0,
|
|
77878
|
-
maxArchiveBytes:
|
|
78412
|
+
maxArchiveBytes: 1024 * 1024 * 1024,
|
|
77879
78413
|
excludedFiles: collected.skippedDirs.map((name) => ({
|
|
77880
78414
|
name: posix5(relative(repoRootCanonical, join(moduleDir, name))),
|
|
77881
78415
|
reason: "generated-or-local-directory"
|
|
@@ -81831,6 +82365,36 @@ var countConcluded = (doc) => {
|
|
|
81831
82365
|
}
|
|
81832
82366
|
return concluded;
|
|
81833
82367
|
};
|
|
82368
|
+
var syntheticEnvImpact = (doc) => {
|
|
82369
|
+
const root = asRecord8(doc);
|
|
82370
|
+
let count = 0;
|
|
82371
|
+
const names = /* @__PURE__ */ new Set();
|
|
82372
|
+
for (const rawItem of asArray2(root?.items)) {
|
|
82373
|
+
const item16 = asRecord8(rawItem);
|
|
82374
|
+
if (!item16) continue;
|
|
82375
|
+
for (const bucket of [
|
|
82376
|
+
item16.resolutions,
|
|
82377
|
+
asRecord8(item16.dast)?.resolutions,
|
|
82378
|
+
asRecord8(item16.client)?.resolutions
|
|
82379
|
+
]) {
|
|
82380
|
+
for (const rawResolution of asArray2(bucket)) {
|
|
82381
|
+
const resolution = asRecord8(rawResolution);
|
|
82382
|
+
if (resolution?.verdict !== "not-tested" || !CONCLUDED_VERDICTS.has(String(resolution.sandboxVerdict)))
|
|
82383
|
+
continue;
|
|
82384
|
+
const blockers = runtimeEnvBlockerNames([
|
|
82385
|
+
{
|
|
82386
|
+
source: "correlation.runtimeEnvBlockers",
|
|
82387
|
+
verbatim: JSON.stringify(asArray2(resolution.runtimeEnvBlockers))
|
|
82388
|
+
}
|
|
82389
|
+
]);
|
|
82390
|
+
if (blockers.length === 0) continue;
|
|
82391
|
+
count += 1;
|
|
82392
|
+
for (const name of blockers) names.add(name);
|
|
82393
|
+
}
|
|
82394
|
+
}
|
|
82395
|
+
}
|
|
82396
|
+
return { count, names: [...names].sort().slice(0, 256) };
|
|
82397
|
+
};
|
|
81834
82398
|
var BASELINE_STATUS_RE = /trả HTTP (\d{3})/;
|
|
81835
82399
|
var detectBaselineRefusal = async (dir) => {
|
|
81836
82400
|
let entries;
|
|
@@ -81952,6 +82516,13 @@ var runRuntimeOutcome = async (options) => {
|
|
|
81952
82516
|
const scenariosGenerated = countSuiteScenarios(suiteDoc) + countDastScenarios(dastDoc);
|
|
81953
82517
|
const correlationDoc = options.correlation === void 0 ? null : await readJson(resolve(cwd, options.correlation));
|
|
81954
82518
|
const scenariosConcluded = countConcluded(correlationDoc);
|
|
82519
|
+
const envImpact = syntheticEnvImpact(correlationDoc);
|
|
82520
|
+
if (envImpact.count > 0) {
|
|
82521
|
+
evidence18.push({
|
|
82522
|
+
source: "correlation.runtimeEnvBlockers",
|
|
82523
|
+
verbatim: JSON.stringify(envImpact.names)
|
|
82524
|
+
});
|
|
82525
|
+
}
|
|
81955
82526
|
if (correlationDoc !== null) delivered.push("correlation");
|
|
81956
82527
|
let oracleRefusedOnBaseline = false;
|
|
81957
82528
|
let measuredBaselineStatus;
|
|
@@ -81972,6 +82543,7 @@ var runRuntimeOutcome = async (options) => {
|
|
|
81972
82543
|
appServedHttp,
|
|
81973
82544
|
scenariosGenerated,
|
|
81974
82545
|
scenariosConcluded,
|
|
82546
|
+
...envImpact.count > 0 ? { syntheticEnvBlockedCount: envImpact.count } : {},
|
|
81975
82547
|
...measuredBaselineStatus !== void 0 ? { authBaselineStatus: measuredBaselineStatus } : {},
|
|
81976
82548
|
...oracleRefusedOnBaseline ? { oracleRefusedOnBaseline: true } : {},
|
|
81977
82549
|
...options.e2Scanned !== void 0 ? { e2ScannedCount: options.e2Scanned } : {},
|
|
@@ -82015,7 +82587,11 @@ var runRuntimeOutcome = async (options) => {
|
|
|
82015
82587
|
stopReason,
|
|
82016
82588
|
evidence: evidence18,
|
|
82017
82589
|
delivered: [...new Set(delivered)],
|
|
82018
|
-
deviations: [
|
|
82590
|
+
deviations: [
|
|
82591
|
+
...options.deviations ?? [],
|
|
82592
|
+
...kafkaDeviationRows,
|
|
82593
|
+
...envImpact.count > 0 ? [`synthetic runtime dependencies: ${envImpact.names.join(", ")}`] : []
|
|
82594
|
+
]
|
|
82019
82595
|
};
|
|
82020
82596
|
const violations = validateRuntimeOutcome(outcome);
|
|
82021
82597
|
if (violations.length > 0) {
|