MCPcopy Index your code
hub / github.com/codeaashu/claude-code / scanForSecrets

Function scanForSecrets

src/services/teamMemorySync/secretScanner.ts:277–295  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

275 * display secret values.
276 */
277export function scanForSecrets(content: string): SecretMatch[] {
278 const matches: SecretMatch[] = []
279 const seen = new Set<string>()
280
281 for (const rule of getCompiledRules()) {
282 if (seen.has(rule.id)) {
283 continue
284 }
285 if (rule.re.test(content)) {
286 seen.add(rule.id)
287 matches.push({
288 ruleId: rule.id,
289 label: ruleIdToLabel(rule.id),
290 })
291 }
292 }
293
294 return matches
295}
296
297/**
298 * Get a human-readable label for a gitleaks rule ID.

Callers 2

walkDirFunction · 0.85
checkTeamMemSecretsFunction · 0.85

Calls 5

getCompiledRulesFunction · 0.85
ruleIdToLabelFunction · 0.85
hasMethod · 0.45
addMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected