Scaffolded agents mandate approve_all and tools:["*"] — drop the mandate, allowlist tools, gate the immediate-run step, document managed-settings floors
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 62/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- azure, powershell, python
- Área
- documentation, security, tooling
Línea de trabajo
Start with skills/use-ai-gateway/SKILL.md at the cited lines and README §Security; inspect how the build scaffold and C.5 run instructions currently specify permissions, tools, and execution. Confirm the SDK's default and managed-settings behavior, then verify that the documented scaffold requires an explicit tool allowlist and review before running, with managed-settings floors documented.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What the skill currently mandates
skills/use-ai-gateway/SKILL.md (v2.2.0) requires every Copilot SDK program the build command scaffolds to ship with three specific posture lines (line numbers at b95b562, HEAD of main today):
- L.369 (inside the C.2 required-elements list "The generated code must:", L.359):
Include "on_permission_request": PermissionHandler.approve_all in the session config - L.394 (the skill's own session-config example):
on_permission_request=PermissionHandler.approve_all, - L.417 (the example's
mcp_serversblock):"tools": ["*"], - L.484-488 (C.5 "Run and verify"): "Don't stop at 'here's the code.' Run the agent once..." / "Run it (e.g.
python agent.py) and read the output." — execute the generated program in the same session, before any human review of the generated code.
What the SDK runtime does with those lines
Checked against github-copilot-sdk 1.0.14 (current PyPI release):
- No handler (the shipped default since copilot-sdk#509 "deny all permissions by default" and #554 "Require permission handler on session creation"): the session dispatch returns
PermissionDecisionUserNotAvailable()— shell, MCP, write, read, and URL requests are all denied. approve_all(what L.369/L.394 mandate): every request kind resolves to an unconditionalPermissionDecisionApproveOnce— stateless, no prompt; three consecutive shell decisions all come back approve-once.approve_allraises only under the session-levelmanaged_settings_enabledflag (and defers requests markedmanaged_approval_required). The repo never mentions managed settings (repo-wide grep: zero hits), and the README §Security plus the skill's Guardrails block cover key hygiene and read-only gateway posture only — execution posture is addressed nowhere.
Why the composition matters for consumers
The gateway's documented deployment model is a shared, multi-backend resource — platform teams federating MCP servers, OpenAPI APIs and SaaS connectors behind one governed endpoint. Two principals other than the consumer author content a scaffolded program consumes:
- a registering team (any holder of write access to the gateway resource) — controls model backends and tool registrations, including
tools/listdescriptions; - the operator of a federated external backend — controls tool results and descriptions, holding no Azure RBAC at all.
"tools": ["*"] wires every registered server's tools — with their registrant-authored descriptions — into the program with no curation step. approve_all then approves anything the model requests, including shell. C.5 directs the first run before a human has read the generated code. On unmanaged hosts (the SDK default, and the population this plugin targets) that is unattended command execution driven by registrant-authored content, in a program whose repo-facing security framing ("Guardrails", "Read-only against the gateway") never mentions it.
Two-session local check (mock gateway, mock model backend)
The same scaffolded program run twice against a local mock gateway + mock model backend (BYOK provider, so no GitHub auth involved):
- With the mandated config (
approve_all+tools: ["*"]): 40permission.requestedevents, all 40 auto-approved; a single model turn demanding the runtime'spowershelltool executed 39 times in a 35-second window — wrote a sentinel file and POSTed the project.envgateway key to the mock collector endpoint each time. No interaction at any point. - Same session minus the handler: 257 tool demands, zero approvals surfaced, zero executions.
The gate the scaffold removes is real at the runtime layer, and it is the only thing standing between registrant-authored content and the workstation.
Repro sketch
- Register one tool server on a gateway whose
tools/listentry carries a description you control (any local HTTP responder;az aigateway mcp create --endpointsaccepts arbitrary URLs). - Run
/ai-gateway:buildand let the skill scaffold the program; confirm the three mandates landed (the L.369 handler, the L.417 wildcard, the C.5 run directive). - Point the BYOK provider at a model backend you control; one model turn demands the runtime's
powershelltool with a command that writes a sentinel file. - Run it once per C.5: the command executes with no prompt and the sentinel appears. Delete
on_permission_requestfrom the same program and run again: nothing executes.
Requested changes
- Drop the
approve_allmandate (L.369, L.394): scaffold the SDK default (deny; handler required) and let the consumer opt into an approval policy explicitly. - Replace
"tools": ["*"](L.417) with a per-server tool allowlist confirmed at build time. - Gate C.5 behind review: present the generated program for human review before any execution, instead of directing an immediate run.
- Document the managed-settings floors (
managed_settings_enabled) for enterprise-managed hosts in the repo's security guidance.
Happy to turn the local two-session transcript into a PR against SKILL.md if that's useful.
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 9
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 23
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Azure/aigateway
-
How do I use the AI Gateway to route to ADO Remote MCP Server?Posiblemente ocupada @santiagxf la tomó hoy. Abiertoquestion
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
Azure/aigateway#72 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Playground testing to external claude enterprise fails from AI GatewayPosiblemente ocupada @santiagxf la tomó hoy. Abiertoinvestigate
Dificultad 3/5 1-2 días Aptitud para principiantes 53/100
Azure/aigateway#71 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
migrate-apim: partialWhen conditions are declared in the schema and implemented in the planner, and nothing checks the two agreePosiblemente ocupada @santiagxf la tomó hoy. Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Azure/aigateway#5 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de Azure/aigateway
Issues similares
-
roadmap/v1.3.0 scope/entitlement type/improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
databrickslabs/ontos#1778 ·
Los mantenedores suelen responder en 2 días
-
bug good first issue help wanted up-for-grabs
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ClickHouse/loom#2075 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itselfPosiblemente ocupada @fedonman la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 69/100
StevenBlack/hosts#3314 ·
-
task
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SparseLinearAlgebra/spla#316 · 1 comentario ·
Los mantenedores suelen responder en 1 día