{"record":{"id":"4ec3ab0a98c8a91d","repo":"yamadashy/repomix","slug":"result-filepath-issuecount-issuetext","errorCode":null,"errorMessage":"  - ${result.filePath}: ${issueCount} ${issueText} detected","messagePattern":"  - (.+?): (.+?) (.+?) detected","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/core/security/validateFileSafety.ts","lineNumber":63,"sourceCode":"  return {\n    safeRawFiles,\n    safeFilePaths,\n    suspiciousFilesResults,\n    suspiciousGitDiffResults,\n    suspiciousGitLogResults,\n  };\n};\n\nconst logSuspiciousContentWarning = (contentType: string, results: SuspiciousFileResult[]) => {\n  if (results.length === 0) {\n    return;\n  }\n\n  logger.warn(`Security issues found in ${contentType}, but they will still be included in the output`);\n  for (const result of results) {\n    const issueCount = result.messages.length;\n    const issueText = issueCount === 1 ? 'issue' : 'issues';\n    logger.warn(`  - ${result.filePath}: ${issueCount} ${issueText} detected`);\n  }\n};\n","sourceCodeStart":45,"sourceCodeEnd":66,"githubUrl":"https://github.com/yamadashy/repomix/blob/f465ad909315a22120636baf03fa5e28701a50cb/src/core/security/validateFileSafety.ts#L45-L66","documentation":"The per-result detail line of the same logSuspiciousContentWarning: for each suspicious Git diff/log entry it logs the file path (or diff/log identifier) and the number of suspicious pattern matches found in it. Like error 120 it is a warning, not a thrown exception; it exists so users can locate exactly which diff/log content triggered the security scan and how many issues were detected there.","triggerScenarios":"Same as error 120: security check enabled while including git diffs/logs, and at least one result entry has messages.length >= 1; the loop emits one line per SuspiciousFileResult with its filePath and message count.","commonSituations":"A single large diff touching many files accumulates multiple suspicious matches (e.g. 5 detected); a commit message containing a pasted token in git log output; reviewing CI logs of a repomix run to find which files need scrubbing.","solutions":["Read the count and locate the flagged file/diff, then rotate or remove the exposed credential","Run a focused scan (gitleaks detect) on the named file to see the actual matched strings","Use --include with narrower globs to omit the flagged files from the pack","Suppress only after verifying false positive via --no-security-check"],"exampleFix":"// before: flagged file stays in pack\nrepomix --include-logs\n// after: exclude the flagged path pattern\nrepomix --include-logs --ignore '**/credentials.ts'","handlingStrategy":"validation","validationCode":"const flagged = results.filter(r => (r.type === 'gitDiff' || r.type === 'gitLog') && r.messages.length > 0);\nfor (const r of flagged) {\n  console.error(`${r.filePath}: ${r.messages.length} security issue(s)`);\n  r.messages.forEach(m => console.error('  match:', m));\n}\nif (flagged.length) process.exit(1);","typeGuard":"const isSuspiciousGitContent = (r: unknown): r is SuspiciousFileResult & { type: 'gitDiff' | 'gitLog' } =>\n  typeof r === 'object' && r !== null &&\n  'type' in r && ((r as { type: string }).type === 'gitDiff' || (r as { type: string }).type === 'gitLog') &&\n  'messages' in r && Array.isArray((r as { messages: unknown }).messages) &&\n  (r as { messages: unknown[] }).messages.length > 0;","tryCatchPattern":null,"preventionTips":["Parse the per-file issue counts from the warning output (or the returned suspicious results) and fail CI when any count > 0","Inspect the matched patterns per file with a dedicated secret scanner to decide fix vs false positive","Exclude persistently flagged paths via repomix ignore patterns rather than disabling the whole security check","Keep commit messages free of tokens and credentials, since git log content is scanned too","Educate the team: this line is a locator — always resolve the named file before sharing the packed output"],"tags":["security","logging","secrets","git-log"],"backgroundTag":"secret-detected-in-output","analyzedSha":"f465ad909315a22120636baf03fa5e28701a50cb","analyzedAt":"2026-08-29T01:27:42.024Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}