Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(pi): gate wildcard credential selectors
Chris4f8f1c511ed4
diff --git a/packages/maker-core/src/agents/pi/__tests__/cindyBridgeSource.test.ts b/packages/maker-core/src/agents/pi/__tests__/cindyBridgeSource.test.tsindex a0bf73604c..5353b82a7c 100644--- a/packages/maker-core/src/agents/pi/__tests__/cindyBridgeSource.test.ts+++ b/packages/maker-core/src/agents/pi/__tests__/cindyBridgeSource.test.ts@@ -57,11 +57,13 @@ function loadReviewSearchHelpers(const helperEnd = source.indexOf("// ── MCP streamable-HTTP");const findStart = source.indexOf("function rgGlob(");const findEnd = source.indexOf("export default async function cindyBridge");+ const selectorGlobs = /^const CREDENTIAL_SELECTOR_GLOBS = .*;$/m.exec(source)?.[0];if (helperStart < 0 ||helperEnd <= helperStart ||findStart < 0 ||- findEnd <= findStart+ findEnd <= findStart ||+ !selectorGlobs) {throw new Error("Review search helpers were not found in the generated bridge",@@ -71,6 +73,7 @@ function loadReviewSearchHelpers("const CREDENTIAL_PATH_PATTERNS: RegExp[] = [/(?:^|[\\\\/])\\.env(?:\\.[^\\\\/]+)?$/i, /\\.pem$/i];","const REVIEW_CREDENTIAL_PATH_PATTERNS: RegExp[] = [/(?:^|[\\\\/])node_modules(?:[\\\\/]|$)/i];","const REVIEW_CREDENTIAL_GLOB_PATTERNS: string[] = [];",+ selectorGlobs,"function touchesCredentialPath(input: unknown): boolean {"," if (typeof input === 'string') return CREDENTIAL_PATH_PATTERNS.some((re) => re.test(input));"," if (Array.isArray(input)) return input.some(touchesCredentialPath);",@@ -145,6 +148,23 @@ describe('cindy-bridge extension source', () => {touchesCredential: false,});expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '.env*' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.n?trc' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: 'src/.n?trc' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '*.p?m' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.config/g?/**' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '?.key' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.env.?' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.ssh-*/**' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', globs: ['*.key', '!secret.key'] }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '**/.cargo/credentia?s.bak' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '**/.m2/settings.xml.bak' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.s?h' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: 'id_rsa.*' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.s?h/config' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.config/g?/hosts.yml' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.a?s/credentials' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: '.config/g?-*/**' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: '.', glob: 'nested/.config/g?-*/**' }).touchesCredential).toBe(true);expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '.e[n-o]v' }).touchesCredential).toBe(true);expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '[.-0]env*' }).touchesCredential).toBe(true);expect(evidence('find', { pattern: '.e{n,foo}v', path: 'src' }).touchesCredential).toBe(true);@@ -152,10 +172,19 @@ describe('cindy-bridge extension source', () => {expect(evidence('find', { pattern: '@(safe|.env)', path: 'src' }).touchesCredential).toBe(true);expect(evidence('find', { pattern: '.e{o,p}v', path: 'src' }).touchesCredential).toBe(false);expect(evidence('find', { pattern: '.e[o-p]v', path: 'src' }).touchesCredential).toBe(false);- expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '.environment*' }).touchesCredential).toBe(false);- expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '!.env*' }).touchesCredential).toBe(false);- expect(evidence('grep', { pattern: 'KEY', path: 'src', globs: ['*', '!.env*'] }).touchesCredential).toBe(false);- expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '[!.]*.ts' }).touchesCredential).toBe(false);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '.environment*' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '!.env*' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', globs: ['*', '!.env*'] }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', globs: ['source.ts', '!.env*'] }).touchesCredential).toBe(false);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '[!.]*.ts' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '*.ts' }).touchesCredential).toBe(true);+ expect(evidence('find', { pattern: '*.ts', path: 'src' }).touchesCredential).toBe(false);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '.n?tes' }).touchesCredential).toBe(false);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '[!.]*.png' }).touchesCredential).toBe(true);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '?.txt' }).touchesCredential).toBe(false);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '.envrc?' }).touchesCredential).toBe(false);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '.netrcfoo' }).touchesCredential).toBe(false);+ expect(evidence('grep', { pattern: 'KEY', path: 'src', glob: '.sshhelper' }).touchesCredential).toBe(false);expect(evidence('find', { pattern: '.env', path: 'src' }).touchesCredential).toBe(true);expect(evidence('read', { path: '.env.local', offset: 1 }).touchesCredential).toBe(true);expect(evidence('ls', { path: 'src/.environment' }).touchesCredential).toBe(false);diff --git a/packages/maker-core/src/agents/pi/__tests__/pi-agent.integration.test.ts b/packages/maker-core/src/agents/pi/__tests__/pi-agent.integration.test.tsindex 21f04aa83b..dd62fda56f 100644--- a/packages/maker-core/src/agents/pi/__tests__/pi-agent.integration.test.ts+++ b/packages/maker-core/src/agents/pi/__tests__/pi-agent.integration.test.ts@@ -1628,8 +1628,17 @@ describe.skipIf(!piAvailable)('PiAgent integration (real pi binary + fake gatewaasync () => {const workingDir = mkdtempSync(path.join(tmpdir(), 'pi-grep-dotenv-selector-'));mkdirSync(path.join(workingDir, 'src'));+ mkdirSync(path.join(workingDir, '.ssh'));+ mkdirSync(path.join(workingDir, '.config', 'gh-work'), { recursive: true });writeFileSync(path.join(workingDir, 'src', '.env.local'), 'SELECTOR_SECRET=must-not-leak\n');+ writeFileSync(path.join(workingDir, 'src', '.netrc'), 'NETRC_SECRET=must-not-leak\n');+ writeFileSync(path.join(workingDir, 'src', 'a.key'), 'KEY_SECRET=must-not-leak\n');writeFileSync(path.join(workingDir, 'src', 'source.ts'), 'SAFE_SELECTOR=visible\n');+ writeFileSync(path.join(workingDir, '.ssh', 'config'), 'SSH_CONFIG_SECRET=must-not-leak\n');+ writeFileSync(+ path.join(workingDir, '.config', 'gh-work', 'token.txt'),+ 'CONFIG_SECRET=must-not-leak\n',+ );try {scriptedResponses.length = 0;scriptedResponses.push(@@ -1649,12 +1658,76 @@ describe.skipIf(!piAvailable)('PiAgent integration (real pi binary + fake gatewaexpect(followUp).toContain('User denied this tool call via Cindy.');scriptedResponses.push(- anthropicToolUseBody('grep', { pattern: 'SAFE_SELECTOR', path: 'src', glob: '!.env*' }),- anthropicStreamBody('grep negative selector turn finished'),+ anthropicToolUseBody('grep', { pattern: 'NETRC_SECRET', path: 'src', glob: '.n?trc' }),+ anthropicStreamBody('grep netrc selector credential turn finished'),+ );+ const netrcReqBefore = seenRequests.length;+ const netrcTurn = await runPermissionTurn({+ sessionId: 'pi-grep-netrc-selector',+ workingDir,+ permissionMode: 'auto',+ resolverBehavior: 'deny',+ });+ expect(netrcTurn.resolverTools).toEqual(['grep']);+ const netrcFollowUp = seenRequests.slice(netrcReqBefore).map((request) => request.body).join('\n');+ expect(netrcFollowUp).not.toContain('NETRC_SECRET=must-not-leak');+ expect(netrcFollowUp).toContain('User denied this tool call via Cindy.');++ scriptedResponses.push(+ anthropicToolUseBody('grep', { pattern: 'SSH_CONFIG_SECRET', path: '.', glob: '.s?h/config' }),+ anthropicStreamBody('grep ssh directory selector credential turn finished'),+ );+ const sshReqBefore = seenRequests.length;+ const sshTurn = await runPermissionTurn({+ sessionId: 'pi-grep-ssh-directory-selector',+ workingDir,+ permissionMode: 'auto',+ resolverBehavior: 'deny',+ });+ expect(sshTurn.resolverTools).toEqual(['grep']);+ const sshFollowUp = seenRequests.slice(sshReqBefore).map((request) => request.body).join('\n');+ expect(sshFollowUp).not.toContain('SSH_CONFIG_SECRET=must-not-leak');+ expect(sshFollowUp).toContain('User denied this tool call via Cindy.');++ scriptedResponses.push(+ anthropicToolUseBody('grep', { pattern: 'CONFIG_SECRET', path: '.', glob: '.config/g?-*/**' }),+ anthropicStreamBody('grep config directory selector credential turn finished'),+ );+ const configReqBefore = seenRequests.length;+ const configTurn = await runPermissionTurn({+ sessionId: 'pi-grep-config-directory-selector',+ workingDir,+ permissionMode: 'auto',+ resolverBehavior: 'deny',+ });+ expect(configTurn.resolverTools).toEqual(['grep']);+ const configFollowUp = seenRequests.slice(configReqBefore).map((request) => request.body).join('\n');+ expect(configFollowUp).not.toContain('CONFIG_SECRET=must-not-leak');+ expect(configFollowUp).toContain('User denied this tool call via Cindy.');++ scriptedResponses.push(+ anthropicToolUseBody('grep', { pattern: 'KEY_SECRET', path: 'src', glob: '?.key' }),+ anthropicStreamBody('grep key selector credential turn finished'),+ );+ const keyReqBefore = seenRequests.length;+ const keyTurn = await runPermissionTurn({+ sessionId: 'pi-grep-key-selector-full-access',+ workingDir,+ permissionMode: 'bypassPermissions',+ resolverBehavior: 'deny',+ });+ expect(keyTurn.resolverTools).toEqual([]);+ const keyFollowUp = seenRequests.slice(keyReqBefore).map((request) => request.body).join('\n');+ expect(keyFollowUp).not.toContain('KEY_SECRET=must-not-leak');+ expect(keyFollowUp).toContain('Cindy blocks reading credential or key paths');++ scriptedResponses.push(+ anthropicToolUseBody('grep', { pattern: 'SAFE_SELECTOR', path: 'src', glob: 'source.ts' }),+ anthropicStreamBody('grep ordinary selector turn finished'),);const safeReqBefore = seenRequests.length;const safeTurn = await runPermissionTurn({- sessionId: 'pi-grep-negative-dotenv-selector',+ sessionId: 'pi-grep-ordinary-selector',workingDir,permissionMode: 'auto',resolverBehavior: 'deny',diff --git a/packages/maker-core/src/agents/pi/cindy-bridge-source.ts b/packages/maker-core/src/agents/pi/cindy-bridge-source.tsindex 554cc886cd..ef2f24e4fd 100644--- a/packages/maker-core/src/agents/pi/cindy-bridge-source.ts+++ b/packages/maker-core/src/agents/pi/cindy-bridge-source.ts@@ -26,11 +26,26 @@import {REVIEW_SENSITIVE_CREDENTIAL_GLOB_PATTERNS,REVIEW_SENSITIVE_CREDENTIAL_PATH_PATTERN_SPECS,+ SENSITIVE_CREDENTIAL_GLOB_PATTERNS,SENSITIVE_CREDENTIAL_PATH_PATTERN_SPECS,} from "../shared/sensitive-credential-paths.js";import { shellInputRedirectionParserSource } from "../shared/shell-input-redirections.js";const SHELL_INPUT_REDIRECTION_PARSER_SOURCE = shellInputRedirectionParserSource();+const CREDENTIAL_WORD_BOUNDARY = '\u0001';+const SENSITIVE_CREDENTIAL_SELECTOR_GLOBS = [...new Set(+ SENSITIVE_CREDENTIAL_GLOB_PATTERNS.flatMap((pattern) => {+ const variants = [pattern];+ const directory = pattern.endsWith('/**') ? pattern.slice(0, -3) : undefined;+ if (directory) {+ variants.push(directory, directory + CREDENTIAL_WORD_BOUNDARY + '**');+ } else if (pattern !== '**/.env' && pattern !== '**/.env.*' && !pattern.endsWith('*')) {+ variants.push(pattern + CREDENTIAL_WORD_BOUNDARY + '**');+ }+ return variants.flatMap((variant) =>+ variant.startsWith('**/') ? [variant, variant.slice(3)] : [variant]);+ }),+)];export const CINDY_BRIDGE_EXTENSION_FILENAME = "cindy-bridge.ts";@@ -115,6 +130,7 @@ const CREDENTIAL_PATH_PATTERNS = ${JSON.stringify(SENSITIVE_CREDENTIAL_PATH_PATTconst REVIEW_CREDENTIAL_PATH_PATTERNS = ${JSON.stringify(REVIEW_SENSITIVE_CREDENTIAL_PATH_PATTERN_SPECS)}.map(({ source, flags }) => new RegExp(source, flags));const REVIEW_CREDENTIAL_GLOB_PATTERNS = ${JSON.stringify(REVIEW_SENSITIVE_CREDENTIAL_GLOB_PATTERNS)};+const CREDENTIAL_SELECTOR_GLOBS = ${JSON.stringify(SENSITIVE_CREDENTIAL_SELECTOR_GLOBS)};${SHELL_INPUT_REDIRECTION_PARSER_SOURCE}@@ -664,7 +680,6 @@ function collectReviewFileSelectors(toolName: string, input: unknown): string[]}function readonlySelectorClassCandidates(value: string): string[] | null {- if (value === '!.' || value === '^.') return ['x'];if (value.startsWith('!') || value.startsWith('^') || value.includes('[:')) return null;const chars: string[] = [];for (let index = 0; index < value.length; index += 1) {@@ -708,29 +723,131 @@ function expandReadonlySelector(selector: string): string[] | null {return expanded;}-function readonlySelectorTouchesCredential(selector: string): boolean {- if (selector.trimStart().startsWith('!')) return false;+type SelectorGlobToken =+ | { kind: 'literal'; value: string }+ | { kind: 'one' | 'star' | 'globstar' | 'nonword' };++type SelectorGlobLabel =+ | { kind: 'literal'; value: string }+ | { kind: 'non-slash' | 'non-word' | 'any' };++function selectorGlobTokens(pattern: string): SelectorGlobToken[] | null {+ if (/[\[\]{}()|+@]/.test(pattern)) return null;+ const normalized = pattern.replace(/\\/g, '/').toLowerCase();+ const tokens: SelectorGlobToken[] = [];+ for (let index = 0; index < normalized.length; index += 1) {+ const char = normalized[index];+ if (char === '\u0001') {+ tokens.push({ kind: 'nonword' });+ continue;+ }+ if (char === '?') {+ tokens.push({ kind: 'one' });+ continue;+ }+ if (char === '*') {+ let end = index + 1;+ while (normalized[end] === '*') end += 1;+ tokens.push({ kind: end - index >= 2 ? 'globstar' : 'star' });+ index = end - 1;+ continue;+ }+ tokens.push({ kind: 'literal', value: char });+ }+ return tokens;+}++function selectorGlobTransition(+ tokens: readonly SelectorGlobToken[],+ index: number,+): { next: number; label: SelectorGlobLabel } | null {+ const token = tokens[index];+ if (!token) return null;+ if (token.kind === 'literal') return { next: index + 1, label: token };+ if (token.kind === 'one') return { next: index + 1, label: { kind: 'non-slash' } };+ if (token.kind === 'nonword') return { next: index + 1, label: { kind: 'non-word' } };+ if (token.kind === 'star') return { next: index, label: { kind: 'non-slash' } };+ return { next: index, label: { kind: 'any' } };+}++function selectorGlobLabelsOverlap(left: SelectorGlobLabel, right: SelectorGlobLabel): boolean {+ if (left.kind === 'any' || right.kind === 'any') return true;+ if (left.kind === 'literal' && right.kind === 'literal') return left.value === right.value;+ if (left.kind === 'literal') {+ if (right.kind === 'non-word') return !/[a-z0-9_]/i.test(left.value);+ return left.value !== '/';+ }+ if (right.kind === 'literal') {+ if (left.kind === 'non-word') return !/[a-z0-9_]/i.test(right.value);+ return right.value !== '/';+ }+ return true;+}++function selectorGlobsIntersect(leftPattern: string, rightPattern: string): boolean | null {+ const left = selectorGlobTokens(leftPattern);+ const right = selectorGlobTokens(rightPattern);+ if (!left || !right) return null;+ const pending: Array<[number, number]> = [[0, 0]];+ const visited = new Set<string>();+ while (pending.length > 0) {+ const [leftIndex, rightIndex] = pending.pop()!;+ const key = leftIndex + ':' + rightIndex;+ if (visited.has(key)) continue;+ visited.add(key);+ if (leftIndex === left.length && rightIndex === right.length) return true;++ const leftToken = left[leftIndex];+ const rightToken = right[rightIndex];+ if (leftToken?.kind === 'star' || leftToken?.kind === 'globstar') {+ pending.push([leftIndex + 1, rightIndex]);+ }+ if (rightToken?.kind === 'star' || rightToken?.kind === 'globstar') {+ pending.push([leftIndex, rightIndex + 1]);+ }++ const leftTransition = selectorGlobTransition(left, leftIndex);+ const rightTransition = selectorGlobTransition(right, rightIndex);+ if (leftTransition && rightTransition+ && selectorGlobLabelsOverlap(leftTransition.label, rightTransition.label)) {+ pending.push([leftTransition.next, rightTransition.next]);+ }+ }+ return false;+}++function readonlySelectorCouldMatchCredential(selector: string): boolean {+ const expanded = expandReadonlySelector(selector);+ if (!expanded) return true;+ return expanded.some((candidate) => CREDENTIAL_SELECTOR_GLOBS.some((credentialGlob) => {+ if (!candidate.includes('/') && credentialGlob.endsWith('/**')) return false;+ const sensitivePattern = candidate.includes('/') ? credentialGlob : path.basename(credentialGlob);+ return selectorGlobsIntersect(candidate, sensitivePattern) !== false;+ }));+}++function readonlySelectorDirectlyTouchesCredential(selector: string): boolean {const expanded = expandReadonlySelector(selector);if (!expanded) return true;- const dotenvProbes = ['.env', '.env.local', '.env.production', '.env.secret'];return expanded.some((candidate) => {const directCandidates = [candidate, ...candidate.split('|')];if (directCandidates.some((value) =>CREDENTIAL_PATH_PATTERNS.some((re) => re.test(value)))) return true;- if (directCandidates.some((value) => {+ return directCandidates.some((value) => {const literalized = value.replace(/[*?()!+@]/g, '');return literalized !== value&& CREDENTIAL_PATH_PATTERNS.some((re) => re.test(literalized));- })) return true;- try {- const basename = candidate.replace(/\\/g, '/').split('/').pop() ?? '';- return dotenvProbes.some((probe) => path.matchesGlob(probe, basename));- } catch {- return true;- }+ });});}+function readonlySelectorsTouchCredential(selectors: readonly string[]): boolean {+ if (selectors.length === 0) return false;+ const positive = selectors.filter((selector) => !selector.trimStart().startsWith('!'));+ if (positive.length === 0) return true;+ return positive.some(readonlySelectorCouldMatchCredential);+}+function collectReadonlyCredentialEvidence(toolName: string,input: unknown,@@ -739,10 +856,12 @@ function collectReadonlyCredentialEvidence(const selectors = collectReviewFileSelectors(toolName, input);if (!pathFields || !selectors) return { paths: [], touchesCredential: true };const paths = pathFields.map((field) => field.candidate);+ const selectorTouchesCredential = toolName === 'grep'+ ? readonlySelectorsTouchCredential(selectors)+ : selectors.some(readonlySelectorDirectlyTouchesCredential);return {paths,- touchesCredential: touchesCredentialPath(paths)- || selectors.some(readonlySelectorTouchesCredential),+ touchesCredential: touchesCredentialPath(paths) || selectorTouchesCredential,};}diff --git a/packages/maker-core/src/agents/shared/sensitive-credential-paths.ts b/packages/maker-core/src/agents/shared/sensitive-credential-paths.tsindex 7d7b1c0208..54768338b8 100644--- a/packages/maker-core/src/agents/shared/sensitive-credential-paths.ts+++ b/packages/maker-core/src/agents/shared/sensitive-credential-paths.ts@@ -86,19 +86,9 @@ export const REVIEW_SENSITIVE_CREDENTIAL_PATH_PATTERN_SPECS = [* Grep/Glob/Find tools need a second, execution/result-level boundary because* their input can be only a granted directory with no concrete file selector.*/-export const REVIEW_SENSITIVE_CREDENTIAL_GLOB_PATTERNS = [+export const SENSITIVE_CREDENTIAL_GLOB_PATTERNS = ["**/.env","**/.env.*",- "**/.git",- "**/.git/**",- "**/node_modules",- "**/node_modules/**",- "**/apps/claude-code-bin/**",- "**/apps/codex-bin/**",- "**/apps/pi-bin/**",- "**/apps/ripgrep-bin/**",- "**/tools/pi/updates/**",- "**/.vite/**","**/.ssh/**","**/.aws/**","**/.gnupg/**",@@ -118,7 +108,10 @@ export const REVIEW_SENSITIVE_CREDENTIAL_GLOB_PATTERNS = ["**/.m2/settings-security.xml","**/application_default_credentials*","**/credentials.json",- "**/auth.json",+ "**/codex/auth.json",+ "**/claude/auth.json",+ "**/gcloud/auth.json",+ "**/containers/auth.json","**/.config/gh/**","**/.config/hub/**","**/.config/glab/**",@@ -137,6 +130,21 @@ export const REVIEW_SENSITIVE_CREDENTIAL_GLOB_PATTERNS = ["**/.xdt-server/**",] as const;+export const REVIEW_SENSITIVE_CREDENTIAL_GLOB_PATTERNS = [+ ...SENSITIVE_CREDENTIAL_GLOB_PATTERNS,+ "**/auth.json",+ "**/.git",+ "**/.git/**",+ "**/node_modules",+ "**/node_modules/**",+ "**/apps/claude-code-bin/**",+ "**/apps/codex-bin/**",+ "**/apps/pi-bin/**",+ "**/apps/ripgrep-bin/**",+ "**/tools/pi/updates/**",+ "**/.vite/**",+] as const;+const DOTENV_CREDENTIAL_PATH_PATTERN = new RegExp(DOTENV_CREDENTIAL_PATH_PATTERN_SPEC.source,DOTENV_CREDENTIAL_PATH_PATTERN_SPEC.flags,