MCPcopy
hub / github.com/elementalsouls/Claude-OSINT / scan_text

Function scan_text

skills/offensive-osint/scripts/secret_scan.py:118–130  ·  view source on GitHub ↗

Scan a text blob; yield one dict per match.

(text: str, source: str = "<stdin>")

Source from the content-addressed store, hash-verified

116
117
118def scan_text(text: str, source: str = "<stdin>"):
119 """Scan a text blob; yield one dict per match."""
120 for line_no, line in enumerate(text.splitlines(), start=1):
121 for name, sev, cat, rx in COMPILED:
122 for m in rx.finditer(line):
123 yield {
124 "pattern": name,
125 "severity": sev,
126 "category": cat,
127 "match": m.group(0)[:80], # truncate to avoid huge dumps
128 "source": source,
129 "line": line_no,
130 }
131
132
133def scan_path(path: str):

Callers 2

scan_pathFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected