Repository navigation
Conversation
zjncs
force-pushed
the
feat/authoring-execution
branch
from
October 23, 2026 10:33
80d8ada to
8c6fcbd
Compare
zjncs
force-pushed
the
feat/authoring-mcp-security
branch
from
October 23, 2026 10:39
769f682 to
4c8399d
Compare
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
zjncs
force-pushed
the
feat/authoring-execution
branch
from
October 27, 2026 07:01
8c6fcbd to
4861213
Compare
zjncs
force-pushed
the
feat/authoring-mcp-security
branch
from
October 27, 2026 07:01
4c8399d to
3e1c5a2
Compare
…cies Layer (b2) of the authoring platform (iflytek#934), the second half of the split runtime layer — the surface for the dedicated security review: - **Shared AuthoringSecurityPolicy** gates OpenAI-compatible and http/sse MCP endpoints at save time and again at connect time: cloud-metadata/ link-local/multicast always rejected; loopback/RFC1918/ULA/CGNAT/ RFC 2544 behind per-surface allow-private-endpoints flags (default off); unresolvable hosts rejected. The policy resolves through an injectable resolver so tests stay hermetic. - **stdio MCP**: off by default; in docker execution-mode its command runs inside a hardened container torn down on close; envRefs limited to the operator-configured allowlist (default empty = all rejected). - **MCP probing during validation**: declared servers are connected, initialized and tools/list-ed for real before the behavior layer relies on them; discovered tools surface in the event stream, unknown toolFilters warn without failing. - **OpenAI-compatible adapter** for prompt tasks with an MCP tool loop, guarded by the same endpoint policy; execution-mode defaults to docker and inline fails startup outside local/dev/test (AuthoringStartupGuard). - HTTP redirects never followed; response bodies and stdio lines capped at 2 MiB. - Also repairs an application.yml merge artifact from the previous monolithic branch: the authoring runtime keys had been nested under github-sync; they now sit under skillhub.authoring where they belong. Verified: security-policy classification per surface (hermetic DNS), redirect refusal against the metadata range, response/line caps, envRef allowlist filtering, docker-wrapped command construction, MCP handshake against a real local HTTP server, stdio against a python3 subprocess, OpenAI tool loop with MCP execution (48 tests), and the runtime flow integration test covering the save-time rejections (cloud-metadata endpoints, non-allowlisted envRefs, metadata-range LLM endpoints) plus the MCP-probed three-layer validation. Signed-off-by: zjncs <18910855655@163.com>
zjncs
force-pushed
the
feat/authoring-mcp-security
branch
from
October 28, 2026 09:15
3e1c5a2 to
3d295d3
Compare
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.
Layer (b2) of the authoring platform split (iflytek#934 on iflytek/skillhub), stacking on layer (b1) (#1003). This is the layer for the dedicated security review.
What this layer adds
Security policies (the dedicated-review surface)
AuthoringSecurityPolicygates OpenAI-compatible and http/sse MCP endpoints at save time and again at connect time: cloud-metadata/link-local/multicast always rejected; loopback/RFC1918/ULA/CGNAT/RFC 2544 behind per-surfaceallow-private-endpointsflags (default off); unresolvable hosts rejected. Hermetic tests via an injectable resolver.AuthoringStartupGuard).MCP probing during validation
Declared servers are connected, initialized and tools/list-ed for real before the behavior layer relies on them; discovered tools surface in the event stream, unknown toolFilters warn without failing.
OpenAI-compatible adapter
Prompt tasks with an MCP tool loop, guarded by the same endpoint policy.
Also repairs an application.yml merge artifact from the previous monolithic branch (authoring runtime keys had been nested under github-sync).
Verification
Security-policy classification per surface, redirect refusal against the metadata range, response/line caps, envRef allowlist filtering, docker-wrapped command construction, MCP handshake against a real local HTTP server, stdio against a subprocess, OpenAI tool loop with MCP execution, and the runtime flow integration test covering the save-time rejections — 48 tests, 0 failures.