@code-sentinel-cli/code-sentinel-cli 4.0.10 → 4.0.11
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 +958 -182
- package/dist/builtin-rules/static/flutter/android-cleartext-traffic.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/android-debug-certificate-risk.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/android-exported-component.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/android-manifest-hardening.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/android-minsdk-low.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/android-release-debuggable.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/android-sensitive-permissions.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/bad-certificate-callback.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/biometric-without-crypto-object.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/cleartext-http-endpoint.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/debug-tooling-release-risk.rule.js +12 -3
- package/dist/builtin-rules/static/flutter/device-fingerprint-collection.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/dynamic-archive-risk.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/exported-content-provider-leak.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/hardcoded-crypto-key.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/hardcoded-oauth-client-secret.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/hive-sensitive-storage.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/insecure-deep-link.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/ios-ats-exception.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/ios-pasteboard-leak.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/ios-privacy-hardening.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/missing-enforced-update.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/oauth-missing-pkce.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/packaged-env-risk.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/sensitive-log-leak.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/token-insecure-storage.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/tracking-sdk-init.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/weak-mobile-crypto-algorithm.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/weak-prng-mobile.rule.js +1 -0
- package/dist/builtin-rules/static/flutter/webview-bridge-guard.rule.js +1 -0
- package/dist/builtin-rules/static/general/dockerfile-dependency-confusion.rule.js +5 -4
- package/dist/builtin-rules/static/general/dockerfile-no-root-user.rule.js +1 -0
- package/dist/builtin-rules/static/general/no-empty-encryption-key.rule.js +16 -1
- package/dist/builtin-rules/static/general/no-hardcoded-secret.rule.js +15 -8
- package/dist/builtin-rules/static/general/no-insecure-external-link.rule.js +1 -0
- package/dist/builtin-rules/static/general/no-insecure-password-submission.rule.js +34 -2
- package/dist/builtin-rules/static/general/sensitive-exception-response.rule.js +1 -0
- package/dist/builtin-rules/static/general/sensitive-output-exposure.rule.js +1 -0
- package/dist/builtin-rules/static/spring-boot/no-devtools-in-production.rule.js +1 -0
- package/dist/index.js +958 -182
- package/node_modules/@code-sentinel/parsers/index.js +28 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Language, Parser, Query } from 'web-tree-sitter';
|
|
|
9
9
|
import { Project, SyntaxKind, Node, ScriptKind, VariableDeclarationKind } from 'ts-morph';
|
|
10
10
|
import { readFile, stat, writeFile, mkdir, rename, readdir, rm, access, mkdtemp, unlink, chmod, lstat, realpath as realpath$1, open } from 'fs/promises';
|
|
11
11
|
import * as nativeFs from 'fs';
|
|
12
|
-
import { existsSync, mkdirSync, readFileSync, mkdtempSync, statSync, rmSync, constants, createReadStream, realpathSync, readdirSync, writeFileSync, stat as stat$1, realpath, readdir as readdir$1, unwatchFile, watchFile, watch as watch$1, openSync, readSync, closeSync, fstatSync } from 'fs';
|
|
12
|
+
import { existsSync, mkdirSync, readFileSync, mkdtempSync, statSync, rmSync, constants, createReadStream, realpathSync, readdirSync, writeFileSync, copyFileSync, 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';
|
|
@@ -11628,7 +11628,7 @@ function collectBindings(javaFiles) {
|
|
|
11628
11628
|
const resolved = resolveUnit(file.content, field3);
|
|
11629
11629
|
out.push({
|
|
11630
11630
|
file: file.path,
|
|
11631
|
-
line:
|
|
11631
|
+
line: lineOf27(file.content, m.index),
|
|
11632
11632
|
property,
|
|
11633
11633
|
field: field3,
|
|
11634
11634
|
annotationDefault: m[2],
|
|
@@ -11653,7 +11653,7 @@ function readConfiguredValue(files, property) {
|
|
|
11653
11653
|
for (const file of candidates) {
|
|
11654
11654
|
const m = yamlRe.exec(file.content) ?? propsRe.exec(file.content);
|
|
11655
11655
|
if (m?.[1]) {
|
|
11656
|
-
return { value: Number(m[1]), file: file.path, line:
|
|
11656
|
+
return { value: Number(m[1]), file: file.path, line: lineOf27(file.content, m.index) };
|
|
11657
11657
|
}
|
|
11658
11658
|
}
|
|
11659
11659
|
return void 0;
|
|
@@ -11667,7 +11667,7 @@ function parseParams2(url) {
|
|
|
11667
11667
|
function normalizeUrl(url) {
|
|
11668
11668
|
return url.replace(/^\/+/, "");
|
|
11669
11669
|
}
|
|
11670
|
-
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, applyKafkaBrokerCoherence, RUNTIME_PLAN_SCHEMA_VERSION, PLAN_NOTE, describeSidecar, buildSteps, buildRuntimeBringUpPlan, RUNTIME_OVERLAY_FILE, RUNTIME_COMPOSE_FILE, RUNTIME_GUIDE_FILE, RUNTIME_BOOT_ENV_FILE, RUNTIME_VAULT_COMPATIBILITY_FILE, SIDECAR_IMAGE, REDIS_CLUSTER_COMMAND, renderNestedYaml, renderOverlay, renderVaultCompatibility, publishLine, renderCompose, renderGuide, renderBootEnv, generateRuntimeArtifacts, SUBMISSION_REQUIREMENTS_SCHEMA_VERSION, MAX_EVIDENCE17, NOTE2, capEvidence, totalSuffix, blockerEvidence, groupBy, packagingRequirements, secretRequirements, POLICY_KINDS, policyRequirements, infrastructureRequirements, authRequirements, seedRequirements, TIER_ORDER, buildSubmissionRequirements, renderSubmissionRequirements, REJECT_SIDECAR, applyRuntimeInput, DESER_SPEC, MAX_EVIDENCE18, lineOf16, UNSAFE_PATTERNS, collectHits2, SAFE_VALIDATOR_RE, firstSafeValidator, evidence12, item10, scanUnsafeDeserialization, WEAK_RANDOM_SPEC, MAX_EVIDENCE19, lineOf17, WEAK_RNG_PATTERNS, SECURITY_ID_RE, statementAround, COOKIE_SINK_MAX_HOPS, namesCarrying, reachesCookie, collectHits3, SECURE_RANDOM_RE, firstSecureRandom, evidence13, item11, scanWeakSecureRandom, POSTMESSAGE_SPEC, MAX_EVIDENCE20, lineOf18, WINDOW_LISTENER_PATTERNS, ORIGIN_RE, isFrontend, listenersIn, evidence14, item12, scanPostMessageOrigin, MAX_EVIDENCE21, MAX_PER_KIND, lineOf19, escapeRe, isScannableFrontendPath, GUARD_FN_TYPES, GUARD_CLASS_IFACES, FN_GUARD_TYPED_RE, CLASS_GUARD_RE, FN_GUARD_PARAM_RE, VUE_ROUTE_GUARD_RE, VUE_INTERCEPTOR_RE, FN_INTERCEPTOR_RE, INTERCEPTOR_BINDING_RE, CLASS_INTERCEPTOR_RE, INTERCEPT_METHOD_RE, INTERCEPTOR_TOKEN_RE, URL_CHECK_RES, DOM_SANITIZER_CALL_RE, SANITIZER_HELPER_DEF_RE, BYPASS_TRUST_RE, KIND_ORDER, KIND_LABELS, scanClientGuards, renderClientGuards, INDEX_HEADER_SPEC, MAX_EVIDENCE222, lineOf20, isIndexHtml, isNginxConf, META_HTTP_EQUIV_RE, ADD_HEADER_RE, extractHeaders, hasFrameProtection, evidence15, item13, scanIndexHeaders, asRecord2, asCount, parseClientArtifacts, CLIENT_COOKIE_SPEC, MAX_EVIDENCE23, lineOf21, isFrontend2, HIGH_SENSITIVITY_RE2, TOKEN_FAMILY_RE2, SECURE_RE, SAMESITE_RE, COOKIE_WRITE_RE, COOKIE_USE_RE, classifyCookieValue, collectCookieHits, evidenceOf3, resultItem, scanClientCookie, TS_LANGS, MOUNT_VUE3, MOUNT_VUE2, TS_EXT_CANDIDATES, UNRESOLVED_PATH, unwrap, TS_LANGS2, MOUNT_ROOT, MOUNT_ANY, TS_EXT_CANDIDATES2, MAX_CHAIN_DEPTH, MAX_REEXPORT_DEPTH, UNRESOLVED_PATH2, isVueSfc, inferVueSrcBase, resolveComponentRoutesByFramework, XXE_SPEC, MAX_EVIDENCE24, lineOf22, XML_PARSER_PATTERNS, HARDENING_RE, parsersIn, evidence16, item14, scanXxe, WEAK_TLS_SPEC, MAX_EVIDENCE25, lineOf23, BYPASS_PATTERNS, TLS_SURFACE_RE, bypassesIn, evidence17, item15, scanWeakTls, DOCKERFILE_SPEC, DOCKERFILE_RE, DOCKERFILE_GLOBS, isLoopback, auditDockerfileDependencyConfusion, auditDockerfileContent, scanDockerfile, HOST_HEADER_SPEC, MAX_EVIDENCE26, lineOf25, HOST_PATTERNS, REQUEST_TYPE_RE, REQUEST_NAME_RE, receiverOf, isRequestReceiver, collectHits5, evidence19, item17, scanHostHeader, CHECKLIST_ID2, CONTROL_ID2, TITLE2, evidenceOf4, item18, VALUE_ANNOTATION_RE, FIELD_AFTER_VALUE_RE, LIFETIME_TOKEN_RE, tokenize, hasOtpToken, TIME_UNIT_RE, NAME_UNIT_HINTS, TO_SECONDS, lineOf26, isOtpLifetimeName, configRank, inconclusive, scanOtpPolicy, PASSWORD_POLICY_SPEC, MAX_EVIDENCE27, lineOf27, precedingBlock3, PASSWORD_NAME_RE, NOT_A_SECRET_RE, isPasswordName, STRING_DECL_RE, SIZE_MIN_RE, ANNOTATION_IN_BLOCK_RE, LENGTH_CHECK_RE, CONSTRAINT_VALIDATOR_RE, ANNOTATION_DECL_RE, STRING_LITERAL_RE, QUANT_MIN_RE, POLICY_SURFACE_PATTERNS, ACCOUNT_SURFACE_RE, baseName2, isAccountSurface, collectCustomConstraintMins, sitesIn, firstUsageIndex, pointersIn, dedupeSort, evidenceOf5, item19, policyNote, scanPasswordPolicy, SPEC, MAX_EVIDENCE28, AUTH_SURFACE_RE, ACCOUNT_EXISTENCE_RE, PASSWORD_ONLY_RE, COMBINED_RE, STRING_LITERAL_RE2, lineOf28, scanAuthFile, dedupeSort2, evidenceOf6, item20, scanAccountEnumeration, SPEC2, MAX_EVIDENCE29, LOGOUT_ENDPOINT_RE, LOGOUT_MENTION_RE, INVALIDATION_PATTERNS, lineOf29, invalidationHits, dedupeSort3, evidenceOf7, item21, scanLogoutInvalidation, SPEC3, MAX_EVIDENCE30, OTP_ISSUE_RE, OTP_MENTION_RE, THROTTLE_PATTERNS, lineOf30, firstMatch2, dedupeSort4, evidenceOf8, item22, scanOtpThrottle, MAX_EVIDENCE31, REST_TEMPLATE_CALL_RE, NEW_URL_RE, URL_TAIL_RE, URI_TAIL_RE, OPEN_CONNECTION_RE, SIGNALS, lineOf31, scanSsrfEndpointHints, SPEC4, MAX_EVIDENCE322, HARD_MUTATION_HANDLER_RE, DIRECT_WRITE_RE, DELEGATION_WRITE_RE, TXN_RE, READ_ONLY_TXN_RE, offsetOfLine2, insideLiteral, extractHandlerBody, braceMatchedBlock, signatureRegion, confirmWrite, dedupeSort5, evidenceOf9, item23, scanStateChangingGet, KEY_MANAGEMENT_SPEC, JAVA_FILE_RE3, CONFIG_FILE_RE3, EMPTY_SECRET_KEY_SPEC_RE, EMPTY_KEY_VAR_RE, scanEmptyEncryptionKeys, MFA_AUTH_SPEC, JAVA_FILE_RE4, CONFIG_FILE_RE4, AUTH_SURFACE_RE2, MFA_INDICATORS_RE, MFA_VERIFY_ENDPOINT_RE, SSO_INDICATORS_RE, isTestPath2, isNonSiteLine, scanMfaAuth, PASSWORD_EXPIRY_SPEC, JAVA_FILE_RE5, CONFIG_FILE_RE5, USER_DETAILS_RE, HARDCODED_CREDENTIALS_NON_EXPIRED_RE, ACTIVE_EXPIRY_CHECK_RE, PASSWORD_AGE_SOURCE_RE, ADVISORY_EXPIRY_FLAG_RE, EXPIRY_ENFORCEMENT_RE, forcesPasswordResetViaUpdate, ENFORCEMENT_POINT_RE, LIFERAY_EXPIREABLE_RE, LIFERAY_MAX_AGE_RE, isTestPath3, scanPasswordExpiryPolicy, SETTER_RE, HTTP_STATUS_RECEIVER, HTTP_STATUS_ARG, CONSTANT_ARG, ENUM_ARG, LOADS_EXISTING, ENTITY_DECL_RE, PRINCIPAL_RE, STATE_NOUN, escapeRegExp2, stateReadBefore, hasSameReceiverStateReadBefore, hasCopySourceStateReadBefore, CONSTRUCTED_AS_RE, loadedTypesIn, receiverOriginOf, lineOf32, methodsOf, isJava3, isControllerPath, scanStateTransitionSites, RULE_TITLES, EXTRA_FINDING_RULE_IDS, EXTRA_AI_RULE_IDS, foldExtraRuleFindings, MAX_EVIDENCE33, SEVERITY_ORDER2, SCORE_FLOOR, asRecord3, asString, stripMountPrefix, severityFromTags, field, parseScaReport, effectiveScore, passesThreshold, distinctPairs, bySeverityThenName, evidenceOf10, countBySeverity, provenance, foldScaReport, BRUTE_FORCE_SPEC, MAX_EVIDENCE34, lineOf33, AUTH_CONTEXT_RE, LIMIT_NAME_RE, LOGIN_CONTEXT_RE, LOGIN_WINDOW_LINES, nearLoginContext, MAX_VALUE_ASSIGN_RE, MECHANISM_PATTERNS, RATE_LIMIT_PATTERNS, ISSUANCE_NAME_RE, failOpenHits, patternHits, dedupeSort6, evidenceOf11, item24, scanBruteForceProtection, keyOf, applyRouteConfigOverrides, CLIENT_CLASSES, MANUAL_DELIVERY_SOURCES, ENC, ROUTE_BASE_PREFIX, BENIGN_PARAM, CLIENT_ORACLE, deliveryFor, clientDeliveryKindFor, jsStr, normFile, camel, urlChunk, buildGoto, manualComment, renderMethod, renderSpec, dedupeRoutes, generateClientVerificationSuite, buildClientVerificationManifest, WSTG, TC16, MANUAL_CHECKLIST_ITEMS, NEEDS_MANUAL_LIMITATION, buildManualChecklistItems, handoffFileName, MAX_SURFACE_SAMPLE, surfaceContext, INFRA_CONTEXT, buildHandoffPackets, literal, renderIdorVerificationClass, OBJECT_STORE_PROBE_SINKS, GENERATED_PACKAGE, SERVER_CLASSES, BOOLEAN_BLIND_CLASSES, BOOLEAN_BLIND_PAIRS, CLASS_CANARY, COMMAND_CANARY, VALIDATION_REJECT_CLASSES2, CANON_HELPER, CLASS_ORACLE, javaStr, SSRF_BASELINE_WORKBOOK_ENTRIES, SSRF_BASELINE_WORKBOOK_HELPER, BENIGN_SEED, BUCKET_BENIGN_SEED, benignSeedFor, companionBenignSeed, renderAuthSuffix, RUNTIME_AUTH_SUFFIX, renderRuntimeAuthHelper, pascal, camel2, verificationTestClassName, identChunk, fillPath, companionCalls, ssrfPayloadPath, requestExpr, isVerifiable, SERVER_SKIP_REASON, renderBooleanBlind, renderCanary, isObjectStoreProbeSink, OBJECT_STORE_REJECT_CATCH_LINES, wrapObjectStoreAttackGuard, wrapObjectStoreEvidenceAttackGuard, resolveAuth, renderMethod2, renderEvidenceMethod, renderEvidenceHelpers, renderTestcontainersDbTierFields, renderExternalDbTierFields, javaSeedValue, renderSeedMethod, renderApiCreateSeedMethod, renderClass, toManifestEntries, generateVerificationSuite, buildVerificationManifest, decodeEntities, attr, stripCdata, childMessage, classify3, parseJUnitXml, simpleClassName, joinKey, DEFAULT_TRUST_TIER, resolveFromEnvelope, ingestVerification, PROVENANCE_DETAIL, applyProvenanceDowngrades, asRecord4, asString2, asBool, asInt, asHttpStatus, SIGNALS2, ATTESTATION_METHODS, parseProvenance, parseOracle, parseEffectBoundary, parseDefenseControl, parseBaseline, parseIdor, parseAttack, parseEvidenceEnvelope, asRecord5, asArray, asString3, asNumber, basename4, specOutcome, walkSuite, parsePlaywrightReport, joinKey2, ingestClientVerification, compareChecklistId, correlateVerification, EMPTY_CORRELATION, notTestedItem, groupDastByChecklist, dastAxisFor, groupClientByChecklist, clientAxisFor, correlateAssessment, ZAP_SCAN_RULES, DEFAULT_DAST_OPTIONS, DAST_PLAN_FILE, DAST_MANIFEST_FILE, DAST_PROBE_SCRIPT_FILE, DAST_API_SEED_SCRIPT_FILE, API_SEED_VAR_PREFIX, PROBE_VICTIM_BUCKET_REF, PROBE_CANARY_OBJECT_REF, PROBE_INJECTION_KINDS, isScannable, skipReason, yamlStr, baselinePath, 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, lineOf34, fieldNameFor, collectOwnerScopedRepositories, LIFERAY_LOAD_BY_ID_RE, OBJECT_PERMISSION_RE, methodBodyAt, liferayIdorHits, scanIdor, children, walk2, walkExecution, field2, simpleType, isReference, line, indexTypes, resolveType, propertyOf, annotations, annotationName, annotationValues, beanProperties, customAccessor, mappedOrigins, controlSignals, conventionSignals, trace, rootOrigins, scenarioFor, MAX_IDOR_AST_FILES, MAX_IDOR_AST_BYTES, scanIdorAuthorization, CHECKLIST_ID4, CONTROL_ID4, MAX_EVIDENCE36, CONTROLLER, MULTIPART_PARAM, JAXRS_IMPORT2, JAXRS_UPLOAD_PARAM, DENYLIST, ALLOWLIST, CONTENT_SNIFF, ACTIVE_CONTENT_EXTENSION, ACTIVE_CONTENT_DEFENCE, ALLOWLIST_WINDOW, lineOf35, collectUploadHandlers, firstMatch3, findActiveContentAllowlist, scanUploadValidation, CHECKLIST_ID5, CONTROL_ID5, MAX_EVIDENCE37, SECRET_KEY_LINE, SELF_IDENTIFYING_KEYS, JWT_CONTEXT_RE, PARENT_KEY_LINE, ancestorPath, ENV_PLACEHOLDER2, NON_PROD_PROFILE, CONFIG_FILE, lineOf36, byFileLine2, collectSecrets, scanJwtSecret, PLATFORM_EOL_SPEC, MAX_EVIDENCE38, SPRING_BOOT_OSS_EOL, LIFERAY_KERNEL_MAJOR, stripComments2, lineOf37, springBootHits, liferayHits, BUILD_FILE_RE, scanPlatformEol, SPEC5, MAX_EVIDENCE39, AUTH_TOKEN_REF_RE, TOKEN_COMPARE_RE, CHECK_CSRF_RE, DISABLED_PROP_RE, lineOf38, enclosingCondition, isRequestValue, scanLiferayCsrf, DEVTOOLS_SPEC, BUILD_FILE_RE2, findDevToolsDeclarations, scanDevTools, PASSWORD_AUTOCOMPLETE_SPEC, HTML_TEMPLATE_FILE_RE, SECURE_AUTOCOMPLETE_VALUES, isTestPath4, auditPasswordAutocompleteContent, scanPasswordAutocomplete, SYSTEM_INFO_LEAK_SPEC, JAVA_FILE_RE6, isTestPath5, PRINT_STACK_TRACE_RE, SYSTEM_PRINT_EXCEPTION_RE, auditJavaErrorDisclosure, scanSystemInfoLeak, PLAYWRIGHT_VERSION_PIN, ESBUILD_VERSION_PIN, renderClientPackageJson, renderClientPlaywrightConfig, renderClientTsconfig, renderClientRunnablePackage, renderComponentBuildScript, renderVueComponentBuildScript, normFile2, posixDir, posixJoin, posixNormalize, candidateFilePaths, stripComments3, isAllowedFrameworkImport, extractImportSpecifiers, extractCompanionFiles, resolveInRepoPath, collectComponentClosure, CLIENT_CLASSES2, COMPONENT_NEEDS_BUILD_MARKER, COMPONENT_VUE_NOT_MOUNTED_MARKER, normFile3, jsStr2, camel3, fileChunk, isLikelyInjectable, analyzeMount, renderHarness, renderVueHarness, tieredAssert, renderMethod3, renderSpec2, generateComponentVerificationSuite, BINDING, HTML_COMMENT, inventoryVueTemplateSinks, HTTP_VERBS, lineOf39, readBalanced3, getFirstArg, getSecondArg, normalizeTemplateUrl, parseUrlArg, scanFile, extractClientApiCalls, normalizeSegment, normalizePath5, determineConfidence, methodsMatch, matchClientToBackendEndpoints, UPLOAD_CLIENT_SPEC, MAX_EVIDENCE40, lineOf40, isFrontend3, UPLOAD_CONTEXT_RE, FILE_INPUT_RE, ACCEPT_ATTR_RE, CLIENT_CHECK_PATTERNS, SHARED_CONST_SIGNAL_RE, HTTP_UPLOAD_SURFACE_RE, maskHtmlComments, clientChecksIn, fileInputsIn, evidence20, item25, dedupAndCap, scanUploadClientCheck, LOGOUT_CLEAR_SPEC, MAX_EVIDENCE41, lineOf41, isFrontend4, 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, lineOf42, isFrontend5, isTsLike2, MONEY_NAME_RE, isMoneyName, MIN_BOUND_RE, PATTERN_RE, CONTROL_DECL_RE, moneyControlsIn, moneyInputsIn, evidence22, item27, scanNumericBound;
|
|
11670
|
+
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, withAdditionalPackageEntries, 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;
|
|
11671
11671
|
var init_dist3 = __esm({
|
|
11672
11672
|
"../parsers/dist/index.js"() {
|
|
11673
11673
|
init_dist();
|
|
@@ -13077,14 +13077,14 @@ ${errors.join("\n")}`);
|
|
|
13077
13077
|
UNAVAILABLE_KAFKA_HOST = "127.0.0.1";
|
|
13078
13078
|
UNAVAILABLE_KAFKA_PORT = "1";
|
|
13079
13079
|
isBase64JwtSigningKeyPath = (propertyPath) => {
|
|
13080
|
-
const
|
|
13081
|
-
if (/(?:^|[.-])(?:jwt-secret|jwtsecret|jwt-key|jwtkey)$/i.test(
|
|
13082
|
-
if (/(?:^|[.-])(?:base64-secret|base64secret)$/i.test(
|
|
13080
|
+
const normalizedPath2 = propertyPath.replace(/([a-z0-9])([A-Z])/g, "$1-$2");
|
|
13081
|
+
if (/(?:^|[.-])(?:jwt-secret|jwtsecret|jwt-key|jwtkey)$/i.test(normalizedPath2)) return true;
|
|
13082
|
+
if (/(?:^|[.-])(?:base64-secret|base64secret)$/i.test(normalizedPath2) && /(?:^|[.-])(?:jwt|authentication|password-reset|security)(?:[.-]|$)/i.test(normalizedPath2))
|
|
13083
13083
|
return true;
|
|
13084
|
-
if (/(?:^|[.-])(?:reset[-.]?)?secret[-.]?(?:b64|base64)$/i.test(
|
|
13084
|
+
if (/(?:^|[.-])(?:reset[-.]?)?secret[-.]?(?:b64|base64)$/i.test(normalizedPath2) && /(?:^|[.-])(?:jwt|authentication|security)(?:[.-]|$)/i.test(normalizedPath2))
|
|
13085
13085
|
return true;
|
|
13086
13086
|
return /(?:^|[.-])(?:password[-.]?reset|reset[-.]?password)(?:[-.](?:jwt|token|signing))*[-.](?:secret|key)$/i.test(
|
|
13087
|
-
|
|
13087
|
+
normalizedPath2
|
|
13088
13088
|
);
|
|
13089
13089
|
};
|
|
13090
13090
|
isEndpointShaped = (upperVarName) => /(^|_)(URL|URI|URIS|ENDPOINT|ADDR|ADDRESS|SERVICE|SERVER)(_|$)/.test(upperVarName);
|
|
@@ -24664,6 +24664,21 @@ ${window}`;
|
|
|
24664
24664
|
fingerprintEntries = (entries) => fingerprintEntryData(
|
|
24665
24665
|
entries.map((entry) => ({ name: entry.name, data: readFileSync(entry.absolutePath) }))
|
|
24666
24666
|
);
|
|
24667
|
+
withAdditionalPackageEntries = (plan, additional) => {
|
|
24668
|
+
const names = new Set(plan.entries.map((entry) => entry.name));
|
|
24669
|
+
for (const entry of additional) {
|
|
24670
|
+
if (names.has(entry.name) || !/^[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)*$/.test(entry.name) || entry.name.split("/").some((part) => part === ".." || part === ".")) {
|
|
24671
|
+
throw new Error(`Invalid or duplicate package entry: ${entry.name}`);
|
|
24672
|
+
}
|
|
24673
|
+
names.add(entry.name);
|
|
24674
|
+
}
|
|
24675
|
+
const entries = [...plan.entries, ...additional].sort((a, b) => a.name.localeCompare(b.name));
|
|
24676
|
+
const totalBytes = entries.reduce((total2, entry) => total2 + statSync(entry.absolutePath).size, 0);
|
|
24677
|
+
if (totalBytes > plan.maxArchiveBytes) {
|
|
24678
|
+
throw new Error("Source v\xE0 th\u01B0 vi\u1EC7n \u0111\xEDnh k\xE8m v\u01B0\u1EE3t gi\u1EDBi h\u1EA1n dung l\u01B0\u1EE3ng ZIP.");
|
|
24679
|
+
}
|
|
24680
|
+
return { ...plan, entries, totalBytes, sourceFingerprint: fingerprintEntries(entries) };
|
|
24681
|
+
};
|
|
24667
24682
|
XML_COMMENT_RE5 = /<!--[\s\S]*?-->/g;
|
|
24668
24683
|
RELATIVE_PATH_RE = /<relativePath>\s*([^<]+?)\s*<\/relativePath>/i;
|
|
24669
24684
|
SYSTEM_PATH_RE2 = /<systemPath>\s*([^<]+?)\s*<\/systemPath>/gi;
|
|
@@ -25273,6 +25288,227 @@ ${window}`;
|
|
|
25273
25288
|
...kafka !== void 0 ? { kafka } : {}
|
|
25274
25289
|
};
|
|
25275
25290
|
};
|
|
25291
|
+
normalizedPath = (path2) => path2.replace(/\\/g, "/");
|
|
25292
|
+
lineOf16 = (content, index2) => content.slice(0, index2).split("\n").length;
|
|
25293
|
+
maskComments = (content) => content.replace(/\/\*[\s\S]*?\*\//g, (comment) => comment.replace(/[^\n]/g, " ")).replace(
|
|
25294
|
+
/(^|[^:])\/\/[^\n]*/g,
|
|
25295
|
+
(comment, prefix) => prefix + " ".repeat(comment.length - prefix.length)
|
|
25296
|
+
).replace(/^\s*#[^\n]*/gm, (comment) => " ".repeat(comment.length));
|
|
25297
|
+
sourceAt = (files, path2) => files.find((file) => normalizedPath(file.path) === path2);
|
|
25298
|
+
addEvidence = (evidence23, file, index2, fact) => {
|
|
25299
|
+
evidence23.push({ file: file.path, line: lineOf16(file.content, index2), fact });
|
|
25300
|
+
};
|
|
25301
|
+
readBundleIdentity = (files, modulePath, evidence23) => {
|
|
25302
|
+
const bndPath = modulePath ? `${modulePath}/bnd.bnd` : "bnd.bnd";
|
|
25303
|
+
const bnd = sourceAt(files, bndPath);
|
|
25304
|
+
if (!bnd) return null;
|
|
25305
|
+
const symbolic = /^Bundle-SymbolicName:\s*([^\r\n]+)/m.exec(bnd.content);
|
|
25306
|
+
if (!symbolic?.[1]?.trim()) return null;
|
|
25307
|
+
const version2 = /^Bundle-Version:\s*([^\r\n]+)/m.exec(bnd.content);
|
|
25308
|
+
addEvidence(evidence23, bnd, symbolic.index, `bundle symbolic name ${symbolic[1].trim()}`);
|
|
25309
|
+
if (version2?.[1]?.trim())
|
|
25310
|
+
addEvidence(evidence23, bnd, version2.index, `bundle version ${version2[1].trim()}`);
|
|
25311
|
+
return {
|
|
25312
|
+
symbolicName: symbolic[1].trim(),
|
|
25313
|
+
...version2?.[1]?.trim() ? { version: version2[1].trim() } : { version: null },
|
|
25314
|
+
file: bnd.path
|
|
25315
|
+
};
|
|
25316
|
+
};
|
|
25317
|
+
readPortalRelease = (files, modulePath, evidence23) => {
|
|
25318
|
+
const buildPath = modulePath ? `${modulePath}/build.gradle` : "build.gradle";
|
|
25319
|
+
const build2 = sourceAt(files, buildPath);
|
|
25320
|
+
if (!build2) return { value: null, conflicted: false };
|
|
25321
|
+
const content = maskComments(build2.content);
|
|
25322
|
+
const releases = /* @__PURE__ */ new Set();
|
|
25323
|
+
const patterns = [
|
|
25324
|
+
/group\s*:\s*["']com\.liferay\.portal["']\s*,\s*name\s*:\s*["']com\.liferay\.portal\.kernel["']\s*,\s*version\s*:\s*["'](\d+)\./g,
|
|
25325
|
+
/com\.liferay\.portal:com\.liferay\.portal\.kernel:(\d+)\./g
|
|
25326
|
+
];
|
|
25327
|
+
for (const pattern of patterns) {
|
|
25328
|
+
for (const coordinate of content.matchAll(pattern)) {
|
|
25329
|
+
const release = coordinate[1] === "2" ? "7.0" : coordinate[1] === "3" ? "7.1" : null;
|
|
25330
|
+
if (!release || coordinate.index === void 0) continue;
|
|
25331
|
+
releases.add(release);
|
|
25332
|
+
addEvidence(
|
|
25333
|
+
evidence23,
|
|
25334
|
+
build2,
|
|
25335
|
+
coordinate.index,
|
|
25336
|
+
`portal kernel ${coordinate[1]}.x -> Liferay ${release} candidate`
|
|
25337
|
+
);
|
|
25338
|
+
}
|
|
25339
|
+
}
|
|
25340
|
+
if (releases.size !== 1) return { value: null, conflicted: releases.size > 1 };
|
|
25341
|
+
const [value] = releases;
|
|
25342
|
+
return value ? { value, conflicted: false } : { value: null, conflicted: false };
|
|
25343
|
+
};
|
|
25344
|
+
readSourceProduct = (files, evidence23) => {
|
|
25345
|
+
const gradleProperties = files.find((file) => normalizedPath(file.path) === "gradle.properties");
|
|
25346
|
+
if (!gradleProperties) return { value: null, conflicted: false };
|
|
25347
|
+
const products = /* @__PURE__ */ new Set();
|
|
25348
|
+
const content = maskComments(gradleProperties.content);
|
|
25349
|
+
for (const product of content.matchAll(/^\s*liferay\.workspace\.product\s*=\s*([^\s#\r\n]+)/gm)) {
|
|
25350
|
+
const value2 = product[1]?.trim();
|
|
25351
|
+
if (!value2 || product.index === void 0) continue;
|
|
25352
|
+
products.add(value2);
|
|
25353
|
+
addEvidence(evidence23, gradleProperties, product.index, `workspace product ${value2}`);
|
|
25354
|
+
}
|
|
25355
|
+
if (products.size !== 1) return { value: null, conflicted: products.size > 1 };
|
|
25356
|
+
const [value] = products;
|
|
25357
|
+
return value ? { value, conflicted: false } : { value: null, conflicted: false };
|
|
25358
|
+
};
|
|
25359
|
+
readToolchain = (files, evidence23) => {
|
|
25360
|
+
const wrapper = files.find(
|
|
25361
|
+
(file) => normalizedPath(file.path) === "gradle/wrapper/gradle-wrapper.properties"
|
|
25362
|
+
);
|
|
25363
|
+
if (!wrapper) return { toolchain: "unknown", jdk: null };
|
|
25364
|
+
const distribution = /distributionUrl=.*gradle-(\d+(?:\.\d+){1,2})-(?:bin|all)\.zip/.exec(
|
|
25365
|
+
wrapper.content
|
|
25366
|
+
);
|
|
25367
|
+
if (distribution?.[1] !== "4.6") return { toolchain: "unknown", jdk: null };
|
|
25368
|
+
addEvidence(evidence23, wrapper, distribution.index, "Gradle 4.6 wrapper -> JDK 8 runner");
|
|
25369
|
+
return { toolchain: "gradle-4.6", jdk: 8 };
|
|
25370
|
+
};
|
|
25371
|
+
databaseVendorOf = (value) => {
|
|
25372
|
+
const normalized = value.toLowerCase();
|
|
25373
|
+
if (normalized.includes("mariadb")) return "mariadb";
|
|
25374
|
+
if (normalized.includes("postgresql") || normalized.includes("postgres")) return "postgres";
|
|
25375
|
+
if (normalized.includes("oracle")) return "oracle";
|
|
25376
|
+
return null;
|
|
25377
|
+
};
|
|
25378
|
+
readDatabase = (files) => {
|
|
25379
|
+
const evidence23 = [];
|
|
25380
|
+
const vendors = /* @__PURE__ */ new Set();
|
|
25381
|
+
const configFiles = files.filter((file) => {
|
|
25382
|
+
const path2 = normalizedPath(file.path).toLowerCase();
|
|
25383
|
+
return path2.endsWith("portal-ext.properties") || /(?:^|\/)osgi\/configs\/[^/]+\.(?:config|cfg)$/i.test(path2);
|
|
25384
|
+
});
|
|
25385
|
+
for (const file of configFiles) {
|
|
25386
|
+
const content = maskComments(file.content);
|
|
25387
|
+
const facts = [
|
|
25388
|
+
/(?:jdbc\.default\.(?:url|driverclassname)|jdbc\.url)\s*[=:]\s*([^\r\n#]+)/gi,
|
|
25389
|
+
/(?:jdbc:)?(mariadb|postgresql|oracle):/gi,
|
|
25390
|
+
/(?:org\.mariadb\.jdbc\.driver|org\.postgresql\.driver|oracle\.jdbc)/gi
|
|
25391
|
+
];
|
|
25392
|
+
for (const fact of facts) {
|
|
25393
|
+
for (const match of content.matchAll(fact)) {
|
|
25394
|
+
const vendor = databaseVendorOf(match[0]);
|
|
25395
|
+
if (!vendor || match.index === void 0) continue;
|
|
25396
|
+
vendors.add(vendor);
|
|
25397
|
+
addEvidence(evidence23, file, match.index, `portal database vendor ${vendor}`);
|
|
25398
|
+
}
|
|
25399
|
+
}
|
|
25400
|
+
}
|
|
25401
|
+
if (vendors.size === 1) {
|
|
25402
|
+
return { vendor: [...vendors][0], resolution: "source", evidence: evidence23 };
|
|
25403
|
+
}
|
|
25404
|
+
return { vendor: null, resolution: "unresolved", evidence: evidence23 };
|
|
25405
|
+
};
|
|
25406
|
+
isPortalConfigFile = (file) => {
|
|
25407
|
+
const path2 = normalizedPath(file.path).toLowerCase();
|
|
25408
|
+
return path2.endsWith("portal-ext.properties") || /(?:^|\/)osgi\/configs\/[^/]+\.(?:config|cfg)$/i.test(path2);
|
|
25409
|
+
};
|
|
25410
|
+
normalizeApplicationBase = (raw) => {
|
|
25411
|
+
const value = raw.trim().replace(/^['"]|['"]$/g, "");
|
|
25412
|
+
if (!value || value.includes("${")) return null;
|
|
25413
|
+
const prefixed = value.startsWith("/") ? value : `/${value}`;
|
|
25414
|
+
return prefixed === "/" ? prefixed : prefixed.replace(/\/+$/, "");
|
|
25415
|
+
};
|
|
25416
|
+
readApplicationBase = (files, modulePath) => {
|
|
25417
|
+
const evidence23 = [];
|
|
25418
|
+
const bases = /* @__PURE__ */ new Set();
|
|
25419
|
+
const modulePrefix = modulePath ? `${modulePath}/` : "";
|
|
25420
|
+
const candidates = files.filter((file) => {
|
|
25421
|
+
const path3 = normalizedPath(file.path);
|
|
25422
|
+
return isPortalConfigFile(file) || path3.endsWith(".java") && path3.startsWith(modulePrefix);
|
|
25423
|
+
});
|
|
25424
|
+
for (const file of candidates) {
|
|
25425
|
+
const content = maskComments(file.content);
|
|
25426
|
+
const facts = [
|
|
25427
|
+
/osgi\.jaxrs\.application\.base\s*[=:]\s*["']?([^"'\\\s,)};]+)/gi,
|
|
25428
|
+
/(?:JaxrsWhiteboardConstants\.)?JAX_RS_APPLICATION_BASE\s*\+\s*["']\s*=\s*([^"']+)["']/g,
|
|
25429
|
+
/@ApplicationPath\s*\(\s*["']([^"']+)["']\s*\)/g
|
|
25430
|
+
];
|
|
25431
|
+
for (const fact of facts) {
|
|
25432
|
+
for (const match of content.matchAll(fact)) {
|
|
25433
|
+
const base = normalizeApplicationBase(match[1] ?? "");
|
|
25434
|
+
if (!base || match.index === void 0) continue;
|
|
25435
|
+
bases.add(base);
|
|
25436
|
+
addEvidence(evidence23, file, match.index, `JAX-RS application base ${base}`);
|
|
25437
|
+
}
|
|
25438
|
+
}
|
|
25439
|
+
}
|
|
25440
|
+
if (bases.size !== 1) return { path: null, resolution: "unresolved", evidence: evidence23 };
|
|
25441
|
+
const [path2] = bases;
|
|
25442
|
+
return path2 ? { path: path2, resolution: "source", evidence: evidence23 } : { path: null, resolution: "unresolved", evidence: evidence23 };
|
|
25443
|
+
};
|
|
25444
|
+
readSearch = (files) => {
|
|
25445
|
+
const evidence23 = [];
|
|
25446
|
+
for (const file of files.filter(isPortalConfigFile)) {
|
|
25447
|
+
for (const match of maskComments(file.content).matchAll(/\belasticsearch\b/gi)) {
|
|
25448
|
+
if (match.index === void 0) continue;
|
|
25449
|
+
addEvidence(evidence23, file, match.index, "portal search service elasticsearch");
|
|
25450
|
+
}
|
|
25451
|
+
}
|
|
25452
|
+
return evidence23.length > 0 ? { kind: "elasticsearch", resolution: "source", evidence: evidence23 } : { kind: null, resolution: "unresolved", evidence: evidence23 };
|
|
25453
|
+
};
|
|
25454
|
+
detectLiferayRuntimeProfile = (files, module) => {
|
|
25455
|
+
const selected = module.selected;
|
|
25456
|
+
if (!selected || selected.launchMode !== "liferay-osgi") return null;
|
|
25457
|
+
const evidence23 = [];
|
|
25458
|
+
const portalReleaseRead = readPortalRelease(files, selected.path, evidence23);
|
|
25459
|
+
const sourceProductRead = readSourceProduct(files, evidence23);
|
|
25460
|
+
const portalRelease = portalReleaseRead.value;
|
|
25461
|
+
const sourceProduct = sourceProductRead.value;
|
|
25462
|
+
const { toolchain: gradleToolchain, jdk: requiredJdkMajor } = readToolchain(files, evidence23);
|
|
25463
|
+
const bundle = readBundleIdentity(files, selected.path, evidence23);
|
|
25464
|
+
const applicationBase = readApplicationBase(files, selected.path);
|
|
25465
|
+
const database = readDatabase(files);
|
|
25466
|
+
const search = readSearch(files);
|
|
25467
|
+
const compatibilityKey = portalRelease === "7.1" && requiredJdkMajor === 8 ? "portal-7-1-jdk8" : null;
|
|
25468
|
+
const blockers = [];
|
|
25469
|
+
const limitations = [];
|
|
25470
|
+
if (portalReleaseRead.conflicted)
|
|
25471
|
+
blockers.push("Conflicting literal com.liferay.portal.kernel releases were found.");
|
|
25472
|
+
else if (!portalRelease)
|
|
25473
|
+
blockers.push("No supported literal com.liferay.portal.kernel major was found.");
|
|
25474
|
+
if (sourceProductRead.conflicted)
|
|
25475
|
+
blockers.push("Conflicting literal liferay.workspace.product declarations were found.");
|
|
25476
|
+
if (requiredJdkMajor === null)
|
|
25477
|
+
blockers.push("No supported Gradle wrapper/JDK compatibility tuple was found.");
|
|
25478
|
+
if (!bundle) blockers.push("The selected module has no literal Bundle-SymbolicName in bnd.bnd.");
|
|
25479
|
+
if (!applicationBase.path)
|
|
25480
|
+
limitations.push("No deterministic JAX-RS application base was found.");
|
|
25481
|
+
if (!database.vendor)
|
|
25482
|
+
limitations.push(
|
|
25483
|
+
"Portal database vendor is unresolved; the operator-owned disposable profile will be used."
|
|
25484
|
+
);
|
|
25485
|
+
if (database.vendor === "oracle")
|
|
25486
|
+
blockers.push("Oracle is source-detected but has no supported disposable portal DB adapter.");
|
|
25487
|
+
if (!search.kind)
|
|
25488
|
+
limitations.push(
|
|
25489
|
+
"Portal search-service requirement is unresolved; route adapters remain not-tested."
|
|
25490
|
+
);
|
|
25491
|
+
if (!compatibilityKey)
|
|
25492
|
+
blockers.push("No supported closed portal compatibility key matches the source tuple.");
|
|
25493
|
+
blockers.push(
|
|
25494
|
+
"No operator-approved, digest-pinned portal image mapping is embedded in submitted source."
|
|
25495
|
+
);
|
|
25496
|
+
return {
|
|
25497
|
+
state: portalRelease !== null && requiredJdkMajor !== null && bundle !== null ? "candidate" : "unresolved",
|
|
25498
|
+
compatibilityKey,
|
|
25499
|
+
portalRelease,
|
|
25500
|
+
sourceProduct,
|
|
25501
|
+
gradleToolchain,
|
|
25502
|
+
requiredJdkMajor,
|
|
25503
|
+
bundle,
|
|
25504
|
+
applicationBase,
|
|
25505
|
+
database,
|
|
25506
|
+
search,
|
|
25507
|
+
evidence: evidence23,
|
|
25508
|
+
blockers,
|
|
25509
|
+
limitations
|
|
25510
|
+
};
|
|
25511
|
+
};
|
|
25276
25512
|
applyKafkaBrokerCoherence = (plan) => {
|
|
25277
25513
|
if (plan.harness.kafka !== "disposable-broker-required") return plan.boot;
|
|
25278
25514
|
const tier1KafkaKeys = [
|
|
@@ -25339,6 +25575,7 @@ ${window}`;
|
|
|
25339
25575
|
files,
|
|
25340
25576
|
options?.modulePath === void 0 ? void 0 : { modulePath: options.modulePath }
|
|
25341
25577
|
);
|
|
25578
|
+
const liferayRuntime = detectLiferayRuntimeProfile(files, module);
|
|
25342
25579
|
const harness = buildHarnessPlan(files, {
|
|
25343
25580
|
...options?.trustTier !== void 0 ? { trustTier: options.trustTier } : {},
|
|
25344
25581
|
eagerKafkaStartupJars: options?.eagerKafkaStartupJars ?? []
|
|
@@ -25377,6 +25614,7 @@ ${window}`;
|
|
|
25377
25614
|
schemaVersion: RUNTIME_PLAN_SCHEMA_VERSION,
|
|
25378
25615
|
note: PLAN_NOTE,
|
|
25379
25616
|
module,
|
|
25617
|
+
liferayRuntime,
|
|
25380
25618
|
harness,
|
|
25381
25619
|
dbSidecar,
|
|
25382
25620
|
schemaProvisioning,
|
|
@@ -25985,7 +26223,7 @@ ${todos.join("\n")}` : "";
|
|
|
25985
26223
|
cweId: "CWE-502"
|
|
25986
26224
|
};
|
|
25987
26225
|
MAX_EVIDENCE18 = 50;
|
|
25988
|
-
|
|
26226
|
+
lineOf17 = (content, index2) => {
|
|
25989
26227
|
let line2 = 1;
|
|
25990
26228
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
25991
26229
|
if (content[i] === "\n") line2++;
|
|
@@ -26031,7 +26269,7 @@ ${todos.join("\n")}` : "";
|
|
|
26031
26269
|
const { content, path: path2 } = f;
|
|
26032
26270
|
for (const { re, note, confidence } of UNSAFE_PATTERNS) {
|
|
26033
26271
|
for (const m of content.matchAll(re)) {
|
|
26034
|
-
hits.push({ file: path2, line:
|
|
26272
|
+
hits.push({ file: path2, line: lineOf17(content, m.index ?? 0), note, confidence });
|
|
26035
26273
|
}
|
|
26036
26274
|
}
|
|
26037
26275
|
}
|
|
@@ -26047,7 +26285,7 @@ ${todos.join("\n")}` : "";
|
|
|
26047
26285
|
firstSafeValidator = (javaFiles) => {
|
|
26048
26286
|
for (const f of javaFiles) {
|
|
26049
26287
|
const m = SAFE_VALIDATOR_RE.exec(f.content);
|
|
26050
|
-
if (m) return { file: f.path, line:
|
|
26288
|
+
if (m) return { file: f.path, line: lineOf17(f.content, m.index) };
|
|
26051
26289
|
}
|
|
26052
26290
|
return null;
|
|
26053
26291
|
};
|
|
@@ -26126,7 +26364,7 @@ ${todos.join("\n")}` : "";
|
|
|
26126
26364
|
cweId: "CWE-338"
|
|
26127
26365
|
};
|
|
26128
26366
|
MAX_EVIDENCE19 = 50;
|
|
26129
|
-
|
|
26367
|
+
lineOf18 = (content, index2) => {
|
|
26130
26368
|
let line2 = 1;
|
|
26131
26369
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
26132
26370
|
if (content[i] === "\n") line2++;
|
|
@@ -26200,7 +26438,7 @@ ${todos.join("\n")}` : "";
|
|
|
26200
26438
|
if (sec) {
|
|
26201
26439
|
hits.push({
|
|
26202
26440
|
file: path2,
|
|
26203
|
-
line:
|
|
26441
|
+
line: lineOf18(content, idx),
|
|
26204
26442
|
note: `${label} d\xF9ng cho gi\xE1 tr\u1ECB b\u1EA3o m\u1EADt "${sec[0]}" \u2014 PRNG \u0111o\xE1n \u0111\u01B0\u1EE3c (CWE-338); OTP/token/secret c\xF3 th\u1EC3 b\u1ECB suy \u0111o\xE1n/brute-force. D\xF9ng java.security.SecureRandom.`
|
|
26205
26443
|
});
|
|
26206
26444
|
continue;
|
|
@@ -26208,7 +26446,7 @@ ${todos.join("\n")}` : "";
|
|
|
26208
26446
|
if (reachesCookie(content, namesCarrying(content, stmt))) {
|
|
26209
26447
|
hits.push({
|
|
26210
26448
|
file: path2,
|
|
26211
|
-
line:
|
|
26449
|
+
line: lineOf18(content, idx),
|
|
26212
26450
|
note: `${label} sinh gi\xE1 tr\u1ECB \u0111\u01B0\u1EE3c \u0111\u01B0a v\xE0o Cookie \u2014 token/session \u0111o\xE1n \u0111\u01B0\u1EE3c (CWE-330), b\u1EA5t k\u1EC3 bi\u1EBFn t\xEAn g\xEC. D\xF9ng java.security.SecureRandom.`
|
|
26213
26451
|
});
|
|
26214
26452
|
}
|
|
@@ -26228,7 +26466,7 @@ ${todos.join("\n")}` : "";
|
|
|
26228
26466
|
for (const f of javaFiles) {
|
|
26229
26467
|
if (isTestSourcePath(f.path)) continue;
|
|
26230
26468
|
const m = SECURE_RANDOM_RE.exec(f.content);
|
|
26231
|
-
if (m) return { file: f.path, line:
|
|
26469
|
+
if (m) return { file: f.path, line: lineOf18(f.content, m.index) };
|
|
26232
26470
|
}
|
|
26233
26471
|
return null;
|
|
26234
26472
|
};
|
|
@@ -26306,7 +26544,7 @@ ${todos.join("\n")}` : "";
|
|
|
26306
26544
|
cweId: "CWE-345"
|
|
26307
26545
|
};
|
|
26308
26546
|
MAX_EVIDENCE20 = 50;
|
|
26309
|
-
|
|
26547
|
+
lineOf19 = (content, index2) => {
|
|
26310
26548
|
let line2 = 1;
|
|
26311
26549
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
26312
26550
|
if (content[i] === "\n") line2++;
|
|
@@ -26335,7 +26573,7 @@ ${todos.join("\n")}` : "";
|
|
|
26335
26573
|
for (const m of file.content.matchAll(re)) {
|
|
26336
26574
|
hits.push({
|
|
26337
26575
|
file: file.path,
|
|
26338
|
-
line:
|
|
26576
|
+
line: lineOf19(file.content, m.index ?? 0),
|
|
26339
26577
|
note: `${label} \u2014 kh\xF4ng th\u1EA5y ki\u1EC3m tra event.origin trong file; handler tin M\u1ECCI origin g\u1EEDi t\u1EDBi (CWE-345). Ki\u1EC3m event.origin so v\u1EDBi allowlist tr\u01B0\u1EDBc khi x\u1EED l\xFD event.data.`
|
|
26340
26578
|
});
|
|
26341
26579
|
}
|
|
@@ -26411,7 +26649,7 @@ ${todos.join("\n")}` : "";
|
|
|
26411
26649
|
};
|
|
26412
26650
|
MAX_EVIDENCE21 = 200;
|
|
26413
26651
|
MAX_PER_KIND = 100;
|
|
26414
|
-
|
|
26652
|
+
lineOf20 = (content, index2) => {
|
|
26415
26653
|
let line2 = 1;
|
|
26416
26654
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
26417
26655
|
if (content[i] === "\n") line2++;
|
|
@@ -26482,7 +26720,7 @@ ${todos.join("\n")}` : "";
|
|
|
26482
26720
|
kind: "route-guard",
|
|
26483
26721
|
name: m[1] ?? "",
|
|
26484
26722
|
file: path2,
|
|
26485
|
-
line:
|
|
26723
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26486
26724
|
note: "functional route guard c\xF3 type annotation (CanActivateFn/CanMatchFn/\u2026)"
|
|
26487
26725
|
});
|
|
26488
26726
|
guardDeclaringFiles.add(path2);
|
|
@@ -26492,7 +26730,7 @@ ${todos.join("\n")}` : "";
|
|
|
26492
26730
|
kind: "route-guard",
|
|
26493
26731
|
name: m[1] ?? "",
|
|
26494
26732
|
file: path2,
|
|
26495
|
-
line:
|
|
26733
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26496
26734
|
note: "export function theo quy \u01B0\u1EDBc tham s\u1ED1 guard (route, state)"
|
|
26497
26735
|
});
|
|
26498
26736
|
guardDeclaringFiles.add(path2);
|
|
@@ -26502,7 +26740,7 @@ ${todos.join("\n")}` : "";
|
|
|
26502
26740
|
kind: "route-guard",
|
|
26503
26741
|
name: m[1] ?? "",
|
|
26504
26742
|
file: path2,
|
|
26505
|
-
line:
|
|
26743
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26506
26744
|
note: "class implements CanActivate/CanMatch/CanDeactivate/CanLoad"
|
|
26507
26745
|
});
|
|
26508
26746
|
guardDeclaringFiles.add(path2);
|
|
@@ -26512,7 +26750,7 @@ ${todos.join("\n")}` : "";
|
|
|
26512
26750
|
kind: "route-guard",
|
|
26513
26751
|
name: m[0].trim(),
|
|
26514
26752
|
file: path2,
|
|
26515
|
-
line:
|
|
26753
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26516
26754
|
note: "Vue Router guard khai b\xE1o; c\u1EA7n \u0111\u1ED1i chi\u1EBFu route t\u1EDBi sink"
|
|
26517
26755
|
});
|
|
26518
26756
|
guardDeclaringFiles.add(path2);
|
|
@@ -26522,7 +26760,7 @@ ${todos.join("\n")}` : "";
|
|
|
26522
26760
|
kind: "http-interceptor",
|
|
26523
26761
|
name: m[1] ?? "",
|
|
26524
26762
|
file: path2,
|
|
26525
|
-
line:
|
|
26763
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26526
26764
|
note: "HttpInterceptorFn functional interceptor"
|
|
26527
26765
|
});
|
|
26528
26766
|
}
|
|
@@ -26531,7 +26769,7 @@ ${todos.join("\n")}` : "";
|
|
|
26531
26769
|
kind: "http-interceptor",
|
|
26532
26770
|
name: m[0].trim(),
|
|
26533
26771
|
file: path2,
|
|
26534
|
-
line:
|
|
26772
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26535
26773
|
note: "Axios interceptor \u0111\u0103ng k\xFD; c\u1EA7n \u0111\u1ED1i chi\u1EBFu HTTP flow t\u1EDBi sink"
|
|
26536
26774
|
});
|
|
26537
26775
|
}
|
|
@@ -26540,7 +26778,7 @@ ${todos.join("\n")}` : "";
|
|
|
26540
26778
|
kind: "http-interceptor",
|
|
26541
26779
|
name: `HTTP_INTERCEPTORS \u2192 ${m[1] ?? ""}`,
|
|
26542
26780
|
file: path2,
|
|
26543
|
-
line:
|
|
26781
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26544
26782
|
note: "DI binding v\xE0o token multi-provider HTTP_INTERCEPTORS"
|
|
26545
26783
|
});
|
|
26546
26784
|
}
|
|
@@ -26556,7 +26794,7 @@ ${todos.join("\n")}` : "";
|
|
|
26556
26794
|
kind: "http-interceptor",
|
|
26557
26795
|
name: m[1] ?? "",
|
|
26558
26796
|
file: path2,
|
|
26559
|
-
line:
|
|
26797
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26560
26798
|
note: "class implements HttpInterceptor + intercept() c\xF9ng file"
|
|
26561
26799
|
});
|
|
26562
26800
|
}
|
|
@@ -26566,7 +26804,7 @@ ${todos.join("\n")}` : "";
|
|
|
26566
26804
|
kind: "http-interceptor",
|
|
26567
26805
|
name: "HTTP_INTERCEPTORS",
|
|
26568
26806
|
file: path2,
|
|
26569
|
-
line:
|
|
26807
|
+
line: lineOf20(content, tokenMention),
|
|
26570
26808
|
note: "file tham chi\u1EBFu token HTTP_INTERCEPTORS (mention \u2014ch\u01B0a th\u1EA5y binding trong c\xF9ng file)"
|
|
26571
26809
|
});
|
|
26572
26810
|
}
|
|
@@ -26575,7 +26813,7 @@ ${todos.join("\n")}` : "";
|
|
|
26575
26813
|
kind: "sanitizer",
|
|
26576
26814
|
name: "DomSanitizer.sanitize",
|
|
26577
26815
|
file: path2,
|
|
26578
|
-
line:
|
|
26816
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26579
26817
|
note: "DomSanitizer.sanitize(SecurityContext\u2026, \u2026) \u2014ch\u1EE7 \u0111\u1ED9ng sanitize \u0111\xFAng ng\u1EEF c\u1EA3nh"
|
|
26580
26818
|
});
|
|
26581
26819
|
}
|
|
@@ -26587,7 +26825,7 @@ ${todos.join("\n")}` : "";
|
|
|
26587
26825
|
kind: "sanitizer",
|
|
26588
26826
|
name,
|
|
26589
26827
|
file: path2,
|
|
26590
|
-
line:
|
|
26828
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26591
26829
|
note: "helper escape/sanitize t\u1EF1 \u0111\u1ECBnh ngh\u0129a V\xC0 \u0111\u01B0\u1EE3c g\u1ECDi trong c\xF9ng file"
|
|
26592
26830
|
});
|
|
26593
26831
|
}
|
|
@@ -26597,7 +26835,7 @@ ${todos.join("\n")}` : "";
|
|
|
26597
26835
|
kind: "sanitizer",
|
|
26598
26836
|
name: m[0].replace(/\s*\($/, ""),
|
|
26599
26837
|
file: path2,
|
|
26600
|
-
line:
|
|
26838
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26601
26839
|
note: "bypassSecurityTrust* \u2014file t\u1EF1 qu\u1EA3n l\xFD trust (L\u01AFU \xDD: bypass L\xC0 b\u1EC1 m\u1EB7t r\u1EE7i ro, kh\xF4ng ph\u1EA3i l\u1EDBp ch\u1EAFn)"
|
|
26602
26840
|
});
|
|
26603
26841
|
}
|
|
@@ -26611,7 +26849,7 @@ ${todos.join("\n")}` : "";
|
|
|
26611
26849
|
kind: "url-check",
|
|
26612
26850
|
name: label.split(" \u2014")[0] ?? "",
|
|
26613
26851
|
file: path2,
|
|
26614
|
-
line:
|
|
26852
|
+
line: lineOf20(content, m.index ?? 0),
|
|
26615
26853
|
note: label
|
|
26616
26854
|
});
|
|
26617
26855
|
}
|
|
@@ -26660,7 +26898,7 @@ ${todos.join("\n")}` : "";
|
|
|
26660
26898
|
cweId: "CWE-1021"
|
|
26661
26899
|
};
|
|
26662
26900
|
MAX_EVIDENCE222 = 50;
|
|
26663
|
-
|
|
26901
|
+
lineOf21 = (content, index2) => {
|
|
26664
26902
|
let line2 = 1;
|
|
26665
26903
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
26666
26904
|
if (content[i] === "\n") line2++;
|
|
@@ -26678,7 +26916,7 @@ ${todos.join("\n")}` : "";
|
|
|
26678
26916
|
for (const m of content.matchAll(META_HTTP_EQUIV_RE)) {
|
|
26679
26917
|
hits.push({
|
|
26680
26918
|
file: path2,
|
|
26681
|
-
line:
|
|
26919
|
+
line: lineOf21(content, m.index ?? 0),
|
|
26682
26920
|
headerName: (m[1] ?? "").toLowerCase(),
|
|
26683
26921
|
headerValue: m[2] ?? ""
|
|
26684
26922
|
});
|
|
@@ -26688,7 +26926,7 @@ ${todos.join("\n")}` : "";
|
|
|
26688
26926
|
for (const m of content.matchAll(ADD_HEADER_RE)) {
|
|
26689
26927
|
hits.push({
|
|
26690
26928
|
file: path2,
|
|
26691
|
-
line:
|
|
26929
|
+
line: lineOf21(content, m.index ?? 0),
|
|
26692
26930
|
headerName: (m[1] ?? "").toLowerCase(),
|
|
26693
26931
|
headerValue: (m[2] ?? "").trim()
|
|
26694
26932
|
});
|
|
@@ -26816,7 +27054,7 @@ ${todos.join("\n")}` : "";
|
|
|
26816
27054
|
cweId: "CWE-614"
|
|
26817
27055
|
};
|
|
26818
27056
|
MAX_EVIDENCE23 = 50;
|
|
26819
|
-
|
|
27057
|
+
lineOf22 = (content, index2) => {
|
|
26820
27058
|
let line2 = 1;
|
|
26821
27059
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
26822
27060
|
if (content[i] === "\n") line2++;
|
|
@@ -26862,7 +27100,7 @@ ${todos.join("\n")}` : "";
|
|
|
26862
27100
|
if (!hasSameSite) missing.push("SameSite");
|
|
26863
27101
|
hits.push({
|
|
26864
27102
|
file: path2,
|
|
26865
|
-
line:
|
|
27103
|
+
line: lineOf22(content, m.index ?? 0),
|
|
26866
27104
|
note: `${cls.note} \u2014 THI\u1EBEU c\u1EDD ${missing.join(" v\xE0 ")} (HttpOnly v\xF4 ngh\u0129a t\u1EEB JS, ch\u1EC9 ghi limitation)`,
|
|
26867
27105
|
confidence: cls.confidence >= 85 ? 70 : 70
|
|
26868
27106
|
});
|
|
@@ -27019,7 +27257,7 @@ ${todos.join("\n")}` : "";
|
|
|
27019
27257
|
cweId: "CWE-611"
|
|
27020
27258
|
};
|
|
27021
27259
|
MAX_EVIDENCE24 = 50;
|
|
27022
|
-
|
|
27260
|
+
lineOf23 = (content, index2) => {
|
|
27023
27261
|
let line2 = 1;
|
|
27024
27262
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
27025
27263
|
if (content[i] === "\n") line2++;
|
|
@@ -27048,7 +27286,7 @@ ${todos.join("\n")}` : "";
|
|
|
27048
27286
|
for (const m of file.content.matchAll(re)) {
|
|
27049
27287
|
hits.push({
|
|
27050
27288
|
file: file.path,
|
|
27051
|
-
line:
|
|
27289
|
+
line: lineOf23(file.content, m.index ?? 0),
|
|
27052
27290
|
note: `${label} \u2014 parser XML KH\xD4NG th\u1EA5y hardening (disable DOCTYPE/external-entities/secure-processing) trong file; XML kh\xF4ng tin c\u1EADy c\xF3 th\u1EC3 ch\xE8n external entity \u0111\u1ECDc file n\u1ED9i b\u1ED9 / SSRF / billion-laughs (CWE-611).`
|
|
27053
27291
|
});
|
|
27054
27292
|
}
|
|
@@ -27127,7 +27365,7 @@ ${todos.join("\n")}` : "";
|
|
|
27127
27365
|
cweId: "CWE-295"
|
|
27128
27366
|
};
|
|
27129
27367
|
MAX_EVIDENCE25 = 50;
|
|
27130
|
-
|
|
27368
|
+
lineOf24 = (content, index2) => {
|
|
27131
27369
|
let line2 = 1;
|
|
27132
27370
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
27133
27371
|
if (content[i] === "\n") line2++;
|
|
@@ -27191,7 +27429,7 @@ ${todos.join("\n")}` : "";
|
|
|
27191
27429
|
if (isImportOrPackageLine(file.content, idx)) continue;
|
|
27192
27430
|
hits.push({
|
|
27193
27431
|
file: file.path,
|
|
27194
|
-
line:
|
|
27432
|
+
line: lineOf24(file.content, idx),
|
|
27195
27433
|
note: `${label} (CWE-295) \u2014 client TLS ch\u1EA5p nh\u1EADn cert/hostname kh\xF4ng h\u1EE3p l\u1EC7 \u2192 m\u1EDF \u0111\u01B0\u1EDDng t\u1EA5n c\xF4ng man-in-the-middle \u0111\u1ECDc/s\u1EEDa l\u01B0u l\u01B0\u1EE3ng \u0111\xE3 m\xE3 ho\xE1.`
|
|
27196
27434
|
});
|
|
27197
27435
|
}
|
|
@@ -27278,6 +27516,20 @@ ${todos.join("\n")}` : "";
|
|
|
27278
27516
|
const h = host.toLowerCase();
|
|
27279
27517
|
return h === "localhost" || h === "127.0.0.1" || h === "0.0.0.0" || h === "::1";
|
|
27280
27518
|
};
|
|
27519
|
+
UNREFERENCABLE_BASE_IMAGE = /* @__PURE__ */ new Set(["scratch"]);
|
|
27520
|
+
baseImageReference = (instruction) => instruction.trim().replace(/^FROM\s+/i, "").split(/\s+/).find((w) => w.length > 0 && !w.startsWith("--")) ?? "";
|
|
27521
|
+
FLOATING_TAG_RE = /(?:^|\.)[xX*]$|^\*$/;
|
|
27522
|
+
unpinnedBaseImageReason = (reference) => {
|
|
27523
|
+
const image = reference.trim();
|
|
27524
|
+
if (!image || UNREFERENCABLE_BASE_IMAGE.has(image.toLowerCase())) return null;
|
|
27525
|
+
if (image.includes("@")) return null;
|
|
27526
|
+
const lastSlash = image.lastIndexOf("/");
|
|
27527
|
+
const lastColon = image.lastIndexOf(":");
|
|
27528
|
+
const hasTag = lastColon > lastSlash;
|
|
27529
|
+
const tag = hasTag ? image.slice(lastColon + 1) : "";
|
|
27530
|
+
if (hasTag && tag && tag !== "latest" && !FLOATING_TAG_RE.test(tag)) return null;
|
|
27531
|
+
return hasTag && tag === "latest" ? `Base image \`${image}\` d\xF9ng tag \`latest\` \u2014 kh\xF4ng c\xF3 version r\xE0ng bu\u1ED9c, tag n\xE0y c\xF3 th\u1EC3 b\u1ECB \u0111\u1ED5i n\u1ED9i dung b\u1EA5t k\u1EF3 l\xFAc n\xE0o (CWE-427).` : `Base image \`${image}\` kh\xF4ng c\xF3 tag/digest \u2014 m\u1EB7c \u0111\u1ECBnh l\xE0 \`latest\`, ai \u0111\xF3 c\xF3 quy\u1EC1n \u0111\u1EA9y l\xEAn registry \u0111\u1EC1u thay \u0111\u01B0\u1EE3c image n\xE0y (CWE-427).`;
|
|
27532
|
+
};
|
|
27281
27533
|
auditDockerfileDependencyConfusion = (content, filePath) => {
|
|
27282
27534
|
const lines = content.split("\n");
|
|
27283
27535
|
const hits = [];
|
|
@@ -27311,6 +27563,20 @@ ${todos.join("\n")}` : "";
|
|
|
27311
27563
|
line: i + 1,
|
|
27312
27564
|
reason: "Dockerfile c\u1EA5u h\xECnh kho th\u01B0 vi\u1EC7n (registry) qua giao th\u1EE9c HTTP kh\xF4ng m\xE3 h\xF3a (cleartext) \u2014 CWE-319."
|
|
27313
27565
|
});
|
|
27566
|
+
continue;
|
|
27567
|
+
}
|
|
27568
|
+
if (/^FROM\s+\S/i.test(trimmed)) {
|
|
27569
|
+
const reason = unpinnedBaseImageReason(baseImageReference(trimmed));
|
|
27570
|
+
if (reason) {
|
|
27571
|
+
hits.push({
|
|
27572
|
+
file: filePath,
|
|
27573
|
+
line: i + 1,
|
|
27574
|
+
reason,
|
|
27575
|
+
severity: "warning",
|
|
27576
|
+
confidence: 75,
|
|
27577
|
+
suggestion: "Ghim base image b\u1EB1ng digest b\u1EA5t bi\u1EBFn (`image@sha256:\u2026`) ho\u1EB7c \xEDt nh\u1EA5t m\u1ED9t tag c\u1EE5 th\u1EC3 kh\xF4ng ph\u1EA3i `latest`; v\u1EDBi registry n\u1ED9i b\u1ED9, b\u1EADt immutability/tag protection."
|
|
27578
|
+
});
|
|
27579
|
+
}
|
|
27314
27580
|
}
|
|
27315
27581
|
}
|
|
27316
27582
|
return hits;
|
|
@@ -27472,7 +27738,7 @@ ${todos.join("\n")}` : "";
|
|
|
27472
27738
|
cweId: "CWE-644"
|
|
27473
27739
|
};
|
|
27474
27740
|
MAX_EVIDENCE26 = 50;
|
|
27475
|
-
|
|
27741
|
+
lineOf26 = (content, index2) => {
|
|
27476
27742
|
let line2 = 1;
|
|
27477
27743
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
27478
27744
|
if (content[i] === "\n") line2++;
|
|
@@ -27519,7 +27785,7 @@ ${todos.join("\n")}` : "";
|
|
|
27519
27785
|
for (const m of content.matchAll(re)) {
|
|
27520
27786
|
const dot = content.lastIndexOf(".", (m.index ?? 0) + m[0].indexOf("get"));
|
|
27521
27787
|
if (!isRequestReceiver(content, receiverOf(content, dot))) continue;
|
|
27522
|
-
hits.push({ file: path2, line:
|
|
27788
|
+
hits.push({ file: path2, line: lineOf26(content, m.index ?? 0), note, confidence });
|
|
27523
27789
|
}
|
|
27524
27790
|
}
|
|
27525
27791
|
}
|
|
@@ -27619,7 +27885,7 @@ ${todos.join("\n")}` : "";
|
|
|
27619
27885
|
MINUTES: 60,
|
|
27620
27886
|
HOURS: 3600
|
|
27621
27887
|
};
|
|
27622
|
-
|
|
27888
|
+
lineOf27 = (content, index2) => content.slice(0, index2).split("\n").length;
|
|
27623
27889
|
isOtpLifetimeName = (name) => hasOtpToken(name) && LIFETIME_TOKEN_RE.test(name);
|
|
27624
27890
|
configRank = (path2) => /application-prod/i.test(path2) ? 0 : 1;
|
|
27625
27891
|
inconclusive = (note, limitation) => (
|
|
@@ -27706,7 +27972,7 @@ ${todos.join("\n")}` : "";
|
|
|
27706
27972
|
cweId: "CWE-521"
|
|
27707
27973
|
};
|
|
27708
27974
|
MAX_EVIDENCE27 = 50;
|
|
27709
|
-
|
|
27975
|
+
lineOf28 = (content, index2) => {
|
|
27710
27976
|
let line2 = 1;
|
|
27711
27977
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
27712
27978
|
if (content[i] === "\n") line2++;
|
|
@@ -27791,7 +28057,7 @@ ${todos.join("\n")}` : "";
|
|
|
27791
28057
|
const field3 = m[1];
|
|
27792
28058
|
if (!field3 || !isPasswordName(field3)) continue;
|
|
27793
28059
|
const block = precedingBlock3(file.content, m.index ?? 0);
|
|
27794
|
-
const line2 =
|
|
28060
|
+
const line2 = lineOf28(file.content, m.index ?? 0);
|
|
27795
28061
|
const sized = SIZE_MIN_RE.exec(block);
|
|
27796
28062
|
if (sized?.[1]) {
|
|
27797
28063
|
sites.push({
|
|
@@ -27823,7 +28089,7 @@ ${todos.join("\n")}` : "";
|
|
|
27823
28089
|
if (!name || !min || !isPasswordName(name)) continue;
|
|
27824
28090
|
sites.push({
|
|
27825
28091
|
file: file.path,
|
|
27826
|
-
line:
|
|
28092
|
+
line: lineOf28(file.content, m.index ?? 0),
|
|
27827
28093
|
field: name,
|
|
27828
28094
|
min: Number(min),
|
|
27829
28095
|
how: `ki\u1EC3m tra t\u01B0\u1EDDng minh \`${name}.length()\` v\u1EDBi ng\u01B0\u1EE1ng ${min}`
|
|
@@ -27846,7 +28112,7 @@ ${todos.join("\n")}` : "";
|
|
|
27846
28112
|
const hits = [];
|
|
27847
28113
|
for (const { re, label } of POLICY_SURFACE_PATTERNS) {
|
|
27848
28114
|
const index2 = firstUsageIndex(file.content, re);
|
|
27849
|
-
if (index2 !== null) hits.push({ file: file.path, line:
|
|
28115
|
+
if (index2 !== null) hits.push({ file: file.path, line: lineOf28(file.content, index2), label });
|
|
27850
28116
|
}
|
|
27851
28117
|
return hits;
|
|
27852
28118
|
};
|
|
@@ -27971,7 +28237,7 @@ ${todos.join("\n")}` : "";
|
|
|
27971
28237
|
PASSWORD_ONLY_RE = /sai\s+mật\s+khẩu|mật\s+khẩu\s+(?:không\s+đúng|không\s+chính\s+xác|sai)|wrong\s+password|incorrect\s+password|bad\s+password/i;
|
|
27972
28238
|
COMBINED_RE = /(?:tên\s+đăng\s+nhập|tài\s+khoản|người\s+dùng)\s+(?:hoặc|hay|\/)\s*mật\s+khẩu|thông\s+tin\s+đăng\s+nhập\s+không|thông\s+tin\s+xác\s+thực\s+không|username\s+or\s+password|invalid\s+credentials|bad\s+credentials/i;
|
|
27973
28239
|
STRING_LITERAL_RE2 = /"((?:[^"\\\n]|\\.)*)"/g;
|
|
27974
|
-
|
|
28240
|
+
lineOf29 = (content, index2) => {
|
|
27975
28241
|
let line2 = 1;
|
|
27976
28242
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
27977
28243
|
if (content[i] === "\n") line2++;
|
|
@@ -27984,7 +28250,7 @@ ${todos.join("\n")}` : "";
|
|
|
27984
28250
|
for (const m of content.matchAll(STRING_LITERAL_RE2)) {
|
|
27985
28251
|
const text2 = m[1];
|
|
27986
28252
|
if (!text2) continue;
|
|
27987
|
-
const line2 =
|
|
28253
|
+
const line2 = lineOf29(content, m.index ?? 0);
|
|
27988
28254
|
if (COMBINED_RE.test(text2)) {
|
|
27989
28255
|
combined.push({
|
|
27990
28256
|
file: file.path,
|
|
@@ -28110,7 +28376,7 @@ ${todos.join("\n")}` : "";
|
|
|
28110
28376
|
label: "g\u1ECDi logout endpoint c\u1EE7a identity provider (thu h\u1ED3i refresh token)"
|
|
28111
28377
|
}
|
|
28112
28378
|
];
|
|
28113
|
-
|
|
28379
|
+
lineOf30 = (content, index2) => {
|
|
28114
28380
|
let line2 = 1;
|
|
28115
28381
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
28116
28382
|
if (content[i] === "\n") line2++;
|
|
@@ -28126,7 +28392,7 @@ ${todos.join("\n")}` : "";
|
|
|
28126
28392
|
if (m) {
|
|
28127
28393
|
hits.push({
|
|
28128
28394
|
file: file.path,
|
|
28129
|
-
line:
|
|
28395
|
+
line: lineOf30(content, m.index),
|
|
28130
28396
|
note: `${label} \u2014 b\u1EB1ng ch\u1EE9ng phi\xEAn b\u1ECB hu\u1EF7 \u1EDF SERVER, kh\xF4ng ch\u1EC9 xo\xE1 token ph\xEDa client.`
|
|
28131
28397
|
});
|
|
28132
28398
|
}
|
|
@@ -28197,7 +28463,7 @@ ${todos.join("\n")}` : "";
|
|
|
28197
28463
|
dedupeSort3(
|
|
28198
28464
|
endpointFiles.map((f) => ({
|
|
28199
28465
|
file: f.path,
|
|
28200
|
-
line:
|
|
28466
|
+
line: lineOf30(f.content, f.content.search(LOGOUT_ENDPOINT_RE)),
|
|
28201
28467
|
note: "Endpoint \u0111\u0103ng xu\u1EA5t \u2014 nh\u01B0ng TO\xC0N B\u1ED8 m\xE3 \u0111\xE3 soi kh\xF4ng c\xF3 b\u1EA5t k\u1EF3 c\u01A1 ch\u1EBF hu\u1EF7 phi\xEAn/token ph\xEDa server n\xE0o."
|
|
28202
28468
|
}))
|
|
28203
28469
|
).map((h) => evidenceOf7(h, 70)),
|
|
@@ -28235,7 +28501,7 @@ ${todos.join("\n")}` : "";
|
|
|
28235
28501
|
label: "rate limiter c\u1EE7a th\u01B0 vi\u1EC7n (resilience4j / Bucket4j)"
|
|
28236
28502
|
}
|
|
28237
28503
|
];
|
|
28238
|
-
|
|
28504
|
+
lineOf31 = (content, index2) => {
|
|
28239
28505
|
let line2 = 1;
|
|
28240
28506
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
28241
28507
|
if (content[i] === "\n") line2++;
|
|
@@ -28246,7 +28512,7 @@ ${todos.join("\n")}` : "";
|
|
|
28246
28512
|
re.lastIndex = 0;
|
|
28247
28513
|
const m = re.exec(content);
|
|
28248
28514
|
re.lastIndex = 0;
|
|
28249
|
-
return m ? { file: file.path, line:
|
|
28515
|
+
return m ? { file: file.path, line: lineOf31(content, m.index), note } : void 0;
|
|
28250
28516
|
};
|
|
28251
28517
|
dedupeSort4 = (hits) => [...hits].sort((a, b) => a.file === b.file ? a.line - b.line : a.file < b.file ? -1 : 1).filter((h, i, arr) => i === arr.findIndex((x) => x.file === h.file && x.line === h.line)).slice(0, MAX_EVIDENCE30);
|
|
28252
28518
|
evidenceOf8 = (hit, confidence) => ({
|
|
@@ -28340,7 +28606,7 @@ ${todos.join("\n")}` : "";
|
|
|
28340
28606
|
{ re: URI_TAIL_RE, sinkId: "spring/web-client-ssrf", label: "l\u1EDDi g\u1ECDi .uri() \u0111\u1EB7t \u0111\xEDch request" },
|
|
28341
28607
|
{ re: OPEN_CONNECTION_RE, sinkId: "spring/url-ssrf", label: "m\u1EDF k\u1EBFt n\u1ED1i ra URL" }
|
|
28342
28608
|
];
|
|
28343
|
-
|
|
28609
|
+
lineOf32 = (content, index2) => {
|
|
28344
28610
|
let line2 = 1;
|
|
28345
28611
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
28346
28612
|
if (content[i] === "\n") line2++;
|
|
@@ -28358,7 +28624,7 @@ ${todos.join("\n")}` : "";
|
|
|
28358
28624
|
for (let m = re.exec(f.content); m !== null; m = re.exec(f.content)) {
|
|
28359
28625
|
evidence23.push({
|
|
28360
28626
|
file: f.path,
|
|
28361
|
-
line:
|
|
28627
|
+
line: lineOf32(f.content, m.index),
|
|
28362
28628
|
sinkId,
|
|
28363
28629
|
sourceIds: [],
|
|
28364
28630
|
confidence: 60,
|
|
@@ -29134,7 +29400,7 @@ ${todos.join("\n")}` : "";
|
|
|
29134
29400
|
if (constructedType === void 0) return "existing";
|
|
29135
29401
|
return loadedTypes.has(constructedType) ? "entity-copy" : "fresh-object";
|
|
29136
29402
|
};
|
|
29137
|
-
|
|
29403
|
+
lineOf33 = (content, index2) => {
|
|
29138
29404
|
let line2 = 1;
|
|
29139
29405
|
for (let i = 0; i < index2 && i < content.length; i += 1) if (content[i] === "\n") line2 += 1;
|
|
29140
29406
|
return line2;
|
|
@@ -29158,8 +29424,8 @@ ${todos.join("\n")}` : "";
|
|
|
29158
29424
|
if (name !== void 0 && open2 >= 0) {
|
|
29159
29425
|
out.push({
|
|
29160
29426
|
name,
|
|
29161
|
-
line:
|
|
29162
|
-
endLine:
|
|
29427
|
+
line: lineOf33(masked, m.index + 1),
|
|
29428
|
+
endLine: lineOf33(masked, Math.min(i, masked.length - 1)),
|
|
29163
29429
|
body: masked.slice(open2, Math.min(i + 1, masked.length)),
|
|
29164
29430
|
bodyStart: open2
|
|
29165
29431
|
});
|
|
@@ -29195,7 +29461,7 @@ ${masked}`;
|
|
|
29195
29461
|
const receiver = c[1] ?? "";
|
|
29196
29462
|
const setter = c[2] ?? "";
|
|
29197
29463
|
const arg = (c[3] ?? "").trim();
|
|
29198
|
-
const line2 =
|
|
29464
|
+
const line2 = lineOf33(masked, method.bodyStart + c.index);
|
|
29199
29465
|
if (HTTP_STATUS_RECEIVER.test(receiver) || HTTP_STATUS_ARG.test(arg)) {
|
|
29200
29466
|
if (httpExcluded.length < 3) {
|
|
29201
29467
|
httpExcluded.push(`${receiver}.${setter}(${arg.slice(0, 28)})`);
|
|
@@ -29274,7 +29540,21 @@ ${masked}`;
|
|
|
29274
29540
|
"spring-boot/security-sensitive-data-risk": "Sensitive Data Exposure (AI)",
|
|
29275
29541
|
"spring-boot/io-boundary-risk": "R\u1EE7i ro bi\xEAn filesystem/HTTP/queue (AI)",
|
|
29276
29542
|
"angular/route-permission-flow": "Route/permission/UI action thi\u1EBFu guard (AI)",
|
|
29277
|
-
"angular/cross-feature-route-permission-drift": "Guard route l\u1EC7ch nhau gi\u1EEFa module (AI)"
|
|
29543
|
+
"angular/cross-feature-route-permission-drift": "Guard route l\u1EC7ch nhau gi\u1EEFa module (AI)",
|
|
29544
|
+
// Fortify coverage sweep (2026-10-01): these eight map one-to-one onto Fortify categories in
|
|
29545
|
+
// the Ecabinet CTO report. Seven already existed and matched, but sat outside both fold tables
|
|
29546
|
+
// — `cs assess` ran 18 ids and none of them were here, so those categories reported nothing at
|
|
29547
|
+
// all. The eighth (`dockerfile-dependency-confusion`) existed but could not match its category
|
|
29548
|
+
// until the base-image pinning check was added. None declares `checklistIds`, which is exactly
|
|
29549
|
+
// the contract this list exists for.
|
|
29550
|
+
"general/dockerfile-no-root-user": "Docker ch\u1EA1y v\u1EDBi quy\u1EC1n root (thi\u1EBFu ch\u1EC9 th\u1ECB USER)",
|
|
29551
|
+
"general/dockerfile-dependency-confusion": "Dependency Confusion / base image kh\xF4ng pin version",
|
|
29552
|
+
"general/no-insecure-external-link": "Li\xEAn k\u1EBFt ngo\xE0i b\u1ED9 qua HTTP cleartext",
|
|
29553
|
+
"general/no-insecure-password-submission": "Submit m\u1EADt kh\u1EA9u qua HTTP cleartext ho\u1EB7c GET",
|
|
29554
|
+
"general/no-empty-encryption-key": "Kh\xF3a m\xE3 h\xF3a r\u1ED7ng",
|
|
29555
|
+
"general/sensitive-output-exposure": "D\u1EEF li\u1EC7u nh\u1EA1y c\u1EA3m l\u1ECDt v\xE0o log/console",
|
|
29556
|
+
"general/sensitive-exception-response": "D\u1EEF li\u1EC7u nh\u1EA1y c\u1EA3m l\u1ECDt v\xE0o exception/response",
|
|
29557
|
+
"spring-boot/no-devtools-in-production": "Spring Boot DevTools b\u1EADt trong build/prod"
|
|
29278
29558
|
};
|
|
29279
29559
|
EXTRA_FINDING_RULE_IDS = Object.freeze([
|
|
29280
29560
|
"general/no-sensitive-string-materialization",
|
|
@@ -29284,7 +29564,15 @@ ${masked}`;
|
|
|
29284
29564
|
"general/no-reflective-access-override",
|
|
29285
29565
|
"general/java-weak-randomness",
|
|
29286
29566
|
"spring-boot/no-sql-string-concat",
|
|
29287
|
-
"spring-boot/no-trust-boundary-violation"
|
|
29567
|
+
"spring-boot/no-trust-boundary-violation",
|
|
29568
|
+
"general/dockerfile-no-root-user",
|
|
29569
|
+
"general/dockerfile-dependency-confusion",
|
|
29570
|
+
"general/no-insecure-external-link",
|
|
29571
|
+
"general/no-insecure-password-submission",
|
|
29572
|
+
"general/no-empty-encryption-key",
|
|
29573
|
+
"general/sensitive-output-exposure",
|
|
29574
|
+
"general/sensitive-exception-response",
|
|
29575
|
+
"spring-boot/no-devtools-in-production"
|
|
29288
29576
|
]);
|
|
29289
29577
|
EXTRA_AI_RULE_IDS = Object.freeze([
|
|
29290
29578
|
"spring-boot/security-redirect-risk",
|
|
@@ -29522,7 +29810,7 @@ ${masked}`;
|
|
|
29522
29810
|
cweId: "CWE-307"
|
|
29523
29811
|
};
|
|
29524
29812
|
MAX_EVIDENCE34 = 50;
|
|
29525
|
-
|
|
29813
|
+
lineOf34 = (content, index2) => {
|
|
29526
29814
|
let line2 = 1;
|
|
29527
29815
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
29528
29816
|
if (content[i] === "\n") line2++;
|
|
@@ -29571,7 +29859,7 @@ ${masked}`;
|
|
|
29571
29859
|
if (!name || !LIMIT_NAME_RE.test(name)) continue;
|
|
29572
29860
|
hits.push({
|
|
29573
29861
|
file: file.path,
|
|
29574
|
-
line:
|
|
29862
|
+
line: lineOf34(content, m.index ?? 0),
|
|
29575
29863
|
note: `\`${name}\` m\u1EB7c \u0111\u1ECBnh = MAX_VALUE \u2014 kh\xF4ng b\u1ED9 \u0111\u1EBFm n\xE0o ch\u1EA1m t\u1EDBi, n\xEAn guard so v\u1EDBi n\xF3 KH\xD4NG BAO GI\u1EDC \u0111\xFAng: nh\xE1nh n\xE0y ch\u1EA1y l\xE0 m\u1EA5t h\u1EB3n gi\u1EDBi h\u1EA1n \u0111\u0103ng nh\u1EADp sai (CWE-636 fail-open).`
|
|
29576
29864
|
});
|
|
29577
29865
|
}
|
|
@@ -29584,7 +29872,7 @@ ${masked}`;
|
|
|
29584
29872
|
for (const { re, label, needsLoginContext } of patterns) {
|
|
29585
29873
|
re.lastIndex = 0;
|
|
29586
29874
|
for (const m of content.matchAll(re)) {
|
|
29587
|
-
const line2 =
|
|
29875
|
+
const line2 = lineOf34(content, m.index ?? 0);
|
|
29588
29876
|
if (needsLoginContext && !nearLoginContext(lines, line2)) continue;
|
|
29589
29877
|
if (ISSUANCE_NAME_RE.test(m[0])) continue;
|
|
29590
29878
|
hits.push({
|
|
@@ -33456,8 +33744,11 @@ ${bodyText}` : headerText;
|
|
|
33456
33744
|
return noHash.length > 0 ? noHash : "/";
|
|
33457
33745
|
};
|
|
33458
33746
|
stripTrailingSlash = (p) => p.length > 1 ? p.replace(/\/+$/, "") : p;
|
|
33459
|
-
pathMatches = (alertPath, targetPath) => {
|
|
33460
|
-
|
|
33747
|
+
pathMatches = (alertPath, targetPath, routePrefix) => {
|
|
33748
|
+
if (routePrefix && alertPath !== routePrefix && !alertPath.startsWith(`${routePrefix}/`))
|
|
33749
|
+
return false;
|
|
33750
|
+
const mapped = routePrefix ? alertPath.slice(routePrefix.length) || "/" : alertPath;
|
|
33751
|
+
const a = stripTrailingSlash(mapped).split("/");
|
|
33461
33752
|
const t = stripTrailingSlash(targetPath).split("/");
|
|
33462
33753
|
if (a.length !== t.length) return false;
|
|
33463
33754
|
for (let i = 0; i < t.length; i++) {
|
|
@@ -33468,26 +33759,29 @@ ${bodyText}` : headerText;
|
|
|
33468
33759
|
return true;
|
|
33469
33760
|
};
|
|
33470
33761
|
methodMatches = (alertMethod, targetMethod) => alertMethod.toUpperCase() === targetMethod.toUpperCase();
|
|
33471
|
-
injectionMatches = (alert, target) => {
|
|
33472
|
-
if (target.injectionKind === "path")
|
|
33473
|
-
|
|
33762
|
+
injectionMatches = (alert, target, routePrefix) => {
|
|
33763
|
+
if (target.injectionKind === "path")
|
|
33764
|
+
return pathMatches(pathOf(alert.url), target.path, routePrefix);
|
|
33765
|
+
return alert.param !== void 0 && alert.param.length > 0 && alert.param === target.injectionName && routeMatchesOrUnknown(alert, target, routePrefix);
|
|
33474
33766
|
};
|
|
33475
|
-
routeMatchesOrUnknown = (alert, target) => {
|
|
33767
|
+
routeMatchesOrUnknown = (alert, target, routePrefix) => {
|
|
33476
33768
|
if (alert.url.trim().length === 0) return true;
|
|
33477
|
-
return pathMatches(pathOf(alert.url), target.path);
|
|
33769
|
+
return pathMatches(pathOf(alert.url), target.path, routePrefix);
|
|
33478
33770
|
};
|
|
33479
|
-
alertMatchesTarget = (alert, target) => alert.scanRuleId === target.scanRuleId && methodMatches(alert.method, target.httpMethod) && injectionMatches(alert, target);
|
|
33771
|
+
alertMatchesTarget = (alert, target, routePrefix) => alert.scanRuleId === target.scanRuleId && methodMatches(alert.method, target.httpMethod) && injectionMatches(alert, target, routePrefix);
|
|
33480
33772
|
queryHasParam = (query, name) => query.split("&").some((kv) => (kv.split("=", 1)[0] ?? "") === name);
|
|
33481
|
-
messageMatchesSurface = (msg, target) => {
|
|
33773
|
+
messageMatchesSurface = (msg, target, routePrefix) => {
|
|
33482
33774
|
if (!methodMatches(msg.method, target.httpMethod)) return false;
|
|
33483
|
-
if (!pathMatches(msg.path, target.path)) return false;
|
|
33775
|
+
if (!pathMatches(msg.path, target.path, routePrefix)) return false;
|
|
33484
33776
|
if (target.injectionKind === "query") return queryHasParam(msg.query, target.injectionName);
|
|
33485
33777
|
return true;
|
|
33486
33778
|
};
|
|
33487
|
-
computeDastCoverage = (targets, messages, scanCompleted) => {
|
|
33779
|
+
computeDastCoverage = (targets, messages, scanCompleted, routePrefix) => {
|
|
33488
33780
|
const coverage = /* @__PURE__ */ new Map();
|
|
33489
33781
|
for (const target of targets) {
|
|
33490
|
-
const requestCount = messages.filter(
|
|
33782
|
+
const requestCount = messages.filter(
|
|
33783
|
+
(m) => messageMatchesSurface(m, target, routePrefix)
|
|
33784
|
+
).length;
|
|
33491
33785
|
coverage.set(target.executionTargetId, classifyDastCoverage({ requestCount, scanCompleted }));
|
|
33492
33786
|
}
|
|
33493
33787
|
return coverage;
|
|
@@ -33515,7 +33809,7 @@ ${bodyText}` : headerText;
|
|
|
33515
33809
|
for (let i = 0; i < parsed.alerts.length; i++) {
|
|
33516
33810
|
const alert = parsed.alerts[i];
|
|
33517
33811
|
if (!alert) continue;
|
|
33518
|
-
const hits = manifest.targets.filter((t) => alertMatchesTarget(alert, t));
|
|
33812
|
+
const hits = manifest.targets.filter((t) => alertMatchesTarget(alert, t, options.routePrefix));
|
|
33519
33813
|
if (hits.length === 0) continue;
|
|
33520
33814
|
matchedAlerts.add(i);
|
|
33521
33815
|
const unambiguous = hits.length === 1;
|
|
@@ -33576,7 +33870,12 @@ ${bodyText}` : headerText;
|
|
|
33576
33870
|
...parsed.reportInstant !== void 0 ? { reportInstant: parsed.reportInstant } : {},
|
|
33577
33871
|
...latestMessageAt !== void 0 ? { latestMessageAt } : {}
|
|
33578
33872
|
}) : void 0;
|
|
33579
|
-
const coverageMap = options.messages !== void 0 && coverageProv?.withdraw !== true ? computeDastCoverage(
|
|
33873
|
+
const coverageMap = options.messages !== void 0 && coverageProv?.withdraw !== true ? computeDastCoverage(
|
|
33874
|
+
manifest.targets,
|
|
33875
|
+
options.messages,
|
|
33876
|
+
options.scanCompleted ?? true,
|
|
33877
|
+
options.routePrefix
|
|
33878
|
+
) : void 0;
|
|
33580
33879
|
const withCoverage = (r) => {
|
|
33581
33880
|
const c = coverageMap?.get(r.executionTargetId);
|
|
33582
33881
|
return c !== void 0 ? { ...r, coverage: c } : r;
|
|
@@ -33883,7 +34182,7 @@ ${bodyText}` : headerText;
|
|
|
33883
34182
|
MAX_EVIDENCE35 = 50;
|
|
33884
34183
|
OWNER_SCOPED_FINDER = /\bfindByIdAnd[A-Za-z]*(?:UserId|CreatedBy|CreatedUser|OwnerId|Owner|Username)[A-Za-z]*\s*\(/;
|
|
33885
34184
|
REPOSITORY_DECL = /\binterface\s+([A-Za-z_$][\w$]*Repository)\b/;
|
|
33886
|
-
|
|
34185
|
+
lineOf35 = (content, index2) => content.slice(0, index2).split("\n").length;
|
|
33887
34186
|
fieldNameFor = (typeName) => typeName.charAt(0).toLowerCase() + typeName.slice(1);
|
|
33888
34187
|
collectOwnerScopedRepositories = (files) => {
|
|
33889
34188
|
const found = /* @__PURE__ */ new Set();
|
|
@@ -33929,7 +34228,7 @@ ${bodyText}` : headerText;
|
|
|
33929
34228
|
if (!pathParams.has(m[3] ?? "")) continue;
|
|
33930
34229
|
hits.push({
|
|
33931
34230
|
file: file.path,
|
|
33932
|
-
line:
|
|
34231
|
+
line: lineOf35(file.content, body.start + (m.index ?? 0)),
|
|
33933
34232
|
note: `\`${m[1]}.\u2026${m[2]}(${m[3]})\` trong ${ep.httpMethod} ${ep.path} \u2014 t\u1EA3i \u0111\u1ED1i t\u01B0\u1EE3ng theo id tr\xEAn \u0111\u01B0\u1EDDng d\u1EABn m\xE0 handler kh\xF4ng g\u1ECDi ki\u1EC3m quy\u1EC1n \u0111\u1ED1i t\u01B0\u1EE3ng n\xE0o (\`hasResource\`/\`isAdmin\`/\`hasPermission\u2026\`; \`isAuth\` ch\u1EC9 l\xE0 x\xE1c th\u1EF1c)`
|
|
33934
34233
|
});
|
|
33935
34234
|
break;
|
|
@@ -33951,7 +34250,7 @@ ${bodyText}` : headerText;
|
|
|
33951
34250
|
while (index2 !== -1) {
|
|
33952
34251
|
hits.push({
|
|
33953
34252
|
file: file.path,
|
|
33954
|
-
line:
|
|
34253
|
+
line: lineOf35(file.content, index2),
|
|
33955
34254
|
note: `\`${needle}\u2026)\` \u2014 \`${repository}\` khai finder r\xE0ng bu\u1ED9c ch\u1EE7 s\u1EDF h\u1EEFu (\`findByIdAnd\u2026\`) nh\u01B0ng ch\u1ED7 n\xE0y l\u1EA5y theo id tr\u1EA7n`
|
|
33956
34255
|
});
|
|
33957
34256
|
index2 = file.content.indexOf(needle, index2 + 1);
|
|
@@ -34648,7 +34947,7 @@ ${bodyText}` : headerText;
|
|
|
34648
34947
|
ACTIVE_CONTENT_EXTENSION = /["'](svg|html?|xhtml|xml)["']/gi;
|
|
34649
34948
|
ACTIVE_CONTENT_DEFENCE = /\bJsoup\.clean\b|\bPolicyFactory\.sanitize\b|\bHtmlPolicyBuilder\b|\b(?:sanitize|sanitise)Svg\b|\bContentDisposition\.attachment\b|\bCONTENT_DISPOSITION\b[^\n]*\battachment\b/i;
|
|
34650
34949
|
ALLOWLIST_WINDOW = 2e3;
|
|
34651
|
-
|
|
34950
|
+
lineOf36 = (content, index2) => content.slice(0, index2).split("\n").length;
|
|
34652
34951
|
collectUploadHandlers = (javaFiles) => {
|
|
34653
34952
|
const out = [];
|
|
34654
34953
|
for (const file of javaFiles) {
|
|
@@ -34661,7 +34960,7 @@ ${bodyText}` : headerText;
|
|
|
34661
34960
|
let m = re.exec(file.content);
|
|
34662
34961
|
while (m !== null) {
|
|
34663
34962
|
if (!isImportOrPackageLine(file.content, m.index)) {
|
|
34664
|
-
const line2 =
|
|
34963
|
+
const line2 = lineOf36(file.content, m.index);
|
|
34665
34964
|
const last = out.at(-1);
|
|
34666
34965
|
if (!(last && last.file === file.path && last.line === line2)) {
|
|
34667
34966
|
out.push({ file: file.path, line: line2 });
|
|
@@ -34675,7 +34974,7 @@ ${bodyText}` : headerText;
|
|
|
34675
34974
|
firstMatch3 = (javaFiles, re) => {
|
|
34676
34975
|
for (const file of javaFiles) {
|
|
34677
34976
|
const m = re.exec(file.content);
|
|
34678
|
-
if (m !== null) return { file: file.path, line:
|
|
34977
|
+
if (m !== null) return { file: file.path, line: lineOf36(file.content, m.index) };
|
|
34679
34978
|
}
|
|
34680
34979
|
return null;
|
|
34681
34980
|
};
|
|
@@ -34695,7 +34994,7 @@ ${bodyText}` : headerText;
|
|
|
34695
34994
|
const first = hits[0];
|
|
34696
34995
|
return {
|
|
34697
34996
|
file: file.path,
|
|
34698
|
-
line:
|
|
34997
|
+
line: lineOf36(file.content, allowlist.index + (first?.index ?? 0)),
|
|
34699
34998
|
extensions
|
|
34700
34999
|
};
|
|
34701
35000
|
}
|
|
@@ -34828,7 +35127,7 @@ ${bodyText}` : headerText;
|
|
|
34828
35127
|
ENV_PLACEHOLDER2 = /^\$\{[^}]*\}$/;
|
|
34829
35128
|
NON_PROD_PROFILE = /application-(dev|test|local|it)\b/i;
|
|
34830
35129
|
CONFIG_FILE = /(?:^|\/)(?:application|bootstrap)[^/]*\.(ya?ml|properties)$/i;
|
|
34831
|
-
|
|
35130
|
+
lineOf37 = (content, index2) => content.slice(0, index2).split("\n").length;
|
|
34832
35131
|
byFileLine2 = (a, b) => a.file === b.file ? a.line - b.line : a.file < b.file ? -1 : 1;
|
|
34833
35132
|
collectSecrets = (files) => {
|
|
34834
35133
|
const literals = [];
|
|
@@ -34847,7 +35146,7 @@ ${bodyText}` : headerText;
|
|
|
34847
35146
|
const sep32 = inner.indexOf(":");
|
|
34848
35147
|
externalized.push({
|
|
34849
35148
|
file: file.path,
|
|
34850
|
-
line:
|
|
35149
|
+
line: lineOf37(file.content, m.index),
|
|
34851
35150
|
// Name only. A `${VAR:s3cr3t}` default is a secret, and this report is
|
|
34852
35151
|
// shared far more widely than the config file it reads.
|
|
34853
35152
|
variable: (sep32 >= 0 ? inner.slice(0, sep32) : inner).trim(),
|
|
@@ -34856,7 +35155,7 @@ ${bodyText}` : headerText;
|
|
|
34856
35155
|
} else {
|
|
34857
35156
|
literals.push({
|
|
34858
35157
|
file: file.path,
|
|
34859
|
-
line:
|
|
35158
|
+
line: lineOf37(file.content, m.index),
|
|
34860
35159
|
fingerprint: sha256(raw).slice(0, 12),
|
|
34861
35160
|
prod: !NON_PROD_PROFILE.test(file.path)
|
|
34862
35161
|
});
|
|
@@ -34979,7 +35278,7 @@ ${bodyText}` : headerText;
|
|
|
34979
35278
|
["3", { release: "7.1", supportEndedBy: "2025-12-31" }]
|
|
34980
35279
|
]);
|
|
34981
35280
|
stripComments2 = (path2, content) => path2.endsWith(".xml") ? content.replace(/<!--[\s\S]*?-->/g, (m) => m.replace(/[^\n]/g, " ")) : content.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, " ")).replace(/(^|[^:])\/\/[^\n]*/g, (m, p) => p + " ".repeat(m.length - p.length)).replace(/^\s*#[^\n]*/gm, (m) => " ".repeat(m.length));
|
|
34982
|
-
|
|
35281
|
+
lineOf38 = (content, index2) => content.slice(0, index2).split("\n").length;
|
|
34983
35282
|
springBootHits = (file, text2, today) => {
|
|
34984
35283
|
const hits = [];
|
|
34985
35284
|
const patterns = [
|
|
@@ -34996,7 +35295,7 @@ ${bodyText}` : headerText;
|
|
|
34996
35295
|
hits.push({
|
|
34997
35296
|
platform: `Spring Boot ${cycle}`,
|
|
34998
35297
|
file: file.path,
|
|
34999
|
-
line:
|
|
35298
|
+
line: lineOf38(text2, m.index ?? 0),
|
|
35000
35299
|
note: `Spring Boot ${cycle} h\u1EBFt h\u1ED7 tr\u1EE3 OSS t\u1EEB ${row2.eol} (endoflife.date, ghi nh\u1EADn 2026-09-17) \u2014 kh\xF4ng c\xF2n b\u1EA3n v\xE1 b\u1EA3o m\u1EADt mi\u1EC5n ph\xED; n\u1EBFu d\u1EF1 \xE1n c\xF3 h\u1EE3p \u0111\u1ED3ng h\u1ED7 tr\u1EE3 th\u01B0\u01A1ng m\u1EA1i th\xEC ghi r\xF5, n\u1EBFu kh\xF4ng h\xE3y n\xE2ng c\u1EA5p.`
|
|
35001
35300
|
});
|
|
35002
35301
|
}
|
|
@@ -35012,7 +35311,7 @@ ${bodyText}` : headerText;
|
|
|
35012
35311
|
hits.push({
|
|
35013
35312
|
platform: `Liferay ${mapped.release}`,
|
|
35014
35313
|
file: file.path,
|
|
35015
|
-
line:
|
|
35314
|
+
line: lineOf38(text2, m.index ?? 0),
|
|
35016
35315
|
note: `com.liferay.portal.kernel ${m[1]}.x = Liferay ${mapped.release}: theo ch\xEDnh s\xE1ch EOL c\u1EE7a Liferay (4 n\u0103m premium + 3 n\u0103m limited t\u1EEB ng\xE0y ph\xE1t h\xE0nh) d\xF2ng n\xE0y \u0111\xE3 h\u1EBFt h\u1ED7 tr\u1EE3 \u2014 kh\xF4ng c\xF2n b\u1EA3n v\xE1 b\u1EA3o m\u1EADt. N\xE2ng c\u1EA5p l\xEAn d\xF2ng c\xF2n h\u1ED7 tr\u1EE3.`
|
|
35017
35316
|
});
|
|
35018
35317
|
}
|
|
@@ -35065,7 +35364,7 @@ ${bodyText}` : headerText;
|
|
|
35065
35364
|
TOKEN_COMPARE_RE = /\bAuthTokenUtil\s*\.\s*getToken\s*\([^)]*\)\s*\.\s*equals\s*\(\s*([\w$]+)\s*\)|\b([\w$]+)\s*\.\s*equals\s*\(\s*AuthTokenUtil\s*\.\s*getToken\s*\([^)]*\)\s*\)/g;
|
|
35066
35365
|
CHECK_CSRF_RE = /\bAuthTokenUtil\s*\.\s*checkCSRFToken\s*\(/g;
|
|
35067
35366
|
DISABLED_PROP_RE = /^\s*auth\.token\.check\.enabled\s*=\s*false\s*$/im;
|
|
35068
|
-
|
|
35367
|
+
lineOf39 = (content, index2) => content.slice(0, index2).split("\n").length;
|
|
35069
35368
|
enclosingCondition = (content, index2) => {
|
|
35070
35369
|
const from = Math.max(0, index2 - 800);
|
|
35071
35370
|
const ifs = [...content.slice(from, index2).matchAll(/\bif\s*\(/g)];
|
|
@@ -35110,7 +35409,7 @@ ${bodyText}` : headerText;
|
|
|
35110
35409
|
absent.push(
|
|
35111
35410
|
ev(
|
|
35112
35411
|
f.path,
|
|
35113
|
-
|
|
35412
|
+
lineOf39(f.content, m?.index ?? 0),
|
|
35114
35413
|
"`auth.token.check.enabled=false` \u2014 ki\u1EC3m tra token CSRF c\u1EE7a portal b\u1ECB T\u1EAET to\xE0n c\u1EE5c.",
|
|
35115
35414
|
80
|
|
35116
35415
|
)
|
|
@@ -35135,7 +35434,7 @@ ${bodyText}` : headerText;
|
|
|
35135
35434
|
absent.push(
|
|
35136
35435
|
ev(
|
|
35137
35436
|
path2,
|
|
35138
|
-
|
|
35437
|
+
lineOf39(content, at),
|
|
35139
35438
|
`Ki\u1EC3m tra token CSRF c\xF3 ${bypass}; hai gi\xE1 tr\u1ECB do client t\u1EF1 ch\u1ECDn th\xEC lu\xF4n kh\u1EDBp \u0111\u01B0\u1EE3c.`,
|
|
35140
35439
|
70
|
|
35141
35440
|
)
|
|
@@ -35144,7 +35443,7 @@ ${bodyText}` : headerText;
|
|
|
35144
35443
|
present.push(
|
|
35145
35444
|
ev(
|
|
35146
35445
|
path2,
|
|
35147
|
-
|
|
35446
|
+
lineOf39(content, at),
|
|
35148
35447
|
"So token request v\u1EDBi `AuthTokenUtil.getToken(...)` (token CSRF c\u1EE7a portal).",
|
|
35149
35448
|
65
|
|
35150
35449
|
)
|
|
@@ -35155,7 +35454,7 @@ ${bodyText}` : headerText;
|
|
|
35155
35454
|
present.push(
|
|
35156
35455
|
ev(
|
|
35157
35456
|
path2,
|
|
35158
|
-
|
|
35457
|
+
lineOf39(content, m.index ?? 0),
|
|
35159
35458
|
"`AuthTokenUtil.checkCSRFToken(...)` \u2014 ki\u1EC3m tra token CSRF c\u1EE7a portal.",
|
|
35160
35459
|
70
|
|
35161
35460
|
)
|
|
@@ -35199,7 +35498,7 @@ ${bodyText}` : headerText;
|
|
|
35199
35498
|
const m = AUTH_TOKEN_REF_RE.exec(f.content);
|
|
35200
35499
|
return ev(
|
|
35201
35500
|
f.path,
|
|
35202
|
-
|
|
35501
|
+
lineOf39(f.content, m?.index ?? 0),
|
|
35203
35502
|
"Tham chi\u1EBFu `AuthTokenUtil` nh\u01B0ng kh\xF4ng th\u1EA5y ph\xE9p so token \u2014 xem c\xE1ch token \u0111\u01B0\u1EE3c d\xF9ng.",
|
|
35204
35503
|
50
|
|
35205
35504
|
);
|
|
@@ -36317,7 +36616,7 @@ ${script}
|
|
|
36317
36616
|
);
|
|
36318
36617
|
};
|
|
36319
36618
|
HTTP_VERBS = /* @__PURE__ */ new Set(["get", "post", "put", "patch", "delete"]);
|
|
36320
|
-
|
|
36619
|
+
lineOf40 = (content, offset) => {
|
|
36321
36620
|
let line2 = 1;
|
|
36322
36621
|
for (let i = 0; i < offset && i < content.length; i++) {
|
|
36323
36622
|
if (content[i] === "\n") line2++;
|
|
@@ -36462,7 +36761,7 @@ ${script}
|
|
|
36462
36761
|
pathTemplate: parsed.pathTemplate,
|
|
36463
36762
|
urlKind: parsed.urlKind,
|
|
36464
36763
|
file: path2,
|
|
36465
|
-
line:
|
|
36764
|
+
line: lineOf40(content, matchIndex)
|
|
36466
36765
|
});
|
|
36467
36766
|
}
|
|
36468
36767
|
}
|
|
@@ -36495,7 +36794,7 @@ ${script}
|
|
|
36495
36794
|
pathTemplate: parsed.pathTemplate,
|
|
36496
36795
|
urlKind: parsed.urlKind,
|
|
36497
36796
|
file: path2,
|
|
36498
|
-
line:
|
|
36797
|
+
line: lineOf40(content, openParenIndex)
|
|
36499
36798
|
});
|
|
36500
36799
|
}
|
|
36501
36800
|
}
|
|
@@ -36593,7 +36892,7 @@ ${script}
|
|
|
36593
36892
|
cweId: "CWE-434"
|
|
36594
36893
|
};
|
|
36595
36894
|
MAX_EVIDENCE40 = 50;
|
|
36596
|
-
|
|
36895
|
+
lineOf41 = (content, index2) => {
|
|
36597
36896
|
let line2 = 1;
|
|
36598
36897
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
36599
36898
|
if (content[i] === "\n") line2++;
|
|
@@ -36634,7 +36933,7 @@ ${script}
|
|
|
36634
36933
|
for (const m of f.content.matchAll(re)) {
|
|
36635
36934
|
hits.push({
|
|
36636
36935
|
file: f.path,
|
|
36637
|
-
line:
|
|
36936
|
+
line: lineOf41(f.content, m.index ?? 0),
|
|
36638
36937
|
note: `${label} \u2014 ki\u1EC3m tra \u0111\u1ECBnh d\u1EA1ng CH\u1EC8 ph\xEDa CLIENT: ng\u01B0\u1EDDi d\xF9ng/g\xF3i tin b\u1ECF qua endpoint l\xE0 bypass \u0111\u01B0\u1EE3c (CWE-434). T\xEDn hi\u1EC7u \u0111\u1EC3 review server c\xF3 whitelist + ki\u1EC3m n\u1ED9i dung (magic-byte) cho M\u1ECCI handler nh\u1EADn file \u2014 KH\xD4NG ph\u1EA3i vuln t\u1EF1 th\xE2n.`
|
|
36639
36938
|
});
|
|
36640
36939
|
}
|
|
@@ -36648,7 +36947,7 @@ ${script}
|
|
|
36648
36947
|
if (f.language !== "html") return { acceptHits, uiHits };
|
|
36649
36948
|
for (const m of f.content.matchAll(FILE_INPUT_RE)) {
|
|
36650
36949
|
const tag = m[0] ?? "";
|
|
36651
|
-
const line2 =
|
|
36950
|
+
const line2 = lineOf41(f.content, m.index ?? 0);
|
|
36652
36951
|
uiHits.push({
|
|
36653
36952
|
file: f.path,
|
|
36654
36953
|
line: line2,
|
|
@@ -36768,7 +37067,7 @@ ${script}
|
|
|
36768
37067
|
cweId: "CWE-613"
|
|
36769
37068
|
};
|
|
36770
37069
|
MAX_EVIDENCE41 = 50;
|
|
36771
|
-
|
|
37070
|
+
lineOf42 = (content, index2) => {
|
|
36772
37071
|
let line2 = 1;
|
|
36773
37072
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
36774
37073
|
if (content[i] === "\n") line2++;
|
|
@@ -36817,7 +37116,7 @@ ${script}
|
|
|
36817
37116
|
for (const m of file.content.matchAll(re)) {
|
|
36818
37117
|
hits.push({
|
|
36819
37118
|
file: file.path,
|
|
36820
|
-
line:
|
|
37119
|
+
line: lineOf42(file.content, m.index ?? 0),
|
|
36821
37120
|
label,
|
|
36822
37121
|
note: `${label} t\u1EA1i d\xF2ng n\xE0y \u2014 file KH\xD4NG th\u1EA5y x\xF3a token kh\u1ECFi browser storage (localStorage.removeItem/clear, sessionStorage, accessToken = null).`
|
|
36823
37122
|
});
|
|
@@ -36869,7 +37168,7 @@ ${script}
|
|
|
36869
37168
|
const m = CLEAR_STATE_RE.exec(f.content);
|
|
36870
37169
|
CLEAR_STATE_RE.lastIndex = 0;
|
|
36871
37170
|
if (m !== null) {
|
|
36872
|
-
clearSites.push({ file: f.path, line:
|
|
37171
|
+
clearSites.push({ file: f.path, line: lineOf42(f.content, m.index) });
|
|
36873
37172
|
}
|
|
36874
37173
|
continue;
|
|
36875
37174
|
}
|
|
@@ -36937,7 +37236,7 @@ ${script}
|
|
|
36937
37236
|
cweId: "CWE-20"
|
|
36938
37237
|
};
|
|
36939
37238
|
MAX_EVIDENCE42 = 50;
|
|
36940
|
-
|
|
37239
|
+
lineOf43 = (content, index2) => {
|
|
36941
37240
|
let line2 = 1;
|
|
36942
37241
|
for (let i = 0; i < index2 && i < content.length; i++) {
|
|
36943
37242
|
if (content[i] === "\n") line2++;
|
|
@@ -36968,7 +37267,7 @@ ${script}
|
|
|
36968
37267
|
anyMoneyField = true;
|
|
36969
37268
|
hits.push({
|
|
36970
37269
|
file: f.path,
|
|
36971
|
-
line:
|
|
37270
|
+
line: lineOf43(content, m.index ?? 0),
|
|
36972
37271
|
name,
|
|
36973
37272
|
hasPattern
|
|
36974
37273
|
});
|
|
@@ -36983,7 +37282,7 @@ ${script}
|
|
|
36983
37282
|
)) {
|
|
36984
37283
|
const name = (m[1] ?? "").replace(/^\[+|\]+$/g, "");
|
|
36985
37284
|
if (!isMoneyName(name)) continue;
|
|
36986
|
-
hits.push({ file: f.path, line:
|
|
37285
|
+
hits.push({ file: f.path, line: lineOf43(f.content, m.index ?? 0), name, hasPattern: false });
|
|
36987
37286
|
}
|
|
36988
37287
|
return { hits };
|
|
36989
37288
|
};
|
|
@@ -37016,7 +37315,7 @@ ${script}
|
|
|
37016
37315
|
const bound = /(?:^|\s)min\s*=\s*["'][^"']+["']/.exec(f.content) ?? MIN_BOUND_RE.exec(f.content);
|
|
37017
37316
|
MIN_BOUND_RE.lastIndex = 0;
|
|
37018
37317
|
if (bound !== null) {
|
|
37019
|
-
configured.push({ file: f.path, line:
|
|
37318
|
+
configured.push({ file: f.path, line: lineOf43(f.content, bound.index) });
|
|
37020
37319
|
continue;
|
|
37021
37320
|
}
|
|
37022
37321
|
const html = moneyInputsIn(f);
|
|
@@ -37030,7 +37329,7 @@ ${script}
|
|
|
37030
37329
|
if (ts.bounded) {
|
|
37031
37330
|
anyMoneyField = anyMoneyField || ts.anyMoneyField;
|
|
37032
37331
|
const m = MIN_BOUND_RE.exec(f.content);
|
|
37033
|
-
if (m !== null) configured.push({ file: f.path, line:
|
|
37332
|
+
if (m !== null) configured.push({ file: f.path, line: lineOf43(f.content, m.index) });
|
|
37034
37333
|
MIN_BOUND_RE.lastIndex = 0;
|
|
37035
37334
|
continue;
|
|
37036
37335
|
}
|
|
@@ -37316,7 +37615,7 @@ Language guard retry: the previous response contained an empty or English explan
|
|
|
37316
37615
|
return { status: "error", vulnerable: false, reason: `L\u1ED7i th\u1EF1c thi LLM: ${message}` };
|
|
37317
37616
|
}
|
|
37318
37617
|
}
|
|
37319
|
-
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,
|
|
37618
|
+
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;
|
|
37320
37619
|
var init_dist4 = __esm({
|
|
37321
37620
|
"../ai-engine/dist/index.js"() {
|
|
37322
37621
|
init_dist();
|
|
@@ -39517,7 +39816,7 @@ ${VIETNAMESE_OUTPUT_INSTRUCTION}`
|
|
|
39517
39816
|
while (MUTATION_CALL.exec(body) !== null) count++;
|
|
39518
39817
|
return count;
|
|
39519
39818
|
};
|
|
39520
|
-
|
|
39819
|
+
lineOf25 = (content, offset) => {
|
|
39521
39820
|
let line2 = 1;
|
|
39522
39821
|
for (let i = 0; i < offset && i < content.length; i++) {
|
|
39523
39822
|
if (content[i] === "\n") line2++;
|
|
@@ -39554,7 +39853,7 @@ ${VIETNAMESE_OUTPUT_INSTRUCTION}`
|
|
|
39554
39853
|
seen.add(key);
|
|
39555
39854
|
facts.push({
|
|
39556
39855
|
file: file.path,
|
|
39557
|
-
line:
|
|
39856
|
+
line: lineOf25(content, offset),
|
|
39558
39857
|
scope: "method",
|
|
39559
39858
|
target: method.name,
|
|
39560
39859
|
mechanism: `${api}.${operation}`,
|
|
@@ -39614,7 +39913,7 @@ ${VIETNAMESE_OUTPUT_INSTRUCTION}`
|
|
|
39614
39913
|
}
|
|
39615
39914
|
facts.push({
|
|
39616
39915
|
file: file.path,
|
|
39617
|
-
line:
|
|
39916
|
+
line: lineOf25(content, m.index),
|
|
39618
39917
|
scope,
|
|
39619
39918
|
target,
|
|
39620
39919
|
mechanism: "@Transactional",
|
|
@@ -47146,12 +47445,12 @@ function getCrawler(globInput, inputOptions = {}) {
|
|
|
47146
47445
|
return patterns.length > 0 ? buildCrawler(options, patterns) : [];
|
|
47147
47446
|
}
|
|
47148
47447
|
async function glob(globInput, options) {
|
|
47149
|
-
const [crawler,
|
|
47150
|
-
return crawler ? formatPaths(await crawler.withPromise(),
|
|
47448
|
+
const [crawler, relative14] = getCrawler(globInput, options);
|
|
47449
|
+
return crawler ? formatPaths(await crawler.withPromise(), relative14) : [];
|
|
47151
47450
|
}
|
|
47152
47451
|
function globSync(globInput, options) {
|
|
47153
|
-
const [crawler,
|
|
47154
|
-
return crawler ? formatPaths(crawler.sync(),
|
|
47452
|
+
const [crawler, relative14] = getCrawler(globInput, options);
|
|
47453
|
+
return crawler ? formatPaths(crawler.sync(), relative14) : [];
|
|
47155
47454
|
}
|
|
47156
47455
|
var import_picomatch, isReadonlyArray, BACKSLASHES, isWin, ONLY_PARENT_DIRECTORIES, WIN32_ROOT_DIR, isRoot, splitPatternOptions, POSIX_UNESCAPED_GLOB_SYMBOLS, WIN32_UNESCAPED_GLOB_SYMBOLS, escapePosixPath, escapeWin32Path, escapePath, PARENT_DIRECTORY, ESCAPING_BACKSLASHES, defaultOptions;
|
|
47157
47456
|
var init_dist7 = __esm({
|
|
@@ -47254,6 +47553,17 @@ var init_dist8 = __esm({
|
|
|
47254
47553
|
relatedChecklistIds: external_exports.array(checklistIdSchema).min(1).optional(),
|
|
47255
47554
|
/** [ADR-0098] External scanners this rule reproduces (see `Rule.sourceTools`). */
|
|
47256
47555
|
sourceTools: external_exports.array(external_exports.enum(SOURCE_TOOLS)).min(1).optional(),
|
|
47556
|
+
/**
|
|
47557
|
+
* OWASP MASVS v2 control ids the rule's findings RELATE to (mobile static
|
|
47558
|
+
* rules only). Presence scopes WHERE findings surface in a report — it does
|
|
47559
|
+
* NOT mean the control is verified; each finding keeps its own verdict.
|
|
47560
|
+
*/
|
|
47561
|
+
masvsControlIds: external_exports.array(
|
|
47562
|
+
external_exports.string().regex(
|
|
47563
|
+
/^MASVS-(STORAGE|CRYPTO|AUTH|NETWORK|PLATFORM|CODE|RESILIENCE|PRIVACY)-\d+$/,
|
|
47564
|
+
"Expected an OWASP MASVS v2 control id, e.g. MASVS-NETWORK-1"
|
|
47565
|
+
)
|
|
47566
|
+
).min(1).max(10).optional(),
|
|
47257
47567
|
requires: parserLayerSchema.optional(),
|
|
47258
47568
|
authors: external_exports.array(external_exports.string()).optional(),
|
|
47259
47569
|
docsUrl: external_exports.string().url().optional(),
|
|
@@ -49588,7 +49898,7 @@ var init_sql = __esm({
|
|
|
49588
49898
|
return new SQL([new StringChunk(str)]);
|
|
49589
49899
|
}
|
|
49590
49900
|
sql2.raw = raw;
|
|
49591
|
-
function
|
|
49901
|
+
function join24(chunks, separator) {
|
|
49592
49902
|
const result = [];
|
|
49593
49903
|
for (const [i, chunk] of chunks.entries()) {
|
|
49594
49904
|
if (i > 0 && separator !== void 0) {
|
|
@@ -49598,7 +49908,7 @@ var init_sql = __esm({
|
|
|
49598
49908
|
}
|
|
49599
49909
|
return new SQL(result);
|
|
49600
49910
|
}
|
|
49601
|
-
sql2.join =
|
|
49911
|
+
sql2.join = join24;
|
|
49602
49912
|
function identifier(value) {
|
|
49603
49913
|
return new Name(value);
|
|
49604
49914
|
}
|
|
@@ -52145,7 +52455,7 @@ var init_select2 = __esm({
|
|
|
52145
52455
|
return (table, on) => {
|
|
52146
52456
|
const baseTableName = this.tableName;
|
|
52147
52457
|
const tableName = getTableLikeName(table);
|
|
52148
|
-
if (typeof tableName === "string" && this.config.joins?.some((
|
|
52458
|
+
if (typeof tableName === "string" && this.config.joins?.some((join24) => join24.alias === tableName)) {
|
|
52149
52459
|
throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
52150
52460
|
}
|
|
52151
52461
|
if (!this.isPartialSelect) {
|
|
@@ -52973,7 +53283,7 @@ var init_update = __esm({
|
|
|
52973
53283
|
createJoin(joinType) {
|
|
52974
53284
|
return (table, on) => {
|
|
52975
53285
|
const tableName = getTableLikeName(table);
|
|
52976
|
-
if (typeof tableName === "string" && this.config.joins.some((
|
|
53286
|
+
if (typeof tableName === "string" && this.config.joins.some((join24) => join24.alias === tableName)) {
|
|
52977
53287
|
throw new Error(`Alias "${tableName}" is already used in this query`);
|
|
52978
53288
|
}
|
|
52979
53289
|
if (typeof on === "function") {
|
|
@@ -59580,11 +59890,11 @@ var definedBuildValue = (value, fallback) => typeof value === "string" && value.
|
|
|
59580
59890
|
var getCliBuildMetadata = (version2) => ({
|
|
59581
59891
|
version: version2,
|
|
59582
59892
|
gitSha: definedBuildValue(
|
|
59583
|
-
"
|
|
59893
|
+
"44cd30d984d9" ,
|
|
59584
59894
|
"unknown"
|
|
59585
59895
|
),
|
|
59586
59896
|
buildTimestamp: definedBuildValue(
|
|
59587
|
-
"2026-
|
|
59897
|
+
"2026-10-02T07:20:53.150Z" ,
|
|
59588
59898
|
"unknown"
|
|
59589
59899
|
),
|
|
59590
59900
|
configSchemaRange: definedBuildValue(
|
|
@@ -60940,7 +61250,7 @@ var SecretCommandError = class extends Error {
|
|
|
60940
61250
|
code;
|
|
60941
61251
|
};
|
|
60942
61252
|
var nativeRunner = {
|
|
60943
|
-
run: (command, args, input4) => new Promise((
|
|
61253
|
+
run: (command, args, input4) => new Promise((resolve63, reject) => {
|
|
60944
61254
|
const child = spawn(command, args, { stdio: ["pipe", "pipe", "pipe"] });
|
|
60945
61255
|
let stdout = "";
|
|
60946
61256
|
let stderr = "";
|
|
@@ -60954,7 +61264,7 @@ var nativeRunner = {
|
|
|
60954
61264
|
});
|
|
60955
61265
|
child.on("error", (error) => reject(error));
|
|
60956
61266
|
child.on("close", (code) => {
|
|
60957
|
-
if (code === 0)
|
|
61267
|
+
if (code === 0) resolve63(stdout);
|
|
60958
61268
|
else reject(new SecretCommandError(command, code, stderr.trim() || `${command} failed`));
|
|
60959
61269
|
});
|
|
60960
61270
|
if (input4 !== void 0) child.stdin.end(input4);
|
|
@@ -62497,6 +62807,13 @@ var relativePosixPathSchema = (field3) => external_exports.string().min(1).max(5
|
|
|
62497
62807
|
const segments = value.split("/");
|
|
62498
62808
|
return segments.every((segment) => segment.length > 0 && segment !== "." && segment !== "..");
|
|
62499
62809
|
}, `${field3} must be a relative POSIX path inside the source snapshot (no .., no absolute path, no backslash).`);
|
|
62810
|
+
var moduleRootSchema = external_exports.string().max(512).refine((value) => {
|
|
62811
|
+
if (value === "") return true;
|
|
62812
|
+
if (value.includes("\\")) return false;
|
|
62813
|
+
if (value.startsWith("/")) return false;
|
|
62814
|
+
const segments = value.split("/");
|
|
62815
|
+
return segments.every((segment) => segment.length > 0 && segment !== "." && segment !== "..");
|
|
62816
|
+
}, `moduleRoot must be a relative POSIX path inside the source snapshot, or '' for the snapshot root (no ., no .., no absolute path, no backslash).`);
|
|
62500
62817
|
var mobilePentestManifestSchema = external_exports.object({
|
|
62501
62818
|
version: external_exports.literal(1),
|
|
62502
62819
|
appType: mobileAppTypeSchema,
|
|
@@ -62504,14 +62821,14 @@ var mobilePentestManifestSchema = external_exports.object({
|
|
|
62504
62821
|
(platforms) => new Set(platforms).size === platforms.length,
|
|
62505
62822
|
"Duplicate platforms are not allowed."
|
|
62506
62823
|
),
|
|
62507
|
-
moduleRoot:
|
|
62824
|
+
moduleRoot: moduleRootSchema,
|
|
62508
62825
|
source: external_exports.object({
|
|
62509
62826
|
archiveName: external_exports.string().min(1).max(512),
|
|
62510
62827
|
sha256: sha256Schema2,
|
|
62511
62828
|
commitSha: external_exports.string().regex(/^[0-9a-f]{7,40}$/i, "Expected a git commit SHA").optional(),
|
|
62512
62829
|
dirty: external_exports.boolean().optional()
|
|
62513
62830
|
}).strict(),
|
|
62514
|
-
releases: external_exports.array(mobileReleaseInputSchema).
|
|
62831
|
+
releases: external_exports.array(mobileReleaseInputSchema).superRefine((releases, ctx) => {
|
|
62515
62832
|
const seen = /* @__PURE__ */ new Set();
|
|
62516
62833
|
releases.forEach((release, index2) => {
|
|
62517
62834
|
const identity = `${release.platform}:${release.flavor ?? ""}:${release.scheme ?? ""}:${release.sha256}`;
|
|
@@ -62629,6 +62946,20 @@ var mobileFindingLocationSchema = external_exports.object({
|
|
|
62629
62946
|
var mobileFindingSchema = external_exports.object({
|
|
62630
62947
|
ruleId: external_exports.string().min(1).max(256),
|
|
62631
62948
|
checklistId: external_exports.string().min(1).max(128).optional(),
|
|
62949
|
+
/**
|
|
62950
|
+
* Rule category the finding came from. The pentest lane only carries
|
|
62951
|
+
* security scopes (mobile-security, mobile-privacy) — a report consumer
|
|
62952
|
+
* can see the scope per item without re-resolving rule metadata, and a
|
|
62953
|
+
* future quality lane keeps its own categories.
|
|
62954
|
+
*/
|
|
62955
|
+
category: external_exports.enum(["mobile-security", "mobile-privacy"]).optional(),
|
|
62956
|
+
/**
|
|
62957
|
+
* OWASP MASVS v2 control ids the finding relates to — report grouping
|
|
62958
|
+
* only; a finding mapped to a control is not a verified control.
|
|
62959
|
+
*/
|
|
62960
|
+
masvsControlIds: external_exports.array(
|
|
62961
|
+
external_exports.string().regex(/^MASVS-(STORAGE|CRYPTO|AUTH|NETWORK|PLATFORM|CODE|RESILIENCE|PRIVACY)-\d+$/)
|
|
62962
|
+
).max(10).optional(),
|
|
62632
62963
|
severity: external_exports.enum(["info", "warning", "error", "blocker"]),
|
|
62633
62964
|
platform: mobilePlatformSchema.optional(),
|
|
62634
62965
|
/** Release input id (artifact findings); undefined for source-only findings. */
|
|
@@ -64151,7 +64482,19 @@ var runAssess = async (options, deps = {}) => {
|
|
|
64151
64482
|
let runtimeBuildFiles = [];
|
|
64152
64483
|
try {
|
|
64153
64484
|
const buildPaths = await glob(
|
|
64154
|
-
[
|
|
64485
|
+
[
|
|
64486
|
+
"**/pom.xml",
|
|
64487
|
+
"**/build.gradle",
|
|
64488
|
+
"**/build.gradle.kts",
|
|
64489
|
+
"**/bnd.bnd",
|
|
64490
|
+
"**/portal-ext.properties",
|
|
64491
|
+
"**/osgi/configs/**/*.config",
|
|
64492
|
+
"**/osgi/configs/**/*.cfg",
|
|
64493
|
+
"**/service.xml",
|
|
64494
|
+
"gradle/wrapper/gradle-wrapper.properties",
|
|
64495
|
+
"gradle.properties",
|
|
64496
|
+
"**/Dockerfile"
|
|
64497
|
+
],
|
|
64155
64498
|
{
|
|
64156
64499
|
cwd: target,
|
|
64157
64500
|
ignore: [...config.exclude, "**/.git/**", "**/node_modules/**", "**/build/**"],
|
|
@@ -64189,7 +64532,10 @@ var runAssess = async (options, deps = {}) => {
|
|
|
64189
64532
|
runtimeManifestFiles,
|
|
64190
64533
|
report2.items.flatMap((item16) => item16.scenarios)
|
|
64191
64534
|
);
|
|
64192
|
-
const
|
|
64535
|
+
const runtimePlanFiles = [
|
|
64536
|
+
...new Map([...files, ...runtimeBuildFiles].map((file) => [file.path, file])).values()
|
|
64537
|
+
];
|
|
64538
|
+
const plan = buildRuntimeBringUpPlan(runtimePlanFiles, endpoints, {
|
|
64193
64539
|
dependencyConfigFiles,
|
|
64194
64540
|
dependencyJarKeys: runtimeDependencyJarKeys,
|
|
64195
64541
|
eagerKafkaStartupJars: runtimeEagerKafkaStartupJars,
|
|
@@ -64777,7 +65123,7 @@ var openBrowser = async (url) => {
|
|
|
64777
65123
|
else await execFile3("xdg-open", [url]);
|
|
64778
65124
|
};
|
|
64779
65125
|
var credentialStore = () => createPlatformCredentialStore();
|
|
64780
|
-
var sleep = (milliseconds) => new Promise((
|
|
65126
|
+
var sleep = (milliseconds) => new Promise((resolve63) => setTimeout(resolve63, milliseconds));
|
|
64781
65127
|
var defaults = () => ({
|
|
64782
65128
|
store: credentialStore(),
|
|
64783
65129
|
start: startDeviceAuthorization,
|
|
@@ -69288,9 +69634,9 @@ var NodeFsHandler = class {
|
|
|
69288
69634
|
if (this.fsw.closed) {
|
|
69289
69635
|
return;
|
|
69290
69636
|
}
|
|
69291
|
-
const
|
|
69637
|
+
const dirname36 = sp2.dirname(file);
|
|
69292
69638
|
const basename14 = sp2.basename(file);
|
|
69293
|
-
const parent = this.fsw._getWatchedDir(
|
|
69639
|
+
const parent = this.fsw._getWatchedDir(dirname36);
|
|
69294
69640
|
let prevStats = stats;
|
|
69295
69641
|
if (parent.has(basename14))
|
|
69296
69642
|
return;
|
|
@@ -69317,7 +69663,7 @@ var NodeFsHandler = class {
|
|
|
69317
69663
|
prevStats = newStats2;
|
|
69318
69664
|
}
|
|
69319
69665
|
} catch (error) {
|
|
69320
|
-
this.fsw._remove(
|
|
69666
|
+
this.fsw._remove(dirname36, basename14);
|
|
69321
69667
|
}
|
|
69322
69668
|
} else if (parent.has(basename14)) {
|
|
69323
69669
|
const at = newStats.atimeMs;
|
|
@@ -69414,7 +69760,7 @@ var NodeFsHandler = class {
|
|
|
69414
69760
|
this._addToNodeFs(path, initialAdd, wh, depth + 1);
|
|
69415
69761
|
}
|
|
69416
69762
|
}).on(EV.ERROR, this._boundHandleError);
|
|
69417
|
-
return new Promise((
|
|
69763
|
+
return new Promise((resolve63, reject) => {
|
|
69418
69764
|
if (!stream)
|
|
69419
69765
|
return reject();
|
|
69420
69766
|
stream.once(STR_END, () => {
|
|
@@ -69423,7 +69769,7 @@ var NodeFsHandler = class {
|
|
|
69423
69769
|
return;
|
|
69424
69770
|
}
|
|
69425
69771
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
69426
|
-
|
|
69772
|
+
resolve63(void 0);
|
|
69427
69773
|
previous.getChildren().filter((item16) => {
|
|
69428
69774
|
return item16 !== directory && !current.has(item16);
|
|
69429
69775
|
}).forEach((item16) => {
|
|
@@ -69567,11 +69913,11 @@ function createPattern(matcher) {
|
|
|
69567
69913
|
if (matcher.path === string)
|
|
69568
69914
|
return true;
|
|
69569
69915
|
if (matcher.recursive) {
|
|
69570
|
-
const
|
|
69571
|
-
if (!
|
|
69916
|
+
const relative14 = sp2.relative(matcher.path, string);
|
|
69917
|
+
if (!relative14) {
|
|
69572
69918
|
return false;
|
|
69573
69919
|
}
|
|
69574
|
-
return !
|
|
69920
|
+
return !relative14.startsWith("..") && !sp2.isAbsolute(relative14);
|
|
69575
69921
|
}
|
|
69576
69922
|
return false;
|
|
69577
69923
|
};
|
|
@@ -71755,11 +72101,11 @@ var runWatchLoop = async (target, baseOptions) => {
|
|
|
71755
72101
|
ignored,
|
|
71756
72102
|
onBatch: (changed) => runIteration(changed)
|
|
71757
72103
|
});
|
|
71758
|
-
await new Promise((
|
|
72104
|
+
await new Promise((resolve63) => {
|
|
71759
72105
|
const onSigint = () => {
|
|
71760
72106
|
console.log();
|
|
71761
72107
|
console.log(dim("Stopping watcher\u2026"));
|
|
71762
|
-
|
|
72108
|
+
resolve63();
|
|
71763
72109
|
};
|
|
71764
72110
|
process.once("SIGINT", onSigint);
|
|
71765
72111
|
});
|
|
@@ -72016,6 +72362,10 @@ Ch\u1EA1y \`cs assess --json <path>\` \u0111\u1EC3 sinh tr\u01B0\u1EDBc.`
|
|
|
72016
72362
|
}
|
|
72017
72363
|
const hasTests = options.tests !== void 0 && options.tests.length > 0;
|
|
72018
72364
|
const hasResults = options.results !== void 0 && options.results.length > 0;
|
|
72365
|
+
if (options.liferayE1 && (hasTests || hasResults)) {
|
|
72366
|
+
console.error(red("--liferay-e1 kh\xF4ng \u0111\u01B0\u1EE3c d\xF9ng c\xF9ng --tests/--results."));
|
|
72367
|
+
return EXIT.USAGE;
|
|
72368
|
+
}
|
|
72019
72369
|
if (hasTests !== hasResults) {
|
|
72020
72370
|
console.error(
|
|
72021
72371
|
red("--tests v\xE0 --results ph\u1EA3i \u0111i C\xD9NG nhau (\u0111\u1EC3 g\u1ED9p tr\u1EE5c runtime), ho\u1EB7c b\u1ECF c\u1EA3 hai.")
|
|
@@ -72107,6 +72457,65 @@ Ch\u1EA1y \`cs assess --emit-tests <dir>\` \u0111\u1EC3 sinh suite tr\u01B0\u1ED
|
|
|
72107
72457
|
}
|
|
72108
72458
|
runtime = { manifest, report: ingestVerification(manifest, cases, ingestOptions) };
|
|
72109
72459
|
}
|
|
72460
|
+
if (options.liferayE1) {
|
|
72461
|
+
try {
|
|
72462
|
+
const source = JSON.parse(await readFile(resolve(options.liferayE1), "utf8"));
|
|
72463
|
+
const parsed = external_exports.object({
|
|
72464
|
+
schemaVersion: external_exports.literal(1),
|
|
72465
|
+
adapter: external_exports.literal("liferay-http"),
|
|
72466
|
+
results: external_exports.array(
|
|
72467
|
+
external_exports.object({
|
|
72468
|
+
scenarioId: external_exports.string().min(1),
|
|
72469
|
+
checklistId: external_exports.string().min(1),
|
|
72470
|
+
vulnerabilityClass: external_exports.string().min(1),
|
|
72471
|
+
title: external_exports.string(),
|
|
72472
|
+
sinkFile: external_exports.string(),
|
|
72473
|
+
sinkLine: external_exports.number().int().positive(),
|
|
72474
|
+
verdict: external_exports.enum(["exploited", "not-tested"]),
|
|
72475
|
+
reason: external_exports.string(),
|
|
72476
|
+
baselineStatusCode: external_exports.number().int().optional(),
|
|
72477
|
+
attackStatusCode: external_exports.number().int().optional()
|
|
72478
|
+
})
|
|
72479
|
+
).max(2e3)
|
|
72480
|
+
}).parse(source);
|
|
72481
|
+
const resolutions = parsed.results.map((result) => ({
|
|
72482
|
+
checklistId: result.checklistId,
|
|
72483
|
+
vulnerabilityClass: result.vulnerabilityClass,
|
|
72484
|
+
title: result.title,
|
|
72485
|
+
className: "LiferayExternalHttp",
|
|
72486
|
+
methodName: result.scenarioId,
|
|
72487
|
+
sinkFile: result.sinkFile,
|
|
72488
|
+
sinkLine: result.sinkLine,
|
|
72489
|
+
outcome: "external-http",
|
|
72490
|
+
verdict: result.verdict,
|
|
72491
|
+
detail: result.reason,
|
|
72492
|
+
...result.baselineStatusCode !== void 0 ? { baselineStatusCode: result.baselineStatusCode } : {},
|
|
72493
|
+
...result.attackStatusCode !== void 0 ? { attackStatusCode: result.attackStatusCode } : {}
|
|
72494
|
+
}));
|
|
72495
|
+
runtime = {
|
|
72496
|
+
manifest: {
|
|
72497
|
+
schemaVersion: 1,
|
|
72498
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
72499
|
+
targetPath: "",
|
|
72500
|
+
tests: [],
|
|
72501
|
+
skipped: []
|
|
72502
|
+
},
|
|
72503
|
+
report: {
|
|
72504
|
+
resolutions,
|
|
72505
|
+
unmatchedResults: [],
|
|
72506
|
+
summary: {
|
|
72507
|
+
exploited: resolutions.filter((result) => result.verdict === "exploited").length,
|
|
72508
|
+
blocked: 0,
|
|
72509
|
+
notTested: resolutions.filter((result) => result.verdict === "not-tested").length,
|
|
72510
|
+
suspected: 0
|
|
72511
|
+
}
|
|
72512
|
+
}
|
|
72513
|
+
};
|
|
72514
|
+
} catch (error) {
|
|
72515
|
+
console.error(red(`Kh\xF4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c Liferay E1 HTTP report: ${error.message}`));
|
|
72516
|
+
return EXIT.USAGE;
|
|
72517
|
+
}
|
|
72518
|
+
}
|
|
72110
72519
|
const hasDastPlan = options.dastPlan !== void 0 && options.dastPlan.length > 0;
|
|
72111
72520
|
const hasDastReport = options.dastReport !== void 0 && options.dastReport.length > 0;
|
|
72112
72521
|
if (hasDastPlan !== hasDastReport) {
|
|
@@ -72243,7 +72652,12 @@ Ch\u1EA1y \`cs assess --emit-dast <dir>\` \u0111\u1EC3 sinh k\u1EBF ho\u1EA1ch t
|
|
|
72243
72652
|
try {
|
|
72244
72653
|
const rawDastReport = await readFile(dastReportPathResolved, "utf8");
|
|
72245
72654
|
const parsed = parseZapReport(rawDastReport);
|
|
72655
|
+
if (options.routePrefix && !/^\/o\/[A-Za-z0-9._~/-]+$/.test(options.routePrefix)) {
|
|
72656
|
+
console.error(red("--route-prefix ph\u1EA3i l\xE0 \u0111\u01B0\u1EDDng d\u1EABn JAX-RS /o/... h\u1EE3p l\u1EC7."));
|
|
72657
|
+
return EXIT.USAGE;
|
|
72658
|
+
}
|
|
72246
72659
|
dast = ingestDast(dastManifest, parsed, {
|
|
72660
|
+
...options.routePrefix ? { routePrefix: options.routePrefix } : {},
|
|
72247
72661
|
policy: dastPolicy,
|
|
72248
72662
|
coveragePolicy: dastCoveragePolicy,
|
|
72249
72663
|
actualReportHash: dastReportHash(rawDastReport),
|
|
@@ -72500,7 +72914,7 @@ Ch\u1EA1y \`cs assess --emit-runtime-plan <dir>\` \u0111\u1EC3 sinh \`${RUNTIME_
|
|
|
72500
72914
|
);
|
|
72501
72915
|
console.log("");
|
|
72502
72916
|
console.log(
|
|
72503
|
-
` ${summary.totalItems} h\u1EA1ng m\u1EE5c \xB7 ${red(`\u{1F534} ${confirmed} CONFIRMED-VULN`)}${runtime !== void 0 ? ` \xB7 E1: ${red(`${summary.confirmedExploited} khai th\xE1c`)} \xB7 ${green(`${summary.confirmedBlocked} ch\u1EB7n ${dim("(m\xE3 v\u1EABn l\u1ED7i)")}`)} \xB7 ${gray(`${summary.confirmedNotTested} ch\u01B0a x\xE1c minh`)}` : dim(" \xB7 ch\u01B0a g\u1ED9p runtime E1 (thi\u1EBFu
|
|
72917
|
+
` ${summary.totalItems} h\u1EA1ng m\u1EE5c \xB7 ${red(`\u{1F534} ${confirmed} CONFIRMED-VULN`)}${runtime !== void 0 ? ` \xB7 E1: ${red(`${summary.confirmedExploited} khai th\xE1c`)} \xB7 ${green(`${summary.confirmedBlocked} ch\u1EB7n ${dim("(m\xE3 v\u1EABn l\u1ED7i)")}`)} \xB7 ${gray(`${summary.confirmedNotTested} ch\u01B0a x\xE1c minh`)}` : dim(" \xB7 ch\u01B0a g\u1ED9p runtime E1 (thi\u1EBFu JUnit ho\u1EB7c Liferay HTTP)")}`
|
|
72504
72918
|
);
|
|
72505
72919
|
if (summary.dast !== void 0) {
|
|
72506
72920
|
const blockedChip = summary.dast.blocked > 0 ? ` \xB7 ${green(`${summary.dast.blocked} ch\u1EB7n ${dim("(m\xE3 v\u1EABn l\u1ED7i)")}`)}` : "";
|
|
@@ -72707,7 +73121,12 @@ Ch\u1EA1y \`cs assess --emit-dast <dir>\` \u0111\u1EC3 sinh k\u1EBF ho\u1EA1ch t
|
|
|
72707
73121
|
);
|
|
72708
73122
|
return EXIT.USAGE;
|
|
72709
73123
|
}
|
|
73124
|
+
if (options.routePrefix && !/^\/o\/[A-Za-z0-9._~/-]+$/.test(options.routePrefix)) {
|
|
73125
|
+
console.error(red("--route-prefix ph\u1EA3i l\xE0 \u0111\u01B0\u1EDDng d\u1EABn JAX-RS /o/... h\u1EE3p l\u1EC7."));
|
|
73126
|
+
return EXIT.USAGE;
|
|
73127
|
+
}
|
|
72710
73128
|
const ingestOptions = {
|
|
73129
|
+
...options.routePrefix ? { routePrefix: options.routePrefix } : {},
|
|
72711
73130
|
policy,
|
|
72712
73131
|
coveragePolicy,
|
|
72713
73132
|
actualReportHash: dastReportHash(rawReport),
|
|
@@ -73068,10 +73487,10 @@ var runtimeSinceRef = (runtime) => {
|
|
|
73068
73487
|
if (parseGitLabMrUrl(runtime.source.repositoryUrl).ok) return null;
|
|
73069
73488
|
return runtime.baseRef;
|
|
73070
73489
|
};
|
|
73071
|
-
var fetchBaseRef = async (cloneDir, baseRef,
|
|
73490
|
+
var fetchBaseRef = async (cloneDir, baseRef, execFile8, env) => {
|
|
73072
73491
|
const branch = safeRemoteBranch(baseRef);
|
|
73073
73492
|
if (!branch) return;
|
|
73074
|
-
await
|
|
73493
|
+
await execFile8(
|
|
73075
73494
|
"git",
|
|
73076
73495
|
["fetch", "--depth", "50", "origin", `${branch}:refs/remotes/origin/${branch}`],
|
|
73077
73496
|
{
|
|
@@ -73080,7 +73499,7 @@ var fetchBaseRef = async (cloneDir, baseRef, execFile7, env) => {
|
|
|
73080
73499
|
}
|
|
73081
73500
|
);
|
|
73082
73501
|
};
|
|
73083
|
-
var prepareSource = async (runtimeDir, runtime,
|
|
73502
|
+
var prepareSource = async (runtimeDir, runtime, execFile8, env) => {
|
|
73084
73503
|
const source = runtime.source;
|
|
73085
73504
|
if (source.mode === "local") return env.CODE_SENTINEL_SOURCE_WORKDIR?.trim() || "/work";
|
|
73086
73505
|
if (parseGitLabMrUrl(source.repositoryUrl).ok) return runtimeDir;
|
|
@@ -73089,14 +73508,14 @@ var prepareSource = async (runtimeDir, runtime, execFile7, env) => {
|
|
|
73089
73508
|
const githubPull = parseGitHubPullUrl(source.repositoryUrl);
|
|
73090
73509
|
if (githubPull.ok) {
|
|
73091
73510
|
const baseBranch = safeRemoteBranch(runtime.baseRef) ?? safeRemoteBranch(source.ref) ?? "main";
|
|
73092
|
-
await
|
|
73511
|
+
await execFile8(
|
|
73093
73512
|
"git",
|
|
73094
73513
|
["clone", "--no-checkout", "--depth", "1", githubPull.value.cloneUrl, cloneDir],
|
|
73095
73514
|
{
|
|
73096
73515
|
env: cloneEnv
|
|
73097
73516
|
}
|
|
73098
73517
|
);
|
|
73099
|
-
await
|
|
73518
|
+
await execFile8(
|
|
73100
73519
|
"git",
|
|
73101
73520
|
["fetch", "--depth", "50", "origin", `${baseBranch}:refs/remotes/origin/${baseBranch}`],
|
|
73102
73521
|
{
|
|
@@ -73104,7 +73523,7 @@ var prepareSource = async (runtimeDir, runtime, execFile7, env) => {
|
|
|
73104
73523
|
env: cloneEnv
|
|
73105
73524
|
}
|
|
73106
73525
|
);
|
|
73107
|
-
await
|
|
73526
|
+
await execFile8(
|
|
73108
73527
|
"git",
|
|
73109
73528
|
[
|
|
73110
73529
|
"fetch",
|
|
@@ -73118,7 +73537,7 @@ var prepareSource = async (runtimeDir, runtime, execFile7, env) => {
|
|
|
73118
73537
|
env: cloneEnv
|
|
73119
73538
|
}
|
|
73120
73539
|
);
|
|
73121
|
-
await
|
|
73540
|
+
await execFile8(
|
|
73122
73541
|
"git",
|
|
73123
73542
|
["checkout", "--detach", `refs/remotes/code-sentinel/pr-${githubPull.value.pullNumber}`],
|
|
73124
73543
|
{
|
|
@@ -73129,9 +73548,9 @@ var prepareSource = async (runtimeDir, runtime, execFile7, env) => {
|
|
|
73129
73548
|
return cloneDir;
|
|
73130
73549
|
}
|
|
73131
73550
|
const args = ["clone", "--depth", "1", "--branch", source.ref, source.repositoryUrl, cloneDir];
|
|
73132
|
-
await
|
|
73551
|
+
await execFile8("git", args, { env: cloneEnv });
|
|
73133
73552
|
if (shouldFetchBaseRef(runtime)) {
|
|
73134
|
-
await fetchBaseRef(cloneDir, runtime.baseRef,
|
|
73553
|
+
await fetchBaseRef(cloneDir, runtime.baseRef, execFile8, cloneEnv);
|
|
73135
73554
|
}
|
|
73136
73555
|
return cloneDir;
|
|
73137
73556
|
};
|
|
@@ -73153,7 +73572,7 @@ var runDockerRuntimePrepare = async (options, deps = {}) => {
|
|
|
73153
73572
|
let activePhase = "runtime-config";
|
|
73154
73573
|
try {
|
|
73155
73574
|
const fetchFn = deps.fetchFn ?? fetch;
|
|
73156
|
-
const
|
|
73575
|
+
const execFile8 = deps.execFile ?? execFileAsync3;
|
|
73157
73576
|
const confirmFn = deps.confirmFn ?? ((opts) => confirm(opts));
|
|
73158
73577
|
const interactive = isInteractive(env, deps.isTty);
|
|
73159
73578
|
const baseDir = env.CODE_SENTINEL_RUNTIME_DIR ?? await mkdtemp(
|
|
@@ -73217,7 +73636,7 @@ var runDockerRuntimePrepare = async (options, deps = {}) => {
|
|
|
73217
73636
|
} else {
|
|
73218
73637
|
phaseLog.start(activePhase, `mode=${runtime.source.mode}`);
|
|
73219
73638
|
}
|
|
73220
|
-
const workdir = await prepareSource(baseDir, runtime,
|
|
73639
|
+
const workdir = await prepareSource(baseDir, runtime, execFile8, env);
|
|
73221
73640
|
await access(workdir, constants.R_OK);
|
|
73222
73641
|
if (!mergeRequestSource) {
|
|
73223
73642
|
phaseLog.success(activePhase, `workdir=${workdir}`);
|
|
@@ -75111,6 +75530,7 @@ var buildTextParsedFile = (file) => ({
|
|
|
75111
75530
|
layer: "text",
|
|
75112
75531
|
ast: file.content
|
|
75113
75532
|
});
|
|
75533
|
+
var PENTEST_RULE_CATEGORIES = /* @__PURE__ */ new Set(["mobile-security", "mobile-privacy"]);
|
|
75114
75534
|
var loadMobileRules = async () => {
|
|
75115
75535
|
const result = await loadTsRules({
|
|
75116
75536
|
dirs: [join(builtinRulesDir, "static", "flutter")],
|
|
@@ -75118,7 +75538,9 @@ var loadMobileRules = async () => {
|
|
|
75118
75538
|
});
|
|
75119
75539
|
if (result.ok) {
|
|
75120
75540
|
return {
|
|
75121
|
-
rules: result.value.rules
|
|
75541
|
+
rules: result.value.rules.filter(
|
|
75542
|
+
(rule) => typeof rule.category === "string" && PENTEST_RULE_CATEGORIES.has(rule.category)
|
|
75543
|
+
),
|
|
75122
75544
|
errors: result.value.errors.map((e) => ({ file: e.file, error: e.error }))
|
|
75123
75545
|
};
|
|
75124
75546
|
}
|
|
@@ -75140,6 +75562,10 @@ var toMobileFinding = (raw, rule, sourceFile, runId) => {
|
|
|
75140
75562
|
const snippet = raw.snippet?.trim() || sourceLine || `${rule.id} at line ${line2}`;
|
|
75141
75563
|
return {
|
|
75142
75564
|
ruleId: finding.ruleId,
|
|
75565
|
+
// Only the pentest categories reach this lane (loadMobileRules filters) —
|
|
75566
|
+
// a defensive omit beats an invalid enum value on the server schema.
|
|
75567
|
+
...PENTEST_RULE_CATEGORIES.has(String(rule.category)) ? { category: rule.category } : {},
|
|
75568
|
+
...rule.masvsControlIds?.length ? { masvsControlIds: [...rule.masvsControlIds] } : {},
|
|
75143
75569
|
severity: finding.severity,
|
|
75144
75570
|
title: finding.message,
|
|
75145
75571
|
message: finding.message,
|
|
@@ -75326,6 +75752,18 @@ var resolveEnv = (options) => {
|
|
|
75326
75752
|
}
|
|
75327
75753
|
return { dashboardUrl, token, requestId, projectId };
|
|
75328
75754
|
};
|
|
75755
|
+
var assessmentSeverityOf = (severity) => {
|
|
75756
|
+
switch (severity) {
|
|
75757
|
+
case "error":
|
|
75758
|
+
return "high";
|
|
75759
|
+
case "warning":
|
|
75760
|
+
return "medium";
|
|
75761
|
+
case "info":
|
|
75762
|
+
return "info";
|
|
75763
|
+
default:
|
|
75764
|
+
return "low";
|
|
75765
|
+
}
|
|
75766
|
+
};
|
|
75329
75767
|
var postCallback = async (url, token, body, fetchImpl, options = {}) => {
|
|
75330
75768
|
let res;
|
|
75331
75769
|
try {
|
|
@@ -75457,6 +75895,29 @@ var fetchInputZip = async (ctx, inputId, fetchImpl) => {
|
|
|
75457
75895
|
}
|
|
75458
75896
|
return { path, sha256: sha2563 };
|
|
75459
75897
|
};
|
|
75898
|
+
var findingDisplayPath = (location) => {
|
|
75899
|
+
const candidate = location.file || location.artifactPath || "";
|
|
75900
|
+
return candidate.length > 0 ? candidate : "(artifact)";
|
|
75901
|
+
};
|
|
75902
|
+
var describeCompletionRejection = (body) => {
|
|
75903
|
+
const trimmed = body.trim();
|
|
75904
|
+
if (!trimmed) return "<empty response body>";
|
|
75905
|
+
try {
|
|
75906
|
+
const parsed = JSON.parse(trimmed);
|
|
75907
|
+
const issues = parsed && typeof parsed === "object" && "issues" in parsed ? parsed.issues : void 0;
|
|
75908
|
+
if (Array.isArray(issues) && issues.length > 0) {
|
|
75909
|
+
const summary = issues.slice(0, 10).map((issue) => {
|
|
75910
|
+
const record = issue ?? {};
|
|
75911
|
+
const path = Array.isArray(record.path) ? record.path.join(".") : "<no path>";
|
|
75912
|
+
return `${path}: ${String(record.code ?? "?")} ${String(record.message ?? "")}`.trim();
|
|
75913
|
+
}).join("; ");
|
|
75914
|
+
const extra = issues.length > 10 ? ` (+${issues.length - 10} more)` : "";
|
|
75915
|
+
return `paths=${summary}${extra}`;
|
|
75916
|
+
}
|
|
75917
|
+
} catch {
|
|
75918
|
+
}
|
|
75919
|
+
return trimmed.length > 1e3 ? trimmed.slice(0, 1e3) : trimmed;
|
|
75920
|
+
};
|
|
75460
75921
|
var postStageOutput = async (ctx, output2, fetchImpl) => {
|
|
75461
75922
|
const res = await fetchImpl(
|
|
75462
75923
|
`${ctx.dashboardUrl.replace(/\/+$/, "")}/api/pentest-runner/jobs/${encodeURIComponent(ctx.requestId)}/mobile-stage-output`,
|
|
@@ -75691,12 +76152,22 @@ var runMobileStage = async (options) => {
|
|
|
75691
76152
|
(i) => i.kind === "release" && i.platform === platform && i.status === "received"
|
|
75692
76153
|
);
|
|
75693
76154
|
if (releaseInputs.length === 0) {
|
|
75694
|
-
|
|
75695
|
-
|
|
75696
|
-
|
|
75697
|
-
|
|
75698
|
-
|
|
76155
|
+
await postStageOutput(
|
|
76156
|
+
ctx,
|
|
76157
|
+
{
|
|
76158
|
+
schemaVersion: 1,
|
|
76159
|
+
requestId: ctx.requestId,
|
|
76160
|
+
stage: options.stage,
|
|
76161
|
+
status: "skipped",
|
|
76162
|
+
skipReason: `platform '${platform}' was declared but no release input was received (source-only run)`,
|
|
76163
|
+
inputIds: [],
|
|
76164
|
+
warnings: [],
|
|
76165
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
76166
|
+
},
|
|
76167
|
+
fetchImpl
|
|
75699
76168
|
);
|
|
76169
|
+
await skip(`platform '${platform}': no release input received (source-only run)`);
|
|
76170
|
+
break;
|
|
75700
76171
|
}
|
|
75701
76172
|
const releaseOutputs = [];
|
|
75702
76173
|
const artifactAttemptedChecks = /* @__PURE__ */ new Set();
|
|
@@ -75741,12 +76212,14 @@ var runMobileStage = async (options) => {
|
|
|
75741
76212
|
...f,
|
|
75742
76213
|
platform,
|
|
75743
76214
|
inputId: releaseInputId,
|
|
75744
|
-
location: { kind: "artifact", artifactPath: f.location
|
|
76215
|
+
location: { kind: "artifact", artifactPath: findingDisplayPath(f.location) }
|
|
75745
76216
|
}));
|
|
75746
76217
|
for (const entry of archive.entries) {
|
|
75747
76218
|
if (!/(^|\/)\.env(?:\.[^/]*)?$/i.test(entry.name)) continue;
|
|
75748
76219
|
artifactFindings.push({
|
|
75749
76220
|
ruleId: "mobile/packaged-env-file",
|
|
76221
|
+
category: "mobile-security",
|
|
76222
|
+
masvsControlIds: ["MASVS-STORAGE-2"],
|
|
75750
76223
|
severity: "warning",
|
|
75751
76224
|
platform,
|
|
75752
76225
|
inputId: releaseInputId,
|
|
@@ -76040,7 +76513,11 @@ var runMobileStage = async (options) => {
|
|
|
76040
76513
|
schemaVersion: 1,
|
|
76041
76514
|
// Pinned source output makes a report retry byte-for-byte identical.
|
|
76042
76515
|
generatedAt: source.generatedAt,
|
|
76043
|
-
|
|
76516
|
+
// `||` not `??`: an empty moduleRoot ('' = snapshot root, legal
|
|
76517
|
+
// since the root-module contract change) must fall back to a
|
|
76518
|
+
// DISPLAY value too — the assessment schema requires min(1) here
|
|
76519
|
+
// and an empty targetPath fails mobile-complete validation.
|
|
76520
|
+
targetPath: manifest.manifest?.moduleRoot || "(mobile)",
|
|
76044
76521
|
scope: "mobile-static",
|
|
76045
76522
|
toolVersion: "cs-mobile-stage"
|
|
76046
76523
|
},
|
|
@@ -76074,23 +76551,36 @@ var runMobileStage = async (options) => {
|
|
|
76074
76551
|
title: f.title,
|
|
76075
76552
|
tier: "B",
|
|
76076
76553
|
vulnerabilityClass: f.ruleId,
|
|
76077
|
-
|
|
76554
|
+
// Scope per item (mobile-security | mobile-privacy): lets the
|
|
76555
|
+
// report UI and readers separate security findings from anything
|
|
76556
|
+
// else a rule directory might emit in the future.
|
|
76557
|
+
category: f.category ?? "mobile-security",
|
|
76558
|
+
// MASVS v2 control ids for the assessment page's pillar strip and
|
|
76559
|
+
// grouping — presence scopes WHERE a finding surfaces, it is not
|
|
76560
|
+
// a claim that the control is verified.
|
|
76561
|
+
...f.masvsControlIds?.length ? { masvsControlIds: f.masvsControlIds } : {},
|
|
76562
|
+
severity: assessmentSeverityOf(f.severity),
|
|
76078
76563
|
verdict: "INCONCLUSIVE",
|
|
76079
76564
|
evidence: [
|
|
76080
76565
|
{
|
|
76081
|
-
file: f.location
|
|
76566
|
+
file: findingDisplayPath(f.location),
|
|
76082
76567
|
line: f.location.line ?? 1,
|
|
76083
76568
|
sinkId: f.ruleId,
|
|
76084
76569
|
sourceIds: [f.ruleId],
|
|
76085
76570
|
confidence: f.confidence,
|
|
76086
76571
|
codeContext: f.evidence[0]?.snippet,
|
|
76087
|
-
note: [f.platform, f.inputId, f.limitation].filter(Boolean).join(" | ")
|
|
76572
|
+
note: [f.category, f.platform, f.inputId, f.limitation].filter(Boolean).join(" | ")
|
|
76088
76573
|
}
|
|
76089
76574
|
],
|
|
76090
76575
|
scenarios: []
|
|
76091
76576
|
})),
|
|
76092
76577
|
mobile: {
|
|
76093
76578
|
mode: "static",
|
|
76579
|
+
// Scope disclosure — say plainly when no binary was analyzed
|
|
76580
|
+
// instead of leaving a silent artifactCount 0 in the coverage.
|
|
76581
|
+
...releases.length > 0 ? {} : {
|
|
76582
|
+
scopeNote: "Source-only run: no release artifact was submitted, so binary-level checks (packaged secrets, native libraries, merged manifest) were not tested."
|
|
76583
|
+
},
|
|
76094
76584
|
releases: releases.flatMap((output2) => output2.releaseOutputs ?? []).map((release) => ({
|
|
76095
76585
|
inputId: release.inputId,
|
|
76096
76586
|
platform: release.platform,
|
|
@@ -76112,7 +76602,7 @@ var runMobileStage = async (options) => {
|
|
|
76112
76602
|
source: "static",
|
|
76113
76603
|
findings: collectedFindings.map((f) => ({
|
|
76114
76604
|
ruleId: f.ruleId,
|
|
76115
|
-
file: f.location
|
|
76605
|
+
file: findingDisplayPath(f.location),
|
|
76116
76606
|
line: f.location.line ?? 1,
|
|
76117
76607
|
message: f.message,
|
|
76118
76608
|
severity: f.severity,
|
|
@@ -76136,7 +76626,7 @@ var runMobileStage = async (options) => {
|
|
|
76136
76626
|
if (!completeRes.ok) {
|
|
76137
76627
|
const text2 = await completeRes.text().catch(() => "");
|
|
76138
76628
|
throw new StageError(
|
|
76139
|
-
`mobile-complete failed (HTTP ${completeRes.status}): ${text2
|
|
76629
|
+
`mobile-complete failed (HTTP ${completeRes.status}): ${describeCompletionRejection(text2)}`,
|
|
76140
76630
|
1,
|
|
76141
76631
|
"complete-failed",
|
|
76142
76632
|
completeRes.status >= 500
|
|
@@ -76202,6 +76692,248 @@ init_dist3();
|
|
|
76202
76692
|
init_dist7();
|
|
76203
76693
|
init_load();
|
|
76204
76694
|
init_git_filter();
|
|
76695
|
+
var exec = promisify(execFile$1);
|
|
76696
|
+
var MAVEN_BUNDLE_PREFIX = ".code-sentinel/maven-repository";
|
|
76697
|
+
var GO_OFFLINE = "org.apache.maven.plugins:maven-dependency-plugin:3.8.1:go-offline";
|
|
76698
|
+
var EFFECTIVE_SETTINGS = "org.apache.maven.plugins:maven-help-plugin:3.5.1:effective-settings";
|
|
76699
|
+
var runMaven = async (cwd, args) => {
|
|
76700
|
+
let command = "mvn";
|
|
76701
|
+
let commandArgs = [...args];
|
|
76702
|
+
if (process.platform === "win32") {
|
|
76703
|
+
const found = await exec("where.exe", ["mvn.cmd"], { encoding: "utf8" });
|
|
76704
|
+
const mavenHome = dirname(dirname(found.stdout.trim().split(/\r?\n/)[0] ?? ""));
|
|
76705
|
+
const boot = join(mavenHome, "boot");
|
|
76706
|
+
const launcher = readdirSync(boot).find((name) => /^plexus-classworlds-.*\.jar$/.test(name));
|
|
76707
|
+
if (!launcher) throw new Error("Kh\xF4ng t\xECm th\u1EA5y Maven launcher; ki\u1EC3m tra c\xE0i \u0111\u1EB7t Maven.");
|
|
76708
|
+
command = process.env.JAVA_HOME ? join(process.env.JAVA_HOME, "bin", "java.exe") : "java";
|
|
76709
|
+
commandArgs = [
|
|
76710
|
+
"-classpath",
|
|
76711
|
+
join(boot, launcher),
|
|
76712
|
+
`-Dclassworlds.conf=${join(mavenHome, "bin", "m2.conf")}`,
|
|
76713
|
+
`-Dmaven.home=${mavenHome}`,
|
|
76714
|
+
`-Dmaven.multiModuleProjectDirectory=${cwd}`,
|
|
76715
|
+
"org.codehaus.plexus.classworlds.launcher.Launcher",
|
|
76716
|
+
...args
|
|
76717
|
+
];
|
|
76718
|
+
}
|
|
76719
|
+
try {
|
|
76720
|
+
const result = await exec(command, commandArgs, {
|
|
76721
|
+
cwd,
|
|
76722
|
+
encoding: "utf8",
|
|
76723
|
+
timeout: 10 * 6e4,
|
|
76724
|
+
maxBuffer: 8 * 1024 * 1024
|
|
76725
|
+
});
|
|
76726
|
+
return { ok: true, output: result.stdout };
|
|
76727
|
+
} catch (error) {
|
|
76728
|
+
const result = error;
|
|
76729
|
+
if (result.code === "ENOENT") {
|
|
76730
|
+
throw new Error("C\u1EA7n c\xE0i Maven v\xE0 JDK tr\xEAn m\xE1y \u0111\u1EC3 t\u1EA3i th\u01B0 vi\u1EC7n tr\u01B0\u1EDBc khi ch\u1EA1y cs pentest.");
|
|
76731
|
+
}
|
|
76732
|
+
return { ok: false, output: `${result.stdout ?? ""}
|
|
76733
|
+
${result.stderr ?? ""}` };
|
|
76734
|
+
}
|
|
76735
|
+
};
|
|
76736
|
+
var existsOnCentral = async (path) => {
|
|
76737
|
+
const response = await fetch(`https://repo.maven.apache.org/maven2/${path}`, {
|
|
76738
|
+
method: "HEAD",
|
|
76739
|
+
signal: AbortSignal.timeout(15e3)
|
|
76740
|
+
});
|
|
76741
|
+
if (response.ok) return true;
|
|
76742
|
+
if (response.status === 404) return false;
|
|
76743
|
+
throw new Error(
|
|
76744
|
+
`Ch\u01B0a ki\u1EC3m tra \u0111\u01B0\u1EE3c Maven Central (HTTP ${response.status}); h\xE3y ch\u1EA1y l\u1EA1i cs pentest.`
|
|
76745
|
+
);
|
|
76746
|
+
};
|
|
76747
|
+
var xmlEscape = (text2) => text2.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
76748
|
+
var xmlDecode = (text2) => text2.replaceAll("<", "<").replaceAll(">", ">").replaceAll(""", '"').replaceAll("'", "'").replaceAll("&", "&");
|
|
76749
|
+
var appendXml = (xml, tag, content) => {
|
|
76750
|
+
if (new RegExp(`</${tag}>`).test(xml)) return xml.replace(`</${tag}>`, `${content}</${tag}>`);
|
|
76751
|
+
const empty2 = new RegExp(`<${tag}\\s*/>`);
|
|
76752
|
+
if (empty2.test(xml)) return xml.replace(empty2, `<${tag}>${content}</${tag}>`);
|
|
76753
|
+
return xml.replace("</settings>", `<${tag}>${content}</${tag}></settings>`);
|
|
76754
|
+
};
|
|
76755
|
+
var settingsWithLocalCache = (settings) => {
|
|
76756
|
+
const local = xmlDecode(
|
|
76757
|
+
settings.match(/<localRepository>\s*([^<]+)\s*<\/localRepository>/)?.[1]?.trim() ?? ""
|
|
76758
|
+
);
|
|
76759
|
+
if (!isAbsolute(local) || /<!DOCTYPE|<!ENTITY/i.test(settings)) {
|
|
76760
|
+
throw new Error("Kh\xF4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c \u0111\u01B0\u1EDDng d\u1EABn Maven local repository; ki\u1EC3m tra settings.xml.");
|
|
76761
|
+
}
|
|
76762
|
+
const url = xmlEscape(pathToFileURL(local).href);
|
|
76763
|
+
let merged = appendXml(
|
|
76764
|
+
settings,
|
|
76765
|
+
"profiles",
|
|
76766
|
+
`<profile><id>cs-pentest-cache</id><repositories><repository><id>cs-pentest-cache</id><url>${url}</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled><updatePolicy>never</updatePolicy></snapshots></repository></repositories><pluginRepositories><pluginRepository><id>cs-pentest-cache</id><url>${url}</url><releases><enabled>true</enabled></releases><snapshots><enabled>true</enabled><updatePolicy>never</updatePolicy></snapshots></pluginRepository></pluginRepositories></profile>`
|
|
76767
|
+
);
|
|
76768
|
+
merged = appendXml(merged, "activeProfiles", "<activeProfile>cs-pentest-cache</activeProfile>");
|
|
76769
|
+
merged = appendXml(
|
|
76770
|
+
merged,
|
|
76771
|
+
"mirrors",
|
|
76772
|
+
`<mirror><id>cs-pentest-local-cache</id><mirrorOf>cs-pentest-cache</mirrorOf><url>${url}</url></mirror>`
|
|
76773
|
+
);
|
|
76774
|
+
return merged;
|
|
76775
|
+
};
|
|
76776
|
+
var repositoryFiles = (root) => {
|
|
76777
|
+
const result = [];
|
|
76778
|
+
const visit = (dir) => {
|
|
76779
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
76780
|
+
const path = join(dir, entry.name);
|
|
76781
|
+
if (entry.isDirectory()) visit(path);
|
|
76782
|
+
else if (entry.isFile()) result.push(relative(root, path).split(sep).join("/"));
|
|
76783
|
+
}
|
|
76784
|
+
};
|
|
76785
|
+
visit(root);
|
|
76786
|
+
return result.sort();
|
|
76787
|
+
};
|
|
76788
|
+
var isArtifact = (path) => {
|
|
76789
|
+
const parts = path.split("/");
|
|
76790
|
+
const file = parts.at(-1) ?? "";
|
|
76791
|
+
const artifact = parts.at(-3) ?? "";
|
|
76792
|
+
return parts.length >= 4 && parts.every((part) => /^[A-Za-z0-9._-]+$/.test(part) && part !== "..") && file.startsWith(`${artifact}-`) && /\.(?:pom|jar|aar|war|zip|gz|exe|so|dll)$/.test(file);
|
|
76793
|
+
};
|
|
76794
|
+
var coordinateFromPath = (path) => {
|
|
76795
|
+
const parts = path.split("/");
|
|
76796
|
+
return `${parts.slice(0, -3).join(".")}:${parts.at(-3)}:${parts.at(-2)}`;
|
|
76797
|
+
};
|
|
76798
|
+
var missingMavenCoordinates = (output2) => {
|
|
76799
|
+
const missing = /* @__PURE__ */ new Set();
|
|
76800
|
+
const causes = output2.matchAll(
|
|
76801
|
+
/(?:The following artifacts could not be resolved:|Could not (?:find|transfer) artifact|Failed to read artifact descriptor for|Missing) +([^\r\n]+)/g
|
|
76802
|
+
);
|
|
76803
|
+
for (const cause of causes) {
|
|
76804
|
+
for (const match of (cause[1] ?? "").matchAll(
|
|
76805
|
+
/\b[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+:(?:jar|pom|aar|war|zip)(?::[A-Za-z0-9_.-]+){1,3}/g
|
|
76806
|
+
))
|
|
76807
|
+
missing.add(match[0]);
|
|
76808
|
+
}
|
|
76809
|
+
return [...missing];
|
|
76810
|
+
};
|
|
76811
|
+
var centralPathFor = (coordinate) => {
|
|
76812
|
+
const parts = coordinate.split(":");
|
|
76813
|
+
if (["compile", "runtime", "test", "provided", "system"].includes(parts.at(-1) ?? ""))
|
|
76814
|
+
parts.pop();
|
|
76815
|
+
const [group2 = "", artifact = "", type = "jar", ...suffix] = parts;
|
|
76816
|
+
const version2 = suffix.at(-1) ?? "";
|
|
76817
|
+
const classifier = suffix.length > 1 ? `-${suffix[0]}` : "";
|
|
76818
|
+
return `${group2.replaceAll(".", "/")}/${artifact}/${version2}/${artifact}-${version2}${classifier}.${type}`;
|
|
76819
|
+
};
|
|
76820
|
+
var resolutionError = async (output2, services) => {
|
|
76821
|
+
const missing = missingMavenCoordinates(output2);
|
|
76822
|
+
const privateMissing = (await Promise.all(
|
|
76823
|
+
missing.slice(0, 20).map(async (coordinate) => {
|
|
76824
|
+
try {
|
|
76825
|
+
return await services.existsOnCentral(centralPathFor(coordinate)) ? void 0 : coordinate;
|
|
76826
|
+
} catch {
|
|
76827
|
+
return void 0;
|
|
76828
|
+
}
|
|
76829
|
+
})
|
|
76830
|
+
)).filter((coordinate) => coordinate !== void 0);
|
|
76831
|
+
return new Error(
|
|
76832
|
+
[
|
|
76833
|
+
privateMissing.length ? `C\xF3 th\u01B0 vi\u1EC7n n\u1ED9i b\u1ED9 ho\u1EB7c ngo\xE0i Maven Central c\u1EA7n t\u1EA3i tr\xEAn m\xE1y: ${privateMissing.join(", ")}` : `M\xE1y ch\u01B0a t\u1EA3i \u0111\u1EE7 th\u01B0 vi\u1EC7n Maven${missing.length ? `: ${missing.join(", ")}` : "."}`,
|
|
76834
|
+
"B\u1EA1n c\u1EA7n k\u1EBFt n\u1ED1i VPN/kho Maven c\u1EE7a d\u1EF1 \xE1n v\xE0 t\u1EA3i th\u01B0 vi\u1EC7n v\u1EC1 m\xE1y (ho\u1EB7c c\xE0i JAR k\xE8m POM b\u1EB1ng mvn install:install-file), r\u1ED3i ch\u1EA1y l\u1EA1i cs pentest.",
|
|
76835
|
+
"Ch\u1EC9 khi t\u1EA3i \u0111\u1EE7 th\u01B0 vi\u1EC7n, ch\xFAng t\xF4i m\u1EDBi \u0111\xEDnh k\xE8m v\xE0o ZIP v\xE0 g\u1EEDi l\xEAn server. Ch\u01B0a upload source."
|
|
76836
|
+
].join(String.fromCharCode(10))
|
|
76837
|
+
);
|
|
76838
|
+
};
|
|
76839
|
+
var bundlePentestMavenDependencies = async (plan, services = { runMaven, existsOnCentral }) => {
|
|
76840
|
+
const stage = mkdtempSync(join(tmpdir(), "cs-pentest-maven-"));
|
|
76841
|
+
const cleanup = () => rmSync(stage, { recursive: true, force: true });
|
|
76842
|
+
const progress = setInterval(() => {
|
|
76843
|
+
process.stdout.write(" \u0110ang t\u1EA3i v\xE0 ki\u1EC3m tra th\u01B0 vi\u1EC7n Maven, vui l\xF2ng ch\u1EDD...\n");
|
|
76844
|
+
}, 15e3);
|
|
76845
|
+
progress.unref();
|
|
76846
|
+
try {
|
|
76847
|
+
const cwd = resolve(plan.repoRoot, plan.workspaceRoot);
|
|
76848
|
+
const effective = join(stage, "effective-settings.xml");
|
|
76849
|
+
const settings = join(stage, "client-settings.xml");
|
|
76850
|
+
const repo = join(stage, "repository");
|
|
76851
|
+
const common = [
|
|
76852
|
+
"-B",
|
|
76853
|
+
"-ntp",
|
|
76854
|
+
"-Dstyle.color=never",
|
|
76855
|
+
"-Dmaven.wagon.http.connectionTimeout=5000",
|
|
76856
|
+
"-Dmaven.wagon.http.readTimeout=30000",
|
|
76857
|
+
"-Dmaven.wagon.http.retryHandler.count=1"
|
|
76858
|
+
];
|
|
76859
|
+
const result = await services.runMaven(cwd, [
|
|
76860
|
+
...common,
|
|
76861
|
+
EFFECTIVE_SETTINGS,
|
|
76862
|
+
`-Doutput=${effective}`,
|
|
76863
|
+
"-DshowPasswords=true"
|
|
76864
|
+
]);
|
|
76865
|
+
if (!result.ok) throw await resolutionError(result.output, services);
|
|
76866
|
+
writeFileSync(settings, settingsWithLocalCache(readFileSync(effective, "utf8")), {
|
|
76867
|
+
mode: 384
|
|
76868
|
+
});
|
|
76869
|
+
mkdirSync(repo);
|
|
76870
|
+
const resolved = await services.runMaven(cwd, [
|
|
76871
|
+
...common,
|
|
76872
|
+
"-s",
|
|
76873
|
+
settings,
|
|
76874
|
+
`-Dmaven.repo.local=${repo}`,
|
|
76875
|
+
...plan.buildTarget ? ["-pl", plan.buildTarget, "-am"] : [],
|
|
76876
|
+
GO_OFFLINE,
|
|
76877
|
+
"-DexcludeReactor=true",
|
|
76878
|
+
`-DmarkersDirectory=${join(stage, "markers")}`
|
|
76879
|
+
]);
|
|
76880
|
+
if (!resolved.ok) throw await resolutionError(resolved.output, services);
|
|
76881
|
+
rmSync(effective, { force: true });
|
|
76882
|
+
rmSync(settings, { force: true });
|
|
76883
|
+
const candidates = repositoryFiles(repo).filter(isArtifact);
|
|
76884
|
+
const selected = [];
|
|
76885
|
+
let index2 = 0;
|
|
76886
|
+
let stopped = false;
|
|
76887
|
+
const probes = await Promise.allSettled(
|
|
76888
|
+
Array.from({ length: Math.min(6, candidates.length) }, async () => {
|
|
76889
|
+
while (!stopped && index2 < candidates.length) {
|
|
76890
|
+
const path = candidates[index2++];
|
|
76891
|
+
try {
|
|
76892
|
+
if (path && !await services.existsOnCentral(path)) selected.push(path);
|
|
76893
|
+
} catch (error) {
|
|
76894
|
+
stopped = true;
|
|
76895
|
+
throw error;
|
|
76896
|
+
}
|
|
76897
|
+
}
|
|
76898
|
+
})
|
|
76899
|
+
);
|
|
76900
|
+
for (const probe of probes) if (probe.status === "rejected") throw probe.reason;
|
|
76901
|
+
const entries = selected.sort().map((path) => ({ name: `${MAVEN_BUNDLE_PREFIX}/${path}`, absolutePath: join(repo, path) }));
|
|
76902
|
+
for (const dir of new Set(selected.map(dirname).filter((path) => path.endsWith("-SNAPSHOT")))) {
|
|
76903
|
+
const parts = dir.split("/");
|
|
76904
|
+
const metadata = join(stage, "snapshot-metadata", dir, "maven-metadata-local.xml");
|
|
76905
|
+
mkdirSync(dirname(metadata), { recursive: true });
|
|
76906
|
+
writeFileSync(
|
|
76907
|
+
metadata,
|
|
76908
|
+
`<metadata><groupId>${xmlEscape(parts.slice(0, -2).join("."))}</groupId><artifactId>${xmlEscape(parts.at(-2) ?? "")}</artifactId><version>${xmlEscape(parts.at(-1) ?? "")}</version><versioning><snapshot><localCopy>true</localCopy></snapshot></versioning></metadata>`
|
|
76909
|
+
);
|
|
76910
|
+
entries.push({
|
|
76911
|
+
name: `${MAVEN_BUNDLE_PREFIX}/${dir}/maven-metadata-local.xml`,
|
|
76912
|
+
absolutePath: metadata
|
|
76913
|
+
});
|
|
76914
|
+
}
|
|
76915
|
+
for (const entry of entries) {
|
|
76916
|
+
const target = join(stage, "bundle", entry.name);
|
|
76917
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
76918
|
+
copyFileSync(entry.absolutePath, target);
|
|
76919
|
+
}
|
|
76920
|
+
return {
|
|
76921
|
+
entries: entries.map((entry) => ({
|
|
76922
|
+
...entry,
|
|
76923
|
+
absolutePath: join(stage, "bundle", entry.name)
|
|
76924
|
+
})),
|
|
76925
|
+
artifacts: [...new Set(selected.map(coordinateFromPath))].sort(),
|
|
76926
|
+
cleanup
|
|
76927
|
+
};
|
|
76928
|
+
} catch (error) {
|
|
76929
|
+
cleanup();
|
|
76930
|
+
throw error;
|
|
76931
|
+
} finally {
|
|
76932
|
+
clearInterval(progress);
|
|
76933
|
+
}
|
|
76934
|
+
};
|
|
76935
|
+
|
|
76936
|
+
// src/commands/package.command.ts
|
|
76205
76937
|
var HYPOTHESIS_ENTRY = ".code-sentinel/auth-hypothesis.json";
|
|
76206
76938
|
var DATA_SEED_HYPOTHESIS_ENTRY = ".code-sentinel/data-seed-hypothesis.json";
|
|
76207
76939
|
var AI_TRIAGE_ENTRY = ".code-sentinel/ai-triage-assessment.json";
|
|
@@ -76430,7 +77162,7 @@ H\xE3y ch\u1EA1y \`cs auth login\`.`
|
|
|
76430
77162
|
const cleanEntries = rawPlan.entries.filter(
|
|
76431
77163
|
(e) => e.name !== HYPOTHESIS_ENTRY && e.name !== DATA_SEED_HYPOTHESIS_ENTRY && e.name !== AI_TRIAGE_ENTRY && !e.name.startsWith(".code-sentinel/")
|
|
76432
77164
|
);
|
|
76433
|
-
|
|
77165
|
+
let plan = {
|
|
76434
77166
|
...rawPlan,
|
|
76435
77167
|
entries: cleanEntries,
|
|
76436
77168
|
sourceRevision: gitSourceRevision(
|
|
@@ -76447,13 +77179,27 @@ H\xE3y ch\u1EA1y \`cs auth login\`.`
|
|
|
76447
77179
|
};
|
|
76448
77180
|
const zipStem = plan.modulePath === "." || plan.modulePath === "" ? basename(plan.repoRoot) || "service" : basename(plan.modulePath.replace(/\/$/, "")) || "service";
|
|
76449
77181
|
const outPath = resolve(options.out ?? `${zipStem}.zip`);
|
|
77182
|
+
let dependencyBundle;
|
|
76450
77183
|
let bytes;
|
|
76451
77184
|
try {
|
|
77185
|
+
if (options.resolveMavenDependencies && plan.buildTool === "maven") {
|
|
77186
|
+
process.stdout.write("\u0110ang t\u1EA3i v\xE0 ki\u1EC3m tra th\u01B0 vi\u1EC7n Maven tr\xEAn m\xE1y tr\u01B0\u1EDBc khi \u0111\xF3ng g\xF3i...\n");
|
|
77187
|
+
dependencyBundle = await bundlePentestMavenDependencies(plan);
|
|
77188
|
+
plan = withAdditionalPackageEntries(plan, dependencyBundle.entries);
|
|
77189
|
+
if (dependencyBundle.artifacts.length > 0) {
|
|
77190
|
+
process.stdout.write(
|
|
77191
|
+
`\u0110\xEDnh k\xE8m th\u01B0 vi\u1EC7n n\u1ED9i b\u1ED9/ngo\xE0i Maven Central: ${dependencyBundle.artifacts.join(", ")}
|
|
77192
|
+
`
|
|
77193
|
+
);
|
|
77194
|
+
}
|
|
77195
|
+
}
|
|
76452
77196
|
bytes = writePackageZip(plan, outPath);
|
|
76453
77197
|
} catch (error) {
|
|
76454
77198
|
process.stderr.write(`cs package: ${error instanceof Error ? error.message : String(error)}
|
|
76455
77199
|
`);
|
|
76456
77200
|
return 2;
|
|
77201
|
+
} finally {
|
|
77202
|
+
dependencyBundle?.cleanup();
|
|
76457
77203
|
}
|
|
76458
77204
|
process.stdout.write(`Packaged ${plan.modulePath} \u2192 ${outPath} (${formatBytes(bytes)})
|
|
76459
77205
|
`);
|
|
@@ -76961,7 +77707,7 @@ H\xE3y ch\u1EA1y \`cs auth login\`.`
|
|
|
76961
77707
|
var asFetchBody = (body) => body;
|
|
76962
77708
|
var multipartFile = (fileName2, absolutePath) => {
|
|
76963
77709
|
const formData = new FormData();
|
|
76964
|
-
formData.append("
|
|
77710
|
+
formData.append("archive", new Blob([readFileSync(absolutePath)]), fileName2);
|
|
76965
77711
|
return formData;
|
|
76966
77712
|
};
|
|
76967
77713
|
var runPentestMobileCommand = async (options) => {
|
|
@@ -76982,7 +77728,7 @@ var runPentestMobileCommand = async (options) => {
|
|
|
76982
77728
|
const targetDirKey = realpathSafe(targetDirAbs, targetDirAbs);
|
|
76983
77729
|
const repoRootCanonical = repoRootKey !== null && targetDirKey !== null ? repoRootKey : repoRoot;
|
|
76984
77730
|
const modulePathInput = options.module?.trim();
|
|
76985
|
-
const modulePath = modulePathInput && modulePathInput !== "" ? posix5(modulePathInput) : posix5(relative(repoRootCanonical, targetDirAbs)) || ".";
|
|
77731
|
+
const modulePath = modulePathInput && modulePathInput !== "" ? posix5(modulePathInput) : posix5(relative(repoRootCanonical, targetDirKey ?? targetDirAbs)) || ".";
|
|
76986
77732
|
const moduleDir = resolve(repoRootCanonical, modulePath);
|
|
76987
77733
|
const moduleRel = relative(repoRootCanonical, moduleDir);
|
|
76988
77734
|
if (moduleRel === ".." || moduleRel.startsWith(`..${sep}`)) {
|
|
@@ -77041,8 +77787,8 @@ var runPentestMobileCommand = async (options) => {
|
|
|
77041
77787
|
artifactSpecs.push(parsed.spec);
|
|
77042
77788
|
}
|
|
77043
77789
|
if (artifactSpecs.length === 0) {
|
|
77044
|
-
|
|
77045
|
-
"
|
|
77790
|
+
write(
|
|
77791
|
+
"\u26A0 Kh\xF4ng c\xF3 --artifact: run SOURCE-ONLY \u2014 ch\u1EC9 qu\xE9t m\xE3 ngu\u1ED3n, b\u1ECF qua ph\xE2n t\xEDch binary (APK/IPA)."
|
|
77046
77792
|
);
|
|
77047
77793
|
}
|
|
77048
77794
|
const effectivePlatforms = [
|
|
@@ -77054,7 +77800,7 @@ var runPentestMobileCommand = async (options) => {
|
|
|
77054
77800
|
);
|
|
77055
77801
|
}
|
|
77056
77802
|
write(
|
|
77057
|
-
`Hi\u1EC7u l\u1EF1c: appType=${appType} \xB7 platforms=[${effectivePlatforms.join(", ")}] \xB7 artifact=${artifactSpecs.length}`
|
|
77803
|
+
`Hi\u1EC7u l\u1EF1c: appType=${appType} \xB7 platforms=[${effectivePlatforms.join(", ")}] \xB7 artifact=${artifactSpecs.length}${artifactSpecs.length === 0 ? " (source-only)" : ""}`
|
|
77058
77804
|
);
|
|
77059
77805
|
let manifest;
|
|
77060
77806
|
let sourceZipPath;
|
|
@@ -77155,7 +77901,9 @@ var runPentestMobileCommand = async (options) => {
|
|
|
77155
77901
|
version: 1,
|
|
77156
77902
|
appType,
|
|
77157
77903
|
platforms: effectivePlatforms,
|
|
77158
|
-
|
|
77904
|
+
// `''` is the contract's canonical spelling for "module = snapshot root"
|
|
77905
|
+
// (a single-app Flutter/Android/iOS repo); `.` is rejected by the schema.
|
|
77906
|
+
moduleRoot: modulePath === "." ? "" : modulePath,
|
|
77159
77907
|
source: {
|
|
77160
77908
|
archiveName: basename(outPath),
|
|
77161
77909
|
sha256: sha256File(outPath),
|
|
@@ -79960,6 +80708,25 @@ var selectExtractedWorkspaceRoot = async (workspace) => {
|
|
|
79960
80708
|
}
|
|
79961
80709
|
return nestedWorkspace;
|
|
79962
80710
|
};
|
|
80711
|
+
var isRecoverableUnzipExit = (error) => error?.code === 1;
|
|
80712
|
+
var countExtractedFiles = async (root) => {
|
|
80713
|
+
const entries = await readdir(root, { withFileTypes: true });
|
|
80714
|
+
let files = 0;
|
|
80715
|
+
for (const entry of entries) {
|
|
80716
|
+
if (entry.isDirectory()) files += await countExtractedFiles(join(root, entry.name));
|
|
80717
|
+
else files += 1;
|
|
80718
|
+
}
|
|
80719
|
+
return files;
|
|
80720
|
+
};
|
|
80721
|
+
var assertCompleteExtraction = async (workspace, entries) => {
|
|
80722
|
+
const expected = entries.filter((entry) => !entry.replace(/\\/g, "/").endsWith("/")).length;
|
|
80723
|
+
const extracted = await countExtractedFiles(workspace);
|
|
80724
|
+
if (extracted !== expected) {
|
|
80725
|
+
throw new Error(
|
|
80726
|
+
`zip archive extracted incompletely: ${extracted} of ${expected} files present`
|
|
80727
|
+
);
|
|
80728
|
+
}
|
|
80729
|
+
};
|
|
79963
80730
|
var extractArchive = async (archivePath, workspace) => {
|
|
79964
80731
|
const listing = await execFileAsync4("unzip", ["-Z1", archivePath], {
|
|
79965
80732
|
maxBuffer: 10 * 1024 * 1024
|
|
@@ -79968,10 +80735,15 @@ var extractArchive = async (archivePath, workspace) => {
|
|
|
79968
80735
|
if (entries.length === 0) throw new Error("zip archive has no entries");
|
|
79969
80736
|
if (entries.length > 2e4) throw new Error("zip archive has too many entries");
|
|
79970
80737
|
for (const entry of entries) assertSafeZipEntry(entry);
|
|
79971
|
-
|
|
79972
|
-
|
|
79973
|
-
|
|
80738
|
+
try {
|
|
80739
|
+
await execFileAsync4("unzip", ["-q", archivePath, "-d", workspace], {
|
|
80740
|
+
maxBuffer: 10 * 1024 * 1024
|
|
80741
|
+
});
|
|
80742
|
+
} catch (error) {
|
|
80743
|
+
if (!isRecoverableUnzipExit(error)) throw error;
|
|
80744
|
+
}
|
|
79974
80745
|
await assertNoSymlinks(workspace);
|
|
80746
|
+
await assertCompleteExtraction(workspace, entries);
|
|
79975
80747
|
return selectExtractedWorkspaceRoot(workspace);
|
|
79976
80748
|
};
|
|
79977
80749
|
var runReviewProcess = async (args) => {
|
|
@@ -82937,6 +83709,7 @@ var buildProgram = () => {
|
|
|
82937
83709
|
targetDir,
|
|
82938
83710
|
push: true,
|
|
82939
83711
|
// Always push by default for pentest
|
|
83712
|
+
resolveMavenDependencies: true,
|
|
82940
83713
|
...typeof options.preferredBuildScript === "string" && options.preferredBuildScript.length > 0 ? { preferredBuildScript: options.preferredBuildScript } : {}
|
|
82941
83714
|
});
|
|
82942
83715
|
}
|
|
@@ -83077,13 +83850,13 @@ var buildProgram = () => {
|
|
|
83077
83850
|
).option(
|
|
83078
83851
|
"--e1-trust-tier <tier>",
|
|
83079
83852
|
"trusted-internal | trusted-local | untrusted cho evidence E1"
|
|
83080
|
-
).option(
|
|
83853
|
+
).option("--liferay-e1 <file>", "b\xE1o c\xE1o HTTP E1 c\u1EE7a portal Liferay disposable").option(
|
|
83081
83854
|
"--dast-plan <dir>",
|
|
83082
83855
|
"th\u01B0 m\u1EE5c k\u1EBF ho\u1EA1ch t\u1EEB `cs assess --emit-dast` (g\u1ED9p runtime E2/DAST, c\u1EA7n c\u1EA3 --dast-report)"
|
|
83083
83856
|
).option(
|
|
83084
83857
|
"--dast-report <path>",
|
|
83085
83858
|
"file JSON report ZAP (g\u1ED9p runtime E2/DAST, c\u1EA7n c\u1EA3 --dast-plan)"
|
|
83086
|
-
).option(
|
|
83859
|
+
).option("--route-prefix <path>", "JAX-RS /o/... prefix c\u1EE7a portal Liferay disposable").option(
|
|
83087
83860
|
"--dast-messages <file>",
|
|
83088
83861
|
"export `core/view/messages` c\u1EE7a ZAP \u2014 \u0111\u1ED9 ph\u1EE7 per-target tr\xEAn tr\u1EE5c E2, CH\u1EC8 b\xE1o c\xE1o (ADR-0051 #8.4.4; c\u1EA7n c\u1EA3 --dast-plan + --dast-report)"
|
|
83089
83862
|
).option(
|
|
@@ -83141,8 +83914,10 @@ var buildProgram = () => {
|
|
|
83141
83914
|
...typeof opts.results === "string" && opts.results.length > 0 ? { results: opts.results } : {},
|
|
83142
83915
|
...typeof opts.e1Evidence === "string" && opts.e1Evidence.length > 0 ? { e1Evidence: opts.e1Evidence } : {},
|
|
83143
83916
|
...typeof opts.e1TrustTier === "string" && opts.e1TrustTier.length > 0 ? { e1TrustTier: opts.e1TrustTier } : {},
|
|
83917
|
+
...typeof opts.liferayE1 === "string" && opts.liferayE1.length > 0 ? { liferayE1: opts.liferayE1 } : {},
|
|
83144
83918
|
...typeof opts.dastPlan === "string" && opts.dastPlan.length > 0 ? { dastPlan: opts.dastPlan } : {},
|
|
83145
83919
|
...typeof opts.dastReport === "string" && opts.dastReport.length > 0 ? { dastReport: opts.dastReport } : {},
|
|
83920
|
+
...typeof opts.routePrefix === "string" && opts.routePrefix.length > 0 ? { routePrefix: opts.routePrefix } : {},
|
|
83146
83921
|
...typeof opts.dastMessages === "string" && opts.dastMessages.length > 0 ? { dastMessages: opts.dastMessages } : {},
|
|
83147
83922
|
dastScanCompleted: opts.dastScanCompleted === true,
|
|
83148
83923
|
...typeof opts.dastAttestation === "string" && opts.dastAttestation.length > 0 ? { dastAttestation: opts.dastAttestation } : {},
|
|
@@ -83172,7 +83947,7 @@ var buildProgram = () => {
|
|
|
83172
83947
|
).requiredOption(
|
|
83173
83948
|
"--report <path>",
|
|
83174
83949
|
"file JSON report ZAP (traditional-json-plus ho\u1EB7c traditional-json) do l\u1EA7n ch\u1EA1y c\u1EE7a b\u1EA1n sinh"
|
|
83175
|
-
).option(
|
|
83950
|
+
).option("--route-prefix <path>", "JAX-RS /o/... prefix c\u1EE7a portal Liferay disposable").option(
|
|
83176
83951
|
"-o, --output <file>",
|
|
83177
83952
|
"report output path (default code-sentinel-dast-verification.md)"
|
|
83178
83953
|
).option("--attestation <file>", "execution attestation JSON (ADR-0051 #8.3 provenance)").option(
|
|
@@ -83206,6 +83981,7 @@ var buildProgram = () => {
|
|
|
83206
83981
|
process.exitCode = await runDastVerify({
|
|
83207
83982
|
...typeof opts.plan === "string" && opts.plan.length > 0 ? { plan: opts.plan } : {},
|
|
83208
83983
|
...typeof opts.report === "string" && opts.report.length > 0 ? { report: opts.report } : {},
|
|
83984
|
+
...typeof opts.routePrefix === "string" && opts.routePrefix.length > 0 ? { routePrefix: opts.routePrefix } : {},
|
|
83209
83985
|
...opts.output ? { output: opts.output } : {},
|
|
83210
83986
|
...typeof opts.attestation === "string" && opts.attestation.length > 0 ? { attestation: opts.attestation } : {},
|
|
83211
83987
|
...typeof opts.provenancePolicy === "string" && opts.provenancePolicy.length > 0 ? { provenancePolicy: opts.provenancePolicy } : {},
|