Repository navigation
sec-default: a managed option, allowManagedModsOnly, keeps the mods a person installs from loading - #98083
Merged
Conversation
… person installs from loading
poteat
enabled auto-merge (squash)
September 29, 2026 07:38
poteat
disabled auto-merge
September 29, 2026 07:47
poteat
enabled auto-merge (squash)
September 29, 2026 15:33
qing-ant
approved these changes
Sep 29, 2026
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
We add
allowManagedModsOnly, read from managed settings under sec-default's ownpluginConfigsentry; while set, it refuses every user-tier hooks module atplugin.register.Notes
disableAllHooks, and turning hooks modules off, also stop the organization's own mods, andallowManagedHooksOnlyalso stops a person's settings hooks and status line. This option touches a person's mods alone.--settingsfile neither sets nor loosens it. On unless absent orfalse; a value the settings schema rejects (null) makes the CLI drop the wholepluginConfigskey with a settings warning, and the option reads as unset.$served; the loader admits after it evaluates today and we leave that as it is..catchrefuses the module and names the error in the debug log. If sec-default does not answer at all (not seated, e.g. managedprependPluginsleaves it out), mods load as they do today; accepted. Set mid-session, a running mod runs on until its next reload.settings.read.testcheck is expected red for now: it needs a published CLI whoseclaude plugin testloads a test's own hooks before the plugins it judges, and is re-run once that release is out.claude plugin test(it loads nothing into a session).--plugin-dirmod under-p; a refusal shown on screen for an installed mod (today: where the session hot-reloads the folder, else the debug log).hooks/policy/own-option); the second to land merges identical files.Test Plan
claude --plugin-diron a small mod: its hooks never run, and one line names the mod and the option.~/.claude/settings.json: the mod still loads.claude plugin test mods/sec-defaultis green.Changelog