Repository navigation
Scope the Exfiltration Distance Check to real function boundaries (#102) - #361
Merged
Merged
Conversation
Closes out the last "sporadic" gap #102's epic body called out: #346/ #348 enumerated and migrated six correlate() pairs in detector.py onto same-function scoping, but the Exfiltration Distance Check (memory_scraping -> exfiltration_camouflage, in coding_analysis()'s Phase 4 AppSec block) was a seventh pair that got missed, and kept running on the old flat 200-character radius after everything else in the file had moved off it. Migrated it into apply_amplifier_correlations() in spatial_correlation.py, called from _function_slice() once real satellite ranges exist -- same treatment as the RCE taint corroboration and OOM Bomb pairs already there. Same amplifier-not-dampener tradeoff reasoning applies (a wrong-scope amplifier only costs one extra review item, not a false-negative), so this was about consistency, not urgency: every correlate() call in the pipeline now shares the same scoping semantics. Pure relocation, not a behavior change for same-function callers -- counts["memory_scraping"] and mitigations["amplified_leaks"] are still mutated identically when the memory read and the socket send share a function. Tests: new cross-function regression test in test_detector.py, mirroring the existing dampener cross-function tests, proving a memory read in one function no longer amplifies a socket send in a different, unrelated one. Full suite: 837 passed, 1 pre-existing xfail. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
squid-protocol
added a commit
that referenced
this pull request
Aug 14, 2026
…der Claim 1 (#1562) Two additions to why_gitgalaxy_beats_ast_here.md, both from a follow-up discussion after #1427/Claim 3 landed: - Claim 3's evidence now includes the actual tree-sitter-c-sharp bug-tracker trail for the ref/struct gap (issue #14 fixed 2022, issue #361 still open since Dec 2024 documenting the exact "one error corrupts the whole file" cascade in the maintainers' own words, PR #439 cataloging 8 more known gaps as of Aug 2026) -- answers "how long can tree-sitter be out of date" with sourced evidence instead of speculation, and a new subsection ("Why GitGalaxy doesn't hit this particular wall") generalizes the underlying reason: GitGalaxy's narrow four-signal contract (classes, functions, arguments, structural signatures -- never a full parse tree) exempts it from the specific constraints that cause this class of failure in a real grammar (canonical-tree-for-every-permutation, global coherence, full versioned grammar-surface tracking). - Logs m4 (confirmed, already implemented, same body-read idiom as bash/perl) and batch (same shape, but NOT yet implemented -- language_standards.py's batch entry has empty rules) as two more instances of Claim 1's shape, so batch doesn't get lost as a one-off observation before a future harden-language-extraction pass picks it up. No code change. Co-authored-by: Joe Esquibel <squid-protocol@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
squid-protocol
added a commit
that referenced
this pull request
Aug 14, 2026
…ot ref struct at 14575) (#1568) * docs: expand Claim 3 with grammar-staleness timeline, log m4/batch under Claim 1 Two additions to why_gitgalaxy_beats_ast_here.md, both from a follow-up discussion after #1427/Claim 3 landed: - Claim 3's evidence now includes the actual tree-sitter-c-sharp bug-tracker trail for the ref/struct gap (issue #14 fixed 2022, issue #361 still open since Dec 2024 documenting the exact "one error corrupts the whole file" cascade in the maintainers' own words, PR #439 cataloging 8 more known gaps as of Aug 2026) -- answers "how long can tree-sitter be out of date" with sourced evidence instead of speculation, and a new subsection ("Why GitGalaxy doesn't hit this particular wall") generalizes the underlying reason: GitGalaxy's narrow four-signal contract (classes, functions, arguments, structural signatures -- never a full parse tree) exempts it from the specific constraints that cause this class of failure in a real grammar (canonical-tree-for-every-permutation, global coherence, full versioned grammar-surface tracking). - Logs m4 (confirmed, already implemented, same body-read idiom as bash/perl) and batch (same shape, but NOT yet implemented -- language_standards.py's batch entry has empty rules) as two more instances of Claim 1's shape, so batch doesn't get lost as a one-off observation before a future harden-language-extraction pass picks it up. No code change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * docs: correct Claim 3's csharp root-cause diagnosis (line 5198, not 14575) #1427's ref struct attribution was wrong -- tested in isolation it parses cleanly. The real trigger is a C# 11 list-pattern + property-pattern construct at LanguageParser.cs:5198, over 9,000 lines earlier, which leaves tree-sitter with zero real_functions for the rest of the file (vs. 157 before it) -- accounting for all 316 of csharp's current "extra" false positives, not just the 3 names #1427 excluded. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Joe Esquibel <squid-protocol@users.noreply.github.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes out the last "sporadic" gap #102's epic body called out. #346/#348 enumerated and migrated six
correlate()pairs indetector.pyonto same-function scoping, but the Exfiltration Distance Check (memory_scraping->exfiltration_camouflage, incoding_analysis()'s Phase 4 AppSec block) was a seventh pair that got missed, and kept running on the old flat 200-character radius after everything else in the file had moved off it.Migrated it into
apply_amplifier_correlations()inspatial_correlation.py, called from_function_slice()once real satellite ranges exist -- same treatment as the RCE taint corroboration and OOM Bomb pairs already there. Same amplifier-not-dampener tradeoff reasoning applies (a wrong-scope amplifier only costs one extra review item, not a false negative), so this was about consistency, not urgency: everycorrelate()call in the pipeline now shares the same scoping semantics.Pure relocation, not a behavior change for same-function callers --
counts["memory_scraping"]andmitigations["amplified_leaks"]are still mutated identically when the memory read and the socket send share a function.Test plan
test_detector.py(test_detector_exfiltration_check_does_not_cross_function_boundaries), mirroring the existing dampener cross-function tests, proving a memory read in one function no longer amplifies a socket send in a different, unrelated one.test_detector_spatial_appsec_correlation(same-function case) still passes unchanged.python -m pytest tests/ -q-- full suite, 837 passed, 1 pre-existing xfail.🤖 Generated with Claude Code