xploitscan-shared-rules 2.4.11 → 2.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +676 -419
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +674 -419
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -33,6 +33,11 @@ interface ProjectContext {
|
|
|
33
33
|
* unknown rather than assuming either way.
|
|
34
34
|
*/
|
|
35
35
|
supabaseEdgeVerifyJwt?: Map<string, boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* App Router route files whose every handler only delegates to an imported
|
|
38
|
+
* function that opens with a shared-secret check. VC003 skips their handlers.
|
|
39
|
+
*/
|
|
40
|
+
secretGuardedRoutes?: Set<string>;
|
|
36
41
|
}
|
|
37
42
|
/**
|
|
38
43
|
* Parse `supabase/config.toml` for per-function `verify_jwt` settings.
|
|
@@ -160,7 +165,7 @@ interface CustomRule {
|
|
|
160
165
|
* before a scan can be saved without enough provenance to explain a changed
|
|
161
166
|
* grade.
|
|
162
167
|
*/
|
|
163
|
-
declare const SCANNER_VERSION = "2.4.
|
|
168
|
+
declare const SCANNER_VERSION = "2.4.13";
|
|
164
169
|
|
|
165
170
|
/**
|
|
166
171
|
* Line-oriented helpers shared by every rule. Pure string manipulation — no fs
|
|
@@ -1092,6 +1097,11 @@ declare function tryParse(content: string, filePath: string): {
|
|
|
1092
1097
|
taint: TaintMap;
|
|
1093
1098
|
} | null;
|
|
1094
1099
|
declare const hardcodedSecrets: CustomRule;
|
|
1100
|
+
/**
|
|
1101
|
+
* Secret strings VC001 would report for this text. Same patterns and the same
|
|
1102
|
+
* filters as `hardcodedSecrets.check` — no second copy of the regexes.
|
|
1103
|
+
*/
|
|
1104
|
+
declare function hardcodedSecretValues(content: string, filePath: string): string[];
|
|
1095
1105
|
declare const exposedEnvFile: CustomRule;
|
|
1096
1106
|
/**
|
|
1097
1107
|
* Blank the parts of a file that LOOK like caller authentication but are the
|
|
@@ -1362,6 +1372,16 @@ declare function scanEntropy(files: {
|
|
|
1362
1372
|
content: string;
|
|
1363
1373
|
}[]): Finding[];
|
|
1364
1374
|
|
|
1375
|
+
/**
|
|
1376
|
+
* Redact one secret value before it can leave the process.
|
|
1377
|
+
*
|
|
1378
|
+
* First 6 characters, three ASCII dots, last 4. Shorter values are replaced
|
|
1379
|
+
* entirely: the published privacy text allows no more than the first 6 and
|
|
1380
|
+
* last 4, and a value under 12 characters cannot show both without overlap
|
|
1381
|
+
* that reveals the whole string.
|
|
1382
|
+
*/
|
|
1383
|
+
declare function maskSecretValue(v: string): string;
|
|
1384
|
+
|
|
1365
1385
|
/**
|
|
1366
1386
|
* Dependency Vulnerability Scanner
|
|
1367
1387
|
* Parses package.json, requirements.txt, Gemfile, etc. and checks
|
|
@@ -1690,4 +1710,4 @@ input: {
|
|
|
1690
1710
|
content: string;
|
|
1691
1711
|
}[] | QualityContext, rules?: QualityRule[]): Finding[];
|
|
1692
1712
|
|
|
1693
|
-
export { type AIFilterResult, type AppRoute, 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, MODEL_ANALYSIS, MODEL_POLICY_REVIEWED, MODEL_REVIEW_INTERVAL_DAYS, MODEL_TEMPERATURE, MODEL_TRIAGE, NON_APP_PATH_PATTERNS, PRO_RULE_COUNT, PUBLIC_ENV_PREFIX_RE, type ParsedFile, type ProjectContext, QUALITY_EXAMPLES, type QualityContext, type QualityExample, type QualityFile, type QualityHit, type QualityRule, RULE_IMPACTS, type RouteFramework, type RouteTable, type RuleMatch, SCANNER_VERSION, SERVER_ACTION_WRITE_RE, type SecurityGrade, type Severity, TEST_FILE_PATTERN, TOTAL_RULE_COUNT, type TaintMap, type TargetCheck, type VibePlatform, allRules, assessHeaders, astMatch, 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, hardcodedSecrets, harvestIntent, insecureCookies, insecureRandomness, isCalleeNamed, isClientTarget, isCommentLine, isDotenvPath, isInlineSilenced, isInsideFixMessage, isLineSilenced, isLive, isMethodCall, isPrivateAddress, isProtectedFromAiRemoval, isSbomPath, isServerSideFile, isServerTarget, isTestFile, isTestPath, isUngradedFinding, isVendoredFinding, isVendoredPath, lineNumberAt, lineTextAt, maskComments, maskOutboundAuthNoise, missingAuthMiddleware, missingCSP, missingErrorBoundary, missingHTTPS, missingLockFile, newDataFence, nextPublicSecret, noRateLimiting, normalizeScanPath, packReviewBatches, parseFile, parseScanTarget, parseSupabaseConfig, qualityRules, replaceBlockComments, routeForFile, runCustomRules, scanConfigs, scanDependencies, scanEntropy, scanMultiFile, scanQuality, sqlInjection, stripeWebhookUnprotected, supabaseFunctionName, supabaseNoRLS, todoLeftInCode, tryParse, unmeasuredQualityRules, unvalidatedRedirect, vendoredReason, visitBinary, visitCalls, weakHashing, xssVulnerability };
|
|
1713
|
+
export { type AIFilterResult, type AppRoute, 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, MODEL_ANALYSIS, MODEL_POLICY_REVIEWED, MODEL_REVIEW_INTERVAL_DAYS, MODEL_TEMPERATURE, MODEL_TRIAGE, NON_APP_PATH_PATTERNS, PRO_RULE_COUNT, PUBLIC_ENV_PREFIX_RE, type ParsedFile, type ProjectContext, QUALITY_EXAMPLES, type QualityContext, type QualityExample, type QualityFile, type QualityHit, type QualityRule, RULE_IMPACTS, type RouteFramework, type RouteTable, type RuleMatch, SCANNER_VERSION, SERVER_ACTION_WRITE_RE, type SecurityGrade, type Severity, TEST_FILE_PATTERN, TOTAL_RULE_COUNT, type TaintMap, type TargetCheck, type VibePlatform, allRules, assessHeaders, astMatch, 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, isCalleeNamed, isClientTarget, isCommentLine, isDotenvPath, isInlineSilenced, isInsideFixMessage, isLineSilenced, isLive, isMethodCall, 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, qualityRules, replaceBlockComments, routeForFile, runCustomRules, scanConfigs, scanDependencies, scanEntropy, scanMultiFile, scanQuality, sqlInjection, stripeWebhookUnprotected, supabaseFunctionName, supabaseNoRLS, todoLeftInCode, tryParse, unmeasuredQualityRules, unvalidatedRedirect, vendoredReason, visitBinary, visitCalls, weakHashing, xssVulnerability };
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,11 @@ interface ProjectContext {
|
|
|
33
33
|
* unknown rather than assuming either way.
|
|
34
34
|
*/
|
|
35
35
|
supabaseEdgeVerifyJwt?: Map<string, boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* App Router route files whose every handler only delegates to an imported
|
|
38
|
+
* function that opens with a shared-secret check. VC003 skips their handlers.
|
|
39
|
+
*/
|
|
40
|
+
secretGuardedRoutes?: Set<string>;
|
|
36
41
|
}
|
|
37
42
|
/**
|
|
38
43
|
* Parse `supabase/config.toml` for per-function `verify_jwt` settings.
|
|
@@ -160,7 +165,7 @@ interface CustomRule {
|
|
|
160
165
|
* before a scan can be saved without enough provenance to explain a changed
|
|
161
166
|
* grade.
|
|
162
167
|
*/
|
|
163
|
-
declare const SCANNER_VERSION = "2.4.
|
|
168
|
+
declare const SCANNER_VERSION = "2.4.13";
|
|
164
169
|
|
|
165
170
|
/**
|
|
166
171
|
* Line-oriented helpers shared by every rule. Pure string manipulation — no fs
|
|
@@ -1092,6 +1097,11 @@ declare function tryParse(content: string, filePath: string): {
|
|
|
1092
1097
|
taint: TaintMap;
|
|
1093
1098
|
} | null;
|
|
1094
1099
|
declare const hardcodedSecrets: CustomRule;
|
|
1100
|
+
/**
|
|
1101
|
+
* Secret strings VC001 would report for this text. Same patterns and the same
|
|
1102
|
+
* filters as `hardcodedSecrets.check` — no second copy of the regexes.
|
|
1103
|
+
*/
|
|
1104
|
+
declare function hardcodedSecretValues(content: string, filePath: string): string[];
|
|
1095
1105
|
declare const exposedEnvFile: CustomRule;
|
|
1096
1106
|
/**
|
|
1097
1107
|
* Blank the parts of a file that LOOK like caller authentication but are the
|
|
@@ -1362,6 +1372,16 @@ declare function scanEntropy(files: {
|
|
|
1362
1372
|
content: string;
|
|
1363
1373
|
}[]): Finding[];
|
|
1364
1374
|
|
|
1375
|
+
/**
|
|
1376
|
+
* Redact one secret value before it can leave the process.
|
|
1377
|
+
*
|
|
1378
|
+
* First 6 characters, three ASCII dots, last 4. Shorter values are replaced
|
|
1379
|
+
* entirely: the published privacy text allows no more than the first 6 and
|
|
1380
|
+
* last 4, and a value under 12 characters cannot show both without overlap
|
|
1381
|
+
* that reveals the whole string.
|
|
1382
|
+
*/
|
|
1383
|
+
declare function maskSecretValue(v: string): string;
|
|
1384
|
+
|
|
1365
1385
|
/**
|
|
1366
1386
|
* Dependency Vulnerability Scanner
|
|
1367
1387
|
* Parses package.json, requirements.txt, Gemfile, etc. and checks
|
|
@@ -1690,4 +1710,4 @@ input: {
|
|
|
1690
1710
|
content: string;
|
|
1691
1711
|
}[] | QualityContext, rules?: QualityRule[]): Finding[];
|
|
1692
1712
|
|
|
1693
|
-
export { type AIFilterResult, type AppRoute, 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, MODEL_ANALYSIS, MODEL_POLICY_REVIEWED, MODEL_REVIEW_INTERVAL_DAYS, MODEL_TEMPERATURE, MODEL_TRIAGE, NON_APP_PATH_PATTERNS, PRO_RULE_COUNT, PUBLIC_ENV_PREFIX_RE, type ParsedFile, type ProjectContext, QUALITY_EXAMPLES, type QualityContext, type QualityExample, type QualityFile, type QualityHit, type QualityRule, RULE_IMPACTS, type RouteFramework, type RouteTable, type RuleMatch, SCANNER_VERSION, SERVER_ACTION_WRITE_RE, type SecurityGrade, type Severity, TEST_FILE_PATTERN, TOTAL_RULE_COUNT, type TaintMap, type TargetCheck, type VibePlatform, allRules, assessHeaders, astMatch, 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, hardcodedSecrets, harvestIntent, insecureCookies, insecureRandomness, isCalleeNamed, isClientTarget, isCommentLine, isDotenvPath, isInlineSilenced, isInsideFixMessage, isLineSilenced, isLive, isMethodCall, isPrivateAddress, isProtectedFromAiRemoval, isSbomPath, isServerSideFile, isServerTarget, isTestFile, isTestPath, isUngradedFinding, isVendoredFinding, isVendoredPath, lineNumberAt, lineTextAt, maskComments, maskOutboundAuthNoise, missingAuthMiddleware, missingCSP, missingErrorBoundary, missingHTTPS, missingLockFile, newDataFence, nextPublicSecret, noRateLimiting, normalizeScanPath, packReviewBatches, parseFile, parseScanTarget, parseSupabaseConfig, qualityRules, replaceBlockComments, routeForFile, runCustomRules, scanConfigs, scanDependencies, scanEntropy, scanMultiFile, scanQuality, sqlInjection, stripeWebhookUnprotected, supabaseFunctionName, supabaseNoRLS, todoLeftInCode, tryParse, unmeasuredQualityRules, unvalidatedRedirect, vendoredReason, visitBinary, visitCalls, weakHashing, xssVulnerability };
|
|
1713
|
+
export { type AIFilterResult, type AppRoute, 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, MODEL_ANALYSIS, MODEL_POLICY_REVIEWED, MODEL_REVIEW_INTERVAL_DAYS, MODEL_TEMPERATURE, MODEL_TRIAGE, NON_APP_PATH_PATTERNS, PRO_RULE_COUNT, PUBLIC_ENV_PREFIX_RE, type ParsedFile, type ProjectContext, QUALITY_EXAMPLES, type QualityContext, type QualityExample, type QualityFile, type QualityHit, type QualityRule, RULE_IMPACTS, type RouteFramework, type RouteTable, type RuleMatch, SCANNER_VERSION, SERVER_ACTION_WRITE_RE, type SecurityGrade, type Severity, TEST_FILE_PATTERN, TOTAL_RULE_COUNT, type TaintMap, type TargetCheck, type VibePlatform, allRules, assessHeaders, astMatch, 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, isCalleeNamed, isClientTarget, isCommentLine, isDotenvPath, isInlineSilenced, isInsideFixMessage, isLineSilenced, isLive, isMethodCall, 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, qualityRules, replaceBlockComments, routeForFile, runCustomRules, scanConfigs, scanDependencies, scanEntropy, scanMultiFile, scanQuality, sqlInjection, stripeWebhookUnprotected, supabaseFunctionName, supabaseNoRLS, todoLeftInCode, tryParse, unmeasuredQualityRules, unvalidatedRedirect, vendoredReason, visitBinary, visitCalls, weakHashing, xssVulnerability };
|