TMA-MCP-5.1.2
Ensure resource templates with explicit URI patterns and MIME types are used
설명
The server exposes resources through predictable, well-defined URI template patterns with an explicit MIME type for each resource type. The specification makes mimeType optional on resource definitions and templates, and this Recommendation requires it be set explicitly so the client interprets each resource type unambiguously, which is stricter than the base protocol. The server validates every substituted URI-template value against the expected pattern before constructing the final URI. A read of a non-existent resource is rejected with a JSON-RPC -32602 error, the code the specification defines for that case. Resource templates advertise parameterized resources and are not the exhaustive set a server serves, because a server may also expose individual resources that no template describes. Where a deployment intends the approved templates to be an access-control namespace so that a...
점검 방법
감사 방식: 셸 명령
cfg="${MCP_CONFIG:-/etc/mcp/server.json}"; [ -f "$cfg" ] || { echo "missing $cfg (set MCP_CONFIG)"; exit 1; }; grep -Eq '"cis_5_1_2"|"protocolVersion"|"capabilities"|"auth"' "$cfg" && echo compliant || echo "non-compliant: section 5.1.2"- 예상 출력
compliant
조치 방법
조치 방식: 가이드 또는 인프라 패치
Define a URI template and an explicit MIME type for every resource type in the server configuration, and validate substituted template values against their expected pattern before building the final URI. Configure the server to reject a read of a non-existent resource with -32602 rather than returning an ambiguous empty result. Where the deployment treats the approved template set as an access-control namespace, deny a read outside that namespace and state the policy explicitly because the base protocol does not require it. Where the deployment also serves resource bytes over HTTP directly to a user agent, configure that HTTP surface, or the reverse proxy fronting it, to set X-Content-Type-Options: nosniff on those responses. The following nginx directive sets the header on a proxied resource surface: add_header X-Content-Type-Options "nosniff" always;
속성
- 운영 체제
- 모두
- 태그
- aimcpmcp-server
- 참고 자료
- CIS MCP Server Benchmark v1.0.0 - 5.1.2 Ensure resource templates with explicit URI patterns and MIME types are used
이 호스트 점검하기
감사 권한이 있는 시스템에서 실행하세요. 스캔은 읽기 전용입니다.
tmaegis scan --target mcp-server