Commit 16dc507
authored
fix(review): raise the patch-less secret-scan cap from 512KB to 4MB (#8605)
Live diagnosis on the self-hosted ORB box: metagraphed's secret_leak gate
false-positive rate climbed from 38% to 56% over 6 hours, holding
mergeable PRs. Root cause wasn't a pattern-match false positive -- it was
the fail-closed "content exceeded the scan cap" block on regenerated
OpenAPI/JSON-schema artifacts. metagraphed's openapi.json is ~1.9MB and
api-components.schema.json ~514KB, both well past the old 512,000-char
cap; three recent PRs (#8106, #8095, #8005) were all held for this reason
and all merged anyway once manually verified clean.
The underlying fetcher (grounding-wire.ts's makeGithubFileFetcher)
already requests the raw+json media type specifically to bypass GitHub's
Contents API ~1MB base64-JSON envelope ceiling, so the real limit was
always this local constant, not GitHub's. Raising it only expands scan
coverage -- more content becomes fetchable-and-scannable instead of
being marked incomplete-and-blocked -- so this can't weaken detection
on anything the old cap already caught.
4MB gives headroom above the largest observed real case (loopover's own
openapi.json is already at 525KB, past the old cap too). Fetch
count/concurrency stay capped separately, unaffected.1 parent f4f001d commit 16dc507
2 files changed
Lines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
7 | 16 | | |
8 | 17 | | |
9 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
392 | | - | |
| 393 | + | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
| |||
420 | 421 | | |
421 | 422 | | |
422 | 423 | | |
423 | | - | |
| 424 | + | |
424 | 425 | | |
425 | 426 | | |
426 | 427 | | |
| |||
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | | - | |
| 540 | + | |
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
| |||
821 | 822 | | |
822 | 823 | | |
823 | 824 | | |
824 | | - | |
825 | | - | |
| 825 | + | |
| 826 | + | |
826 | 827 | | |
827 | 828 | | |
828 | 829 | | |
| |||
876 | 877 | | |
877 | 878 | | |
878 | 879 | | |
879 | | - | |
| 880 | + | |
880 | 881 | | |
881 | 882 | | |
882 | 883 | | |
| |||
1060 | 1061 | | |
1061 | 1062 | | |
1062 | 1063 | | |
1063 | | - | |
1064 | | - | |
| 1064 | + | |
| 1065 | + | |
1065 | 1066 | | |
1066 | 1067 | | |
1067 | 1068 | | |
| |||
1457 | 1458 | | |
1458 | 1459 | | |
1459 | 1460 | | |
1460 | | - | |
| 1461 | + | |
1461 | 1462 | | |
1462 | 1463 | | |
1463 | 1464 | | |
| |||
0 commit comments