xploitscan-shared-rules 2.4.25 → 2.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -169,7 +169,7 @@ interface CustomRule {
169
169
  * before a scan can be saved without enough provenance to explain a changed
170
170
  * grade.
171
171
  */
172
- declare const SCANNER_VERSION = "2.4.25";
172
+ declare const SCANNER_VERSION = "2.4.26";
173
173
 
174
174
  /**
175
175
  * Line-oriented helpers shared by every rule. Pure string manipulation — no fs
@@ -1266,7 +1266,16 @@ declare function authPrefixCovers(prefix: string, path: string): boolean;
1266
1266
  declare function isAnchoredPublicAuthPath(routePath: string): boolean;
1267
1267
  declare function isOgRoutePath(routePath: string): boolean;
1268
1268
  declare function routePathFromFile(filePath: string): string | null;
1269
- declare function widenedAuthSuppresses(content: string, filePath: string, index: number, handler: string | null): boolean;
1269
+ declare function widenedAuthSuppresses(content: string, filePath: string, index: number, handler: string | null, rawContent?: string, capability?: boolean, strictApp?: boolean): boolean;
1270
+
1271
+ declare function setStructuralFaultForTest(name: string | null): void;
1272
+ declare function structuralParseCount(): number;
1273
+ declare function resetStructuralState(): void;
1274
+ declare function publicHttpsUrl(value: string): boolean;
1275
+ declare function publicReadOnlyHandler(content: string, filePath: string, index: number, strictApp?: boolean): boolean;
1276
+ declare function capabilityTokenHandler(content: string, filePath: string, index: number): boolean;
1277
+ declare function bearerProvenanceSafe(content: string, filePath: string, index: number): boolean;
1278
+ declare function refineDirectObjectFindings(content: string, filePath: string, legacyLines: number[]): number[] | null;
1270
1279
 
1271
1280
  /**
1272
1281
  * Rule-set sizes as plain numbers, importable without dragging the rules in.
@@ -1840,4 +1849,4 @@ input: {
1840
1849
  content: string;
1841
1850
  }[] | QualityContext, rules?: QualityRule[]): Finding[];
1842
1851
 
1843
- export { type AIFilterResult, type AiDegraded, AiReason, AiStatus, AiSurface, type AppRoute, BILLING_WEBHOOK_UNMATCHED_KEYS, type BuilderFingerprint, CHECKABLE_CLAIMS, type Confidence, type CustomRule, DOTENV_ASSIGN_RE, type DetectedFramework, type ExposedConfig, type Exposure, FREE_RULE_COUNT, type FilteredFinding, type Finding, GRADE_FINDINGS_PER_RULE, type GradeOptions, type GradeResult, type HeaderFinding, INTENT_EXPECTATIONS, type IntentExpectation, type IntentMismatch, type IntentOrigin, type IntentReport, type IntentStatement, KEEP_SEVERITY_IN_TESTS, MODEL_ANALYSIS, MODEL_POLICY_REVIEWED, MODEL_REVIEW_INTERVAL_DAYS, MODEL_TEMPERATURE, MODEL_TRIAGE, NON_APP_PATH_PATTERNS, PLAN_UNVERIFIED_NOTICE, PRO_RULE_COUNT, PUBLIC_ENV_PREFIX_RE, type ParsedFile, PlanCause, type ProjectContext, QUALITY_EXAMPLES, type QualityContext, type QualityExample, type QualityFile, type QualityHit, type QualityRule, RULE_IMPACTS, type RouteFramework, type RouteTable, type RuleMatch, SCANNER_VERSION, SCAN_AI_DEGRADED_KEYS, SCAN_TOKEN_NULL_KEYS, SERVER_ACTION_WRITE_RE, type SecurityGrade, type Severity, TEST_FILE_PATTERN, TOTAL_RULE_COUNT, type TaintMap, type TargetCheck, type VibePlatform, aiStatusLine, allRules, applyTestPathSeverity, assessHeaders, astMatch, authPrefixCovers, billingWebhookUnmatchedProps, bucketFiles, buildProjectContext, buildQualityContext, buildReviewPrompt, buildTaintMap, calculateGrade, callSpreads, checkIntent, classifyExposure, classifyPublicEnvVar, classifyStatement, clientSideAuth, complianceMap, consoleLogProduction, corsWildcard, dangerousInnerHTML, deduplicateFindings, detectBuilder, detectExposedConfig, detectFramework, detectPlatform, disabledTLSVerification, dotenvValue, emptyCatchBlock, enclosingHandler, envNotGitignored, evalUsage, exposedAuthSecret, exposedDebugMode, exposedEnvFile, exposedStackTraces, extractRoutes, extractScriptUrls, filterFalsePositives, filterSilenced, findMatches, findMatchesAt, findSourceMapRefs, freeRules, getObjectProperty, getSnippet, gradeRuleFamily, hardcodedJWTSecret, hardcodedSecretValues, hardcodedSecrets, harvestIntent, insecureCookies, insecureRandomness, isAnchoredPublicAuthPath, isCalleeNamed, isClientTarget, isCommentLine, isDotenvPath, isInlineSilenced, isInsideFixMessage, isLineSilenced, isLive, isMethodCall, isOgRoutePath, isPrivateAddress, isProtectedFromAiRemoval, isSbomPath, isServerSideFile, isServerTarget, isTestFile, isTestPath, isUngradedFinding, isVendoredFinding, isVendoredPath, lineNumberAt, lineTextAt, maskComments, maskOutboundAuthNoise, maskSecretValue, missingAuthMiddleware, missingCSP, missingErrorBoundary, missingHTTPS, missingLockFile, newDataFence, nextPublicSecret, noRateLimiting, normalizeScanPath, packReviewBatches, parseFile, parseScanTarget, parseSupabaseConfig, perCallTimeoutMs, planCause, qualityRules, replaceBlockComments, routeForFile, routePathFromFile, runCustomRules, scanAiDegradedProps, scanConfigs, scanDependencies, scanEntropy, scanMultiFile, scanQuality, scanTokenNullProps, sqlInjection, stripeWebhookUnprotected, supabaseFunctionName, supabaseNoRLS, testPathHold, toAiDegraded, todoLeftInCode, tryParse, unknownAiStatus, unmeasuredQualityRules, unvalidatedRedirect, vendoredReason, visitBinary, visitCalls, weakHashing, widenedAuthSuppresses, xssVulnerability };
1852
+ export { type AIFilterResult, type AiDegraded, AiReason, AiStatus, AiSurface, type AppRoute, BILLING_WEBHOOK_UNMATCHED_KEYS, type BuilderFingerprint, CHECKABLE_CLAIMS, type Confidence, type CustomRule, DOTENV_ASSIGN_RE, type DetectedFramework, type ExposedConfig, type Exposure, FREE_RULE_COUNT, type FilteredFinding, type Finding, GRADE_FINDINGS_PER_RULE, type GradeOptions, type GradeResult, type HeaderFinding, INTENT_EXPECTATIONS, type IntentExpectation, type IntentMismatch, type IntentOrigin, type IntentReport, type IntentStatement, KEEP_SEVERITY_IN_TESTS, MODEL_ANALYSIS, MODEL_POLICY_REVIEWED, MODEL_REVIEW_INTERVAL_DAYS, MODEL_TEMPERATURE, MODEL_TRIAGE, NON_APP_PATH_PATTERNS, PLAN_UNVERIFIED_NOTICE, PRO_RULE_COUNT, PUBLIC_ENV_PREFIX_RE, type ParsedFile, PlanCause, type ProjectContext, QUALITY_EXAMPLES, type QualityContext, type QualityExample, type QualityFile, type QualityHit, type QualityRule, RULE_IMPACTS, type RouteFramework, type RouteTable, type RuleMatch, SCANNER_VERSION, SCAN_AI_DEGRADED_KEYS, SCAN_TOKEN_NULL_KEYS, SERVER_ACTION_WRITE_RE, type SecurityGrade, type Severity, TEST_FILE_PATTERN, TOTAL_RULE_COUNT, type TaintMap, type TargetCheck, type VibePlatform, aiStatusLine, allRules, applyTestPathSeverity, assessHeaders, astMatch, authPrefixCovers, bearerProvenanceSafe, billingWebhookUnmatchedProps, bucketFiles, buildProjectContext, buildQualityContext, buildReviewPrompt, buildTaintMap, calculateGrade, callSpreads, capabilityTokenHandler, checkIntent, classifyExposure, classifyPublicEnvVar, classifyStatement, clientSideAuth, complianceMap, consoleLogProduction, corsWildcard, dangerousInnerHTML, deduplicateFindings, detectBuilder, detectExposedConfig, detectFramework, detectPlatform, disabledTLSVerification, dotenvValue, emptyCatchBlock, enclosingHandler, envNotGitignored, evalUsage, exposedAuthSecret, exposedDebugMode, exposedEnvFile, exposedStackTraces, extractRoutes, extractScriptUrls, filterFalsePositives, filterSilenced, findMatches, findMatchesAt, findSourceMapRefs, freeRules, getObjectProperty, getSnippet, gradeRuleFamily, hardcodedJWTSecret, hardcodedSecretValues, hardcodedSecrets, harvestIntent, insecureCookies, insecureRandomness, isAnchoredPublicAuthPath, isCalleeNamed, isClientTarget, isCommentLine, isDotenvPath, isInlineSilenced, isInsideFixMessage, isLineSilenced, isLive, isMethodCall, isOgRoutePath, isPrivateAddress, isProtectedFromAiRemoval, isSbomPath, isServerSideFile, isServerTarget, isTestFile, isTestPath, isUngradedFinding, isVendoredFinding, isVendoredPath, lineNumberAt, lineTextAt, maskComments, maskOutboundAuthNoise, maskSecretValue, missingAuthMiddleware, missingCSP, missingErrorBoundary, missingHTTPS, missingLockFile, newDataFence, nextPublicSecret, noRateLimiting, normalizeScanPath, packReviewBatches, parseFile, parseScanTarget, parseSupabaseConfig, perCallTimeoutMs, planCause, publicHttpsUrl, publicReadOnlyHandler, qualityRules, refineDirectObjectFindings, replaceBlockComments, resetStructuralState, routeForFile, routePathFromFile, runCustomRules, scanAiDegradedProps, scanConfigs, scanDependencies, scanEntropy, scanMultiFile, scanQuality, scanTokenNullProps, setStructuralFaultForTest, sqlInjection, stripeWebhookUnprotected, structuralParseCount, supabaseFunctionName, supabaseNoRLS, testPathHold, toAiDegraded, todoLeftInCode, tryParse, unknownAiStatus, unmeasuredQualityRules, unvalidatedRedirect, vendoredReason, visitBinary, visitCalls, weakHashing, widenedAuthSuppresses, xssVulnerability };
package/dist/index.d.ts CHANGED
@@ -169,7 +169,7 @@ interface CustomRule {
169
169
  * before a scan can be saved without enough provenance to explain a changed
170
170
  * grade.
171
171
  */
172
- declare const SCANNER_VERSION = "2.4.25";
172
+ declare const SCANNER_VERSION = "2.4.26";
173
173
 
174
174
  /**
175
175
  * Line-oriented helpers shared by every rule. Pure string manipulation — no fs
@@ -1266,7 +1266,16 @@ declare function authPrefixCovers(prefix: string, path: string): boolean;
1266
1266
  declare function isAnchoredPublicAuthPath(routePath: string): boolean;
1267
1267
  declare function isOgRoutePath(routePath: string): boolean;
1268
1268
  declare function routePathFromFile(filePath: string): string | null;
1269
- declare function widenedAuthSuppresses(content: string, filePath: string, index: number, handler: string | null): boolean;
1269
+ declare function widenedAuthSuppresses(content: string, filePath: string, index: number, handler: string | null, rawContent?: string, capability?: boolean, strictApp?: boolean): boolean;
1270
+
1271
+ declare function setStructuralFaultForTest(name: string | null): void;
1272
+ declare function structuralParseCount(): number;
1273
+ declare function resetStructuralState(): void;
1274
+ declare function publicHttpsUrl(value: string): boolean;
1275
+ declare function publicReadOnlyHandler(content: string, filePath: string, index: number, strictApp?: boolean): boolean;
1276
+ declare function capabilityTokenHandler(content: string, filePath: string, index: number): boolean;
1277
+ declare function bearerProvenanceSafe(content: string, filePath: string, index: number): boolean;
1278
+ declare function refineDirectObjectFindings(content: string, filePath: string, legacyLines: number[]): number[] | null;
1270
1279
 
1271
1280
  /**
1272
1281
  * Rule-set sizes as plain numbers, importable without dragging the rules in.
@@ -1840,4 +1849,4 @@ input: {
1840
1849
  content: string;
1841
1850
  }[] | QualityContext, rules?: QualityRule[]): Finding[];
1842
1851
 
1843
- export { type AIFilterResult, type AiDegraded, AiReason, AiStatus, AiSurface, type AppRoute, BILLING_WEBHOOK_UNMATCHED_KEYS, type BuilderFingerprint, CHECKABLE_CLAIMS, type Confidence, type CustomRule, DOTENV_ASSIGN_RE, type DetectedFramework, type ExposedConfig, type Exposure, FREE_RULE_COUNT, type FilteredFinding, type Finding, GRADE_FINDINGS_PER_RULE, type GradeOptions, type GradeResult, type HeaderFinding, INTENT_EXPECTATIONS, type IntentExpectation, type IntentMismatch, type IntentOrigin, type IntentReport, type IntentStatement, KEEP_SEVERITY_IN_TESTS, MODEL_ANALYSIS, MODEL_POLICY_REVIEWED, MODEL_REVIEW_INTERVAL_DAYS, MODEL_TEMPERATURE, MODEL_TRIAGE, NON_APP_PATH_PATTERNS, PLAN_UNVERIFIED_NOTICE, PRO_RULE_COUNT, PUBLIC_ENV_PREFIX_RE, type ParsedFile, PlanCause, type ProjectContext, QUALITY_EXAMPLES, type QualityContext, type QualityExample, type QualityFile, type QualityHit, type QualityRule, RULE_IMPACTS, type RouteFramework, type RouteTable, type RuleMatch, SCANNER_VERSION, SCAN_AI_DEGRADED_KEYS, SCAN_TOKEN_NULL_KEYS, SERVER_ACTION_WRITE_RE, type SecurityGrade, type Severity, TEST_FILE_PATTERN, TOTAL_RULE_COUNT, type TaintMap, type TargetCheck, type VibePlatform, aiStatusLine, allRules, applyTestPathSeverity, assessHeaders, astMatch, authPrefixCovers, billingWebhookUnmatchedProps, bucketFiles, buildProjectContext, buildQualityContext, buildReviewPrompt, buildTaintMap, calculateGrade, callSpreads, checkIntent, classifyExposure, classifyPublicEnvVar, classifyStatement, clientSideAuth, complianceMap, consoleLogProduction, corsWildcard, dangerousInnerHTML, deduplicateFindings, detectBuilder, detectExposedConfig, detectFramework, detectPlatform, disabledTLSVerification, dotenvValue, emptyCatchBlock, enclosingHandler, envNotGitignored, evalUsage, exposedAuthSecret, exposedDebugMode, exposedEnvFile, exposedStackTraces, extractRoutes, extractScriptUrls, filterFalsePositives, filterSilenced, findMatches, findMatchesAt, findSourceMapRefs, freeRules, getObjectProperty, getSnippet, gradeRuleFamily, hardcodedJWTSecret, hardcodedSecretValues, hardcodedSecrets, harvestIntent, insecureCookies, insecureRandomness, isAnchoredPublicAuthPath, isCalleeNamed, isClientTarget, isCommentLine, isDotenvPath, isInlineSilenced, isInsideFixMessage, isLineSilenced, isLive, isMethodCall, isOgRoutePath, isPrivateAddress, isProtectedFromAiRemoval, isSbomPath, isServerSideFile, isServerTarget, isTestFile, isTestPath, isUngradedFinding, isVendoredFinding, isVendoredPath, lineNumberAt, lineTextAt, maskComments, maskOutboundAuthNoise, maskSecretValue, missingAuthMiddleware, missingCSP, missingErrorBoundary, missingHTTPS, missingLockFile, newDataFence, nextPublicSecret, noRateLimiting, normalizeScanPath, packReviewBatches, parseFile, parseScanTarget, parseSupabaseConfig, perCallTimeoutMs, planCause, qualityRules, replaceBlockComments, routeForFile, routePathFromFile, runCustomRules, scanAiDegradedProps, scanConfigs, scanDependencies, scanEntropy, scanMultiFile, scanQuality, scanTokenNullProps, sqlInjection, stripeWebhookUnprotected, supabaseFunctionName, supabaseNoRLS, testPathHold, toAiDegraded, todoLeftInCode, tryParse, unknownAiStatus, unmeasuredQualityRules, unvalidatedRedirect, vendoredReason, visitBinary, visitCalls, weakHashing, widenedAuthSuppresses, xssVulnerability };
1852
+ export { type AIFilterResult, type AiDegraded, AiReason, AiStatus, AiSurface, type AppRoute, BILLING_WEBHOOK_UNMATCHED_KEYS, type BuilderFingerprint, CHECKABLE_CLAIMS, type Confidence, type CustomRule, DOTENV_ASSIGN_RE, type DetectedFramework, type ExposedConfig, type Exposure, FREE_RULE_COUNT, type FilteredFinding, type Finding, GRADE_FINDINGS_PER_RULE, type GradeOptions, type GradeResult, type HeaderFinding, INTENT_EXPECTATIONS, type IntentExpectation, type IntentMismatch, type IntentOrigin, type IntentReport, type IntentStatement, KEEP_SEVERITY_IN_TESTS, MODEL_ANALYSIS, MODEL_POLICY_REVIEWED, MODEL_REVIEW_INTERVAL_DAYS, MODEL_TEMPERATURE, MODEL_TRIAGE, NON_APP_PATH_PATTERNS, PLAN_UNVERIFIED_NOTICE, PRO_RULE_COUNT, PUBLIC_ENV_PREFIX_RE, type ParsedFile, PlanCause, type ProjectContext, QUALITY_EXAMPLES, type QualityContext, type QualityExample, type QualityFile, type QualityHit, type QualityRule, RULE_IMPACTS, type RouteFramework, type RouteTable, type RuleMatch, SCANNER_VERSION, SCAN_AI_DEGRADED_KEYS, SCAN_TOKEN_NULL_KEYS, SERVER_ACTION_WRITE_RE, type SecurityGrade, type Severity, TEST_FILE_PATTERN, TOTAL_RULE_COUNT, type TaintMap, type TargetCheck, type VibePlatform, aiStatusLine, allRules, applyTestPathSeverity, assessHeaders, astMatch, authPrefixCovers, bearerProvenanceSafe, billingWebhookUnmatchedProps, bucketFiles, buildProjectContext, buildQualityContext, buildReviewPrompt, buildTaintMap, calculateGrade, callSpreads, capabilityTokenHandler, checkIntent, classifyExposure, classifyPublicEnvVar, classifyStatement, clientSideAuth, complianceMap, consoleLogProduction, corsWildcard, dangerousInnerHTML, deduplicateFindings, detectBuilder, detectExposedConfig, detectFramework, detectPlatform, disabledTLSVerification, dotenvValue, emptyCatchBlock, enclosingHandler, envNotGitignored, evalUsage, exposedAuthSecret, exposedDebugMode, exposedEnvFile, exposedStackTraces, extractRoutes, extractScriptUrls, filterFalsePositives, filterSilenced, findMatches, findMatchesAt, findSourceMapRefs, freeRules, getObjectProperty, getSnippet, gradeRuleFamily, hardcodedJWTSecret, hardcodedSecretValues, hardcodedSecrets, harvestIntent, insecureCookies, insecureRandomness, isAnchoredPublicAuthPath, isCalleeNamed, isClientTarget, isCommentLine, isDotenvPath, isInlineSilenced, isInsideFixMessage, isLineSilenced, isLive, isMethodCall, isOgRoutePath, isPrivateAddress, isProtectedFromAiRemoval, isSbomPath, isServerSideFile, isServerTarget, isTestFile, isTestPath, isUngradedFinding, isVendoredFinding, isVendoredPath, lineNumberAt, lineTextAt, maskComments, maskOutboundAuthNoise, maskSecretValue, missingAuthMiddleware, missingCSP, missingErrorBoundary, missingHTTPS, missingLockFile, newDataFence, nextPublicSecret, noRateLimiting, normalizeScanPath, packReviewBatches, parseFile, parseScanTarget, parseSupabaseConfig, perCallTimeoutMs, planCause, publicHttpsUrl, publicReadOnlyHandler, qualityRules, refineDirectObjectFindings, replaceBlockComments, resetStructuralState, routeForFile, routePathFromFile, runCustomRules, scanAiDegradedProps, scanConfigs, scanDependencies, scanEntropy, scanMultiFile, scanQuality, scanTokenNullProps, setStructuralFaultForTest, sqlInjection, stripeWebhookUnprotected, structuralParseCount, supabaseFunctionName, supabaseNoRLS, testPathHold, toAiDegraded, todoLeftInCode, tryParse, unknownAiStatus, unmeasuredQualityRules, unvalidatedRedirect, vendoredReason, visitBinary, visitCalls, weakHashing, widenedAuthSuppresses, xssVulnerability };