Repository navigation
fix(macos): stop masked values reaching MCP and the assistant, and finish the audit's partial fixes - #4178
Merged
Conversation
…nish the audit's partial fixes
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
Fixes from the 2026-11-10 code audit (wave 2) for the macOS app: masked values leaking to external callers (AI-01), and what wave 1 (#4174) left partly done.
Masking for MCP, the assistant, Claude Agent, AppleScript and Shortcuts
PluginColumnOrigin, additive PluginKit change, kit 43). Results for external callers are masked by that origin and by name; traced origins only add masking.VALUES) is masked whole on a connection with rules.sys_catalogandsys(not measured), column names, and the person's own screens.Drivers
bit,varbitandintervaloids are named from the built-in table, so a fresh session's stream header no longer calls themunknown.RENAMENX), instead of writing into that key.PRAGMA data_versionis allowed in the read-only scope, so FTS5 tables can be read there.Editor, edits, sessions
LIMIT:n,IN:ids) are bind parameters again;LIMIT:nbecomesLIMIT $1, notLIMIT$1.''in a NOT NULL text column without one, else NULL.Keychain
Tests changed on purpose
SwitchDatabasePooledConnectionTests.reconnectingSwitchReportsTheTransactionItEndedremoved: the switch is now refused.MaskingBridgeTestsfixture reports origins;MaskingPolicyTests.externalUntracedColumnIsMaskedexpects whole masking;externalTableRuleMatchesTheOriginTablebecameexternalTableRuleMatchesAnyTracedRelation.SQLiteColumnOriginsTests.compoundSelectHasNoOriginsandvaluesRowsHaveNoOriginsexpect an all-nil list.RedisStatementGeneratorTests.hashInsertKeepsJSONValues,RedisCommandParserAppStatementTests.insertsStayTyped: collection inserts are staged.TableTransferServiceTests: the stub reports per-column types and records catalog and stream order.KeychainItemScopeTests.readPrefersTheSelectedItemreplaced byreadReturnsTheNewerItem.Not done here
SETvalues lost on a reconnect are not reported; no driver can report them yet.Test plan
verify.sh: build, AllPlugins, the PluginKit ABI check (additive, kit 43, minimum 19), the Unit plan,TableProCorepackage tests, an iOS build with its affected suites, lint and both catalogs.PostgreSQLColumnOriginsTests,MySQLColumnOriginsTests,SQLiteColumnOriginsTests,MaskingExternalOverlayTests,PluginColumnOriginsTests,ImportDataSinkAdapterBitColumnTests,RedisCollectionInsertTests,MySQLSocketKeepaliveTests,SQLEditorPendingTextTests,SyncFullFetchDeletionTests,StructureRebuildPartialFailureTests,ClaudeAgentGrantSubjectTests.