mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-29 19:34:29 +01:00
Large added files pass the secrets check in overlapping parts instead of failing (GST-3665) (#4796)
The secrets check now scans an added file over 16 MiB in line-aligned, overlapping parts and reports each finding at its line in the file, instead of failing the whole file as HIGH with nothing to read. Why: gstack-redact refuses any input over 16 MiB, so every pull request that adds a large data file (harness-evals#609, a 60.5 MB trials.jsonl) was blocked with no way through. Nothing to do. A line that cannot be scanned with enough of the text before it still fails, and so does any part the scanner does not report on. Replaces #4792. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
3b9d9757fd
commit
284214fd89
4 files changed
+351
-22
No files matched your search
+4
-1
@@ -228,7 +228,10 @@ Two stages with separate clocks, both printed:
|
||||
under its YAML key) are caught in UTF-16 text as in plain text. Only
|
||||
credential findings count in such a file, so image bytes that look like a
|
||||
phone number are not reported. A file whose scanned text is over the
|
||||
scanner's 16 MiB limit fails the check, and the pre-push hook blocks a push
|
||||
scanner's 16 MiB limit is scanned in parts cut at line ends, each repeating
|
||||
at least 64K characters of the text before it, with findings reported at
|
||||
their line in the file; a single line too long to scan whole, or to share a
|
||||
part with that context, fails the check and names the line. The pre-push hook blocks a push
|
||||
whose diff is over 64 MiB. The hook leaves deleted files out of that diff,
|
||||
so removing a large binary does not count toward the limit, but a replaced
|
||||
binary's old bytes still do. Keep large binaries in Git LFS, whose small
|
||||
|
||||
Reference in new issue
Block a user