-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat: RFC 6570 URI templates with operator-aware security #2356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
maxisbey
wants to merge
47
commits into
main
Choose a base branch
from
feat/uri-template-rfc6570
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 35 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
5f5e72b
feat: add RFC 6570 URI template utility with bidirectional support
maxisbey e5ecf50
feat: add filesystem path safety primitives
maxisbey 0018eea
feat: integrate UriTemplate into MCPServer resource templates
maxisbey 5cbbc70
feat: wire ResourceSecurity into MCPServer configuration
maxisbey 928698b
docs: add migration guide entry for resource template changes
maxisbey 00a1336
refactor: accept plain set for ResourceSecurity.exempt_params
maxisbey a5afb98
docs: add resources guide covering templates, security, and low-level…
maxisbey 2575042
feat: reject duplicate variable names in URI templates
maxisbey a463ed9
test: add adversarial security test cases for layered defense
maxisbey b278925
feat: add UriTemplate.is_template() static method
maxisbey 3b8aadd
feat: add URI length guard to UriTemplate.match()
maxisbey 3a786f3
test: add edge-case coverage for literal handling and anchoring
maxisbey c4f7db0
feat: reject null bytes in safe_join path components
maxisbey 674783f
fix: decide template vs static purely on URI variables
maxisbey 1987340
fix: correct ; operator matching and expansion per RFC 6570
maxisbey c1a1787
refactor: remove post-decode structural checks from UriTemplate.match
maxisbey 93e742b
feat: lenient query param matching for {?var} and {&var}
maxisbey 99c9cb0
fix: tighten parse-time validation and document matching limits
maxisbey 80c7934
fix: preserve pct-triplets in reserved expansion; allow empty match c…
maxisbey 278e5e7
refactor: use lists instead of tuples for variable-length sequences
maxisbey 9473442
docs: trim migration guide to breaking changes only
maxisbey 60d12e1
docs: clarify query leniency and fix exempt_params example
maxisbey 2f7fd61
fix: reject template patterns causing O(n²) regex backtracking
maxisbey aed579c
docs: address reviewer feedback on migration guide and resources doc
maxisbey 7891fd9
test: close coverage gaps in lenient-query branch and test handlers
maxisbey 1500ca3
fix: correct lenient query matching for +, fragments, and standalone …
maxisbey 4a45f59
docs: fix stale docstrings and export DEFAULT_MAX_* constants
maxisbey 2bedd9d
test: move new resource tests to module level per repo convention
maxisbey dcfd67a
test: close coverage gaps in _parse_query and _split_query_tail fallb…
maxisbey a8f488e
fix: preserve empty list items in explode matching
maxisbey 7c34c12
refactor: simplify explode split since regex guarantees leading separ…
maxisbey ed84090
fix: fall back to strict regex when path contains {#...} or literal #
maxisbey dd505ea
docs: add missing type annotations to resources.md examples
maxisbey c8712ff
docs: improve resources.md with spec link and concrete-URI examples
maxisbey 19822fb
fix: reject {expr}{+var} adjacency to close ReDoS gap
maxisbey ae12284
refactor: replace regex matcher with linear-time two-ended scan
maxisbey 7629f62
test: close coverage gaps in linear-scan error paths
maxisbey 9595740
fix: do not percent-decode query parameter names in match
maxisbey 8fb3d6f
fix: reject null bytes in ResourceSecurity.validate by default
maxisbey 6e55991
fix: raise ResourceSecurityError instead of falling through on rejection
maxisbey ec63c20
hardening: tighten limits, immutability, and drive-letter detection
maxisbey ba784d3
docs: note AnyUrl pre-normalisation in get_resource docstring
maxisbey 0eeafe7
fix: anchor first template literal at position 0, not rightmost occur…
maxisbey cd19eaa
docs: update migration guide and resources doc for matcher changes
maxisbey d3a0936
docs: trim migration guide to actual v1.x breaking changes
maxisbey f9aa92b
revert: remove frozenset coercion in ResourceSecurity.__post_init__
maxisbey 8b5ca89
fix: ifemp round-trip + stale docstrings from linear-scan refactor
maxisbey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.