Tighten Zig and MemoryAF permission enforcement for 0.2.0 - #416
Open
dovinmu wants to merge 6 commits into
Open
Conversation
dovinmu
marked this pull request as ready for review
July 30, 2026 19:18
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.
What changed
readpermission for Zig document scansThis PR contains no changes to the deprecated Go Antfly runtime. Hardening for that implementation belongs on the 0.1.x branch.
Documentation
zig/AUTH.mdzig/MCP.mdzig/CONNECTIONS.mdgo/pkg/memoryaf/README.mdWhy
The 0.2.0 sweep found a missing table-level check on the native Zig scan route and several MemoryAF paths that could surface another user's private memories.
The reported read-only MCP write bypass was in the deprecated Go adapter. Native Zig MCP already filters its advertised tools by effective permissions and routes built-in tool execution back through the normal authenticated HTTP handler, which enforces the exact target table, operation, and row filters. The added regressions make that distinction explicit.
Larger policy decisions—especially Zig transaction ownership/authorization, request-defined foreign DSNs, internal-route network boundaries, and private-derived MemoryAF entity metadata—are documented in their existing design or component files and remain intentionally outside this targeted-fix PR.
Validation
TransformOpTypeMinalias; the shim is not included herezig fmt --check zig/pkg/antfly/src/api/http_server.ziggit diff --checkThe Zig suite was not built locally because that build is known to risk OOM on this machine; the added Zig regressions are left to CI.