You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pointers to mutable containers escape the package boundary #533
Two accessors hand out a pointer to a container the caller can then mutate wholesale — a different leak
from slice aliasing, because the container's own API is the attack surface:
ResourceCatalog is mutable by design — the executor interns into one during a run. The graph's copy
is supposed to stay pristine, and the doc comment says GraphExecutor.RunClones it "so the graph's
planning catalog stays pristine across plan-once-run-many reuse."That is one caller's discipline, not a
property of the type: any other holder can intern straight into the graph's catalog.
Signature returns a pointer to a mutable struct, so a caller can rewrite the publisher signature in
place on a graph they merely read.
Fix: return a reader view or a copy. Signature is cheap — return the value. ResourceCatalog is the
judgment call: a read-only interface, or clone-on-access with the cost measured, since the executor clones
it every run anyway.
Exit: neither accessor exposes a mutable path into the graph; the Run-clones-it comment becomes a
statement about behavior rather than a warning the caller must heed.
Activity
David-Noble-at-work commentedon Nov 9, 2026
star github triage sweep added this issue to Triage: devlore, for the rule it breaks:
no-evidence: no Evidence of completion section