Scaffolded agents mandate approve_all and tools:["*"] — drop the mandate, allowlist tools, gate the immediate-run step, document managed-settings floors
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- azure, powershell, python
- Lĩnh vực
- documentation, security, tooling
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 18
- Fork
- 9
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 23
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/aigateway
-
How do I use the AI Gateway to route to ADO Remote MCP Server?Có thể đã có người làm @santiagxf đã nhận hôm nay. Đang mởquestion
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
Azure/aigateway#72 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Playground testing to external claude enterprise fails from AI GatewayCó thể đã có người làm @santiagxf đã nhận hôm nay. Đang mởinvestigate
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 53/100
Azure/aigateway#71 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
migrate-apim: partialWhen conditions are declared in the schema and implemented in the planner, and nothing checks the two agreeCó thể đã có người làm @santiagxf đã nhận hôm nay. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Azure/aigateway#5 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Azure/aigateway
Issue tương tự
-
roadmap/v1.3.0 scope/entitlement type/improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
databrickslabs/ontos#1778 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug good first issue help wanted up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ClickHouse/loom#2075 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itselfCó thể đã có người làm @fedonman đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 69/100
StevenBlack/hosts#3314 ·
-
task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
SparseLinearAlgebra/spla#316 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày