Allow managed policy to pre-approve and require extensions from managed plugins (needed for prompt blocking)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 30/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- github, javascript
Rechercherichtung
Start by tracing how managed enabledPlugins settings, extension permission approvals, and extension loading are handled in Copilot CLI; the issue names no source files or tests. Compare those paths with the managed policy hook behavior referenced in the report. Done means managed plugins can enforce their extensions under the requested policy, with coverage for approval, experimental mode, and user disable settings.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
Organizations can require a plugin through managed settings (enabledPlugins), but they cannot make an extension shipped inside that plugin run without user interaction. This matters for prompt-policy use cases: only programmatic SDK hooks (extensions) can return decision: "block" from onUserPromptSubmitted. Command and HTTP config-file hooks have their userPromptSubmitted output dropped, so they can only audit prompts.
As a result, there is currently no way for an administrator to enforce prompt blocking on managed devices.
Environment
- Copilot CLI 1.0.115, macOS arm64
- VS Code 1.147 (Agent Host, bundled
@github/copilot-sdk)
What we observed
Test setup: a plugin installed from a marketplace with "extensions": "./extensions" in plugin.json. Its extension registers onUserPromptSubmitted and returns { decision: "block", reason } for matching prompts.
- Blocking works in both Copilot CLI and VS Code once the extension is running: no model turn runs and no user message is recorded.
- The extension asks for user approval. The
extension-permission-accessrequest is for theregister hookscapability. In-pmode it is denied (denied-no-approval-rule-and-could-not-request-from-user). - A saved approval only applies to the exact folder. An entry in
permissions-config.jsonkeyed by a parent folder,$HOME,/or*does not apply to subfolders. - There is no managed way to pre-approve it. The MDM managed-settings keys don't cover extension approvals. Managed
permissions.allowonly supportsShell,Read,EditandDomain. - CLI extensions require experimental mode. Copilot CLI only loads extensions with
--experimentalorexperimental: true, andexperimentalis not a supported managed key. VS Code enables experimental mode in its Agent Host. - Users can disable the extension. Setting
extensions.disabledExtensionsorextensions.mode: "disabled"in the user's settings disables it, even when its plugin is required by managed policy. This was verified in both Copilot CLI and VS Code. --allow-allapproves the extension, but that is a per-user choice and is unavailable whendisableBypassPermissionsModeis set.
Requested behavior
For plugins required by managed policy (enabledPlugins in MDM, server-managed, or managed-settings.json):
- Their extensions should be treated as approved, or there should be a managed setting to pre-approve
extension-permission-accessfor specific plugin extensions. - Their extensions should load without experimental mode, or administrators should be able to set it through managed settings.
- Users should not be able to turn those extensions off through
extensions.disabledExtensionsorextensions.mode. This would mirror how managed policy hooks keep running whendisableAllHooksis set.
Alternatively, letting command/HTTP userPromptSubmitted hooks from managed policy or managed plugins return decision: "block" would also cover this use case without requiring extensions.
Related
- #4640: prompt hooks were skipped for messages sent while the agent is working (fixed in 1.0.115).
- Vorherrschende Sprache
- Python
- Sterne
- 11.5k
- Forks
- 2k
- Ø Merge
- 6 Std. 34 Min.
- Gemergte PRs (30 T.)
- 3
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/copilot-cli
-
area:plugins
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
github/copilot-cli#5567 ·
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 78/100
github/copilot-cli#5489 ·
-
Built-in functions.view returns no content for large files despite documenting automatic truncationOffenarea:tools
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/copilot-cli#5476 ·
-
triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 74/100
github/copilot-cli#5377 ·
-
area:platform-windows area:tools
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 74/100
github/copilot-cli#5340 ·
Alle Issues in github/copilot-cli
Ähnliche Issues
-
marketing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Status: Triage Suggestion
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
GTNewHorizons/GT-New-Horizons-Modpack#27957 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Suggestion]: NoParrotOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
collabnix/awesome-mcp-lists#515 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Look-ahead bias via resample('1min').interpolate(method='time') in CCIStrategy and ReinforcedQuickieOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
documentation good first issue
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag