mirror of
https://github.com/Rarebuffalo/securelens-backend.git
synced 2026-06-19 07:00:30 +00:00
add a 1000 candidate file capping safeguard to discovery walk
This commit is contained in:
@@ -150,6 +150,12 @@ def discover_files(root: Path, cfg: CLIConfig) -> list[Path]:
|
|||||||
continue
|
continue
|
||||||
candidates.append(p)
|
candidates.append(p)
|
||||||
|
|
||||||
|
# Capping safeguard: limit to 1000 candidate files
|
||||||
|
if len(candidates) >= 1000:
|
||||||
|
break
|
||||||
|
if len(candidates) >= 1000:
|
||||||
|
break
|
||||||
|
|
||||||
return sorted(candidates)
|
return sorted(candidates)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user