fix(engine): prune non-CVE library loads from runtime evidence (JEF-75)#23
Merged
Merged
Conversation
After JEF-68 lit up library-load on-node, LibraryLoaded floods the runtime evidence: every
workload loads dozens of libs (libc, libpthread, …) and LibraryLoaded is fingerprinted
verbatim (lib:{name}, uncoarsened). On a 300s TTL the set churns every pass, busting the
per-entry verdict cache → the engine re-judged ~all internet-facing entries every pass
(not just the changed one), and bloated the prompt with irrelevant loads.
Keep the signal, drop the noise: in CveReachabilityAdapter, after correlation, prune each
workload's runtime LibraryLoaded to only those matching a CVE package on an image it runs
(library_matches). A *vulnerable* library load is the signal; the rest is dropped before it
reaches the prompt or the fingerprint. Reachability is unaffected (set from the same match;
pruning only removes loads that never matched). Non-library behaviors pass through.
Test: a non-CVE load (libpthread) is pruned while the CVE-matching one (libssl↔openssl)
survives. clippy + full lib suite (106) green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VtjoJttCvBY4dzCoE4f9vP
Architect nit: the highest-risk false-drop path (a load matching a SECOND image's CVE on a multi-image workload) and the zero-CVE drop-all branch lacked coverage. Factor a surviving_libs/lib helper and add both cases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtjoJttCvBY4dzCoE4f9vP
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.
After JEF-68 lit up library-load on-node,
LibraryLoadedfloods runtime evidence — every workload loads dozens of libs, and it's fingerprinted verbatim (lib:{name}, uncoarsened). On a 300s TTL the set churns every pass → the per-entry verdict cache busts → the engine re-judges ~all internet-facing entries every pass instead of just the changed one (and the prompt is bloated with irrelevant loads).Fix: in
CveReachabilityAdapter, after correlation, prune each workload'sLibraryLoadedto only those matching a CVE package on an image it runs (library_matches). A vulnerable library load is the signal we want (it's what JEF-51 reachability is about); the rest is dropped before it reaches the prompt or fingerprint. Reachability unchanged (set from the same match). Non-library behaviors untouched.Restores "only re-judge the entry that actually changed" and shrinks prompts. Test added (non-CVE load pruned, CVE-matching kept); clippy + full lib suite green.
🤖 Generated with Claude Code