Repository navigation
feat(plugins): add dynamic plugin commands - #1731
Open
developerkunal wants to merge 1 commit into
Open
developerkunal wants to merge 1 commit into
developerkunal wants to merge 1 commit into
Conversation
developerkunal
force-pushed
the
DXCDT-2605/dynamic-plugin-commands
branch
from
October 24, 2026 15:30
8ee6021 to
494a96f
Compare
developerkunal
force-pushed
the
DXCDT-2605/dynamic-plugin-commands
branch
2 times, most recently
from
November 2, 2026 14:31
88526bc to
ac95530
Compare
- Register installed plugins as `auth0 <plugin> [command]` in builds where the plugin feature is on, reading only the lockfile and manifest at startup - Pre-scan the CLI-owned global flags and pass everything else, and everything after `--`, to the plugin untouched - Check the plugin on every run before any login: enabled, verified files, registry index and revocation, call rules, tenant approval, then verify again after the session opens - Start the loopback proxy with only the invoked command's scopes and run the plugin with a small environment and a timeout, stopping the whole process tree on timeout or interrupt - Add the token source for the proxy, the plugin error class, and a warning when a core command shadows an installed plugin - Reject AUTH0_ environment variables in plugin manifests and refuse a root command call that names a subcommand
developerkunal
force-pushed
the
DXCDT-2605/dynamic-plugin-commands
branch
from
November 2, 2026 19:36
ac95530 to
d8326f4
Compare
This branch has not been deployed
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.
🔧 Changes
Installed plugins now show up as commands:
auth0 <plugin>for the plugin's root command andauth0 <plugin> <command>for each of its other commands. This adds the checks before a plugin starts, the environment and timeout it runs with, and the error shape for a failed run. The feature is still behind the build gate, so a stable build registers no plugin command.Registration. At startup the CLI reads each plugin's
plugin.json, checked against the lockfile hash, without hashing the executable or using the network. A core command always wins over a plugin of the same name, with a stderr warning when it runs.Arguments. The CLI takes out only the flags it owns and passes everything else, and everything after a bare
--, to the plugin untouched. A call such asauth0 plugin-name --flag scan, wherescancould be a subcommand, is refused as ambiguous, so the root command cannot run with the permissions meant forscan.Checks before every run, in this order, all failing closed
AUTH0_CLI_PLUGINS_DISABLED.How the plugin runs
AUTH0_PLUGIN_<NAME>, and the variables the command declared inpermissions.env. Nothing starting withAUTH0_is passed through, and the manifest validator now rejects anyAUTH0_variable name.Failed runs. A new additive error class
plugincovers a non-zero exit, a timeout, an interrupt and a failed start. The plugin's own exit code is indetails.exitCodeof the JSON error envelope. Other refusals use the existing validation and auth classes.Existing code. The CLI now keeps the access token and tenant domain in memory for the proxy, and never prints them.
resolveAgentModestops reading arguments at--.📚 References
DXCDT-2605. Part of the plugin framework stack of 11 PRs, and it builds on the PR below it (DXCDT-2604).
🔬 Testing
The new code is covered by unit tests.
📝 Checklist