Enforce JSON Schema format constraints - #13363
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The centralized change correctly covers both compiler paths with focused regression tests.
Pull request overview
Enforces JSON Schema format constraints across embedded gateway and custom server schemas.
Changes:
- Enables
AssertFormat()in the shared compiler. - Adds URI validation regression tests for both compiler paths.
File summaries
| File | Description |
|---|---|
internal/config/validation_schema.go |
Enables strict format validation. |
internal/config/validation_schema_test.go |
Tests invalid and valid URI handling. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Fixed in the latest commit — the lint failure was testifylint's |
🔒 mcpg Read-Only Stress — default AWFSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE No write leaked through any surface. Part B is inconclusive because the gateway's exposed MCP tool catalog for this workflow contains only 23 read tools (get_commit, get_file_contents, get_label, get_latest_release, get_release_by_tag, get_tag, issue_read, list_branches, list_commits, list_issue_fields, list_issue_types, list_issues, list_pull_requests, list_releases, list_repository_collaborators, list_starred_repositories, list_tags, pull_request_read, search_code, search_commits, search_issues, search_pull_requests, search_repositories) — the 6 targeted write tools are absent entirely, so the write path never reaches a call-time gateway/DIFC check to confirm enforcement (as anticipated by the architectural note:
|
🔒 mcpg Read-Only Stress — gvisorSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Details:
No security gap found; result is INCONCLUSIVE only due to test-surface limitations (absent write tools in catalog, unauthenticated
|
JSON Schema
formatkeywords, including URI validation, were annotation-only under the default Draft 2020-12 behavior. Gateway and custom server schemas can now enforce their declared format constraints.Strict format validation
AssertFormat()in the shared JSON Schema compiler constructor.$refloaders.Regression coverage