원클릭으로
path-boundary-comparison
How to perform root-path containment checks without weakening security on case-sensitive filesystems
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
How to perform root-path containment checks without weakening security on case-sensitive filesystems
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | path-boundary-comparison |
| description | How to perform root-path containment checks without weakening security on case-sensitive filesystems |
| domain | security |
| confidence | medium |
| source | earned |
Use this when code must verify that a computed file path stays inside a trusted root directory. This commonly appears in cache stores, download helpers, extraction code, and any path traversal defense.
Path.GetFullPath(...) before comparing.Path.DirectorySeparatorChar for child-path checks.StringComparison.Ordinal, not ignore-case comparisons. Case folding can make a sibling path appear to be under the trusted root on case-sensitive filesystems.root vs ROOT) so the security fix stays pinned if someone later reintroduces ignore-case comparisons.var fullPath = Path.GetFullPath(path);
var fullRoot = Path.GetFullPath(root);
var rootWithoutSeparator = Path.TrimEndingDirectorySeparator(fullRoot);
var rootedPrefix = rootWithoutSeparator + Path.DirectorySeparatorChar;
if (!fullPath.StartsWith(rootedPrefix, StringComparison.Ordinal) &&
!string.Equals(fullPath, rootWithoutSeparator, StringComparison.Ordinal))
{
throw new ArgumentException("Resolved path escapes the trusted root.");
}
StartsWith(..., StringComparison.OrdinalIgnoreCase) for a security boundary check./tmp/root2 look like it is inside /tmp/root.Path.GetFullPath(...).Investigate .NET CI failures using the hlx CLI tool via bash. USE FOR: checking Helix job status, searching build logs, downloading test results, AzDO build timeline analysis — when MCP tools aren't loaded, when the MCP server isn't configured or fails to start, or when scripting with JSON output and jq. DO NOT USE FOR: tasks where Helix/AzDO MCP tools are already available in context (prefer ci-analysis skill when MCP server is loaded). INVOKES: bash (hlx CLI commands with --json output).
{what this skill teaches agents}
Audit pattern for comparing WorkItemSummary (list API) fields against WorkItemDetails (per-item API) after a Helix.Client SDK bump
Domain-layer normalizer + JSON-stable cache key pattern for filter types with server-side defaults and case-insensitive fields.
Strict unknown-parameter rejection for MCP tools: Stage A (UnmappedMemberHandling.Disallow) + Stage B (did-you-mean CallToolFilter).
Audit MCP/CLI tool parameter surface against underlying REST API capabilities to find silently-dropped params.