{"record":{"id":"f2646bae2599abab","repo":"github/github-mcp-server","slug":"path-must-not-contain-segments","errorCode":null,"errorMessage":"path must not contain '..' segments","messagePattern":"path must not contain '\\.\\.' segments","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/repositories.go","lineNumber":2456,"sourceCode":"\t\t\t\t\t\tURL   githubv4.String\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} `graphql:\"blame(path: $path)\"`\n}\n\n// validateBlamePath rejects empty, leading-slash, traversal-laden, or\n// control-character paths before any network call is made.\nfunc validateBlamePath(p string) error {\n\tif strings.TrimSpace(p) == \"\" {\n\t\treturn fmt.Errorf(\"path must not be empty\")\n\t}\n\tif strings.HasPrefix(p, \"/\") {\n\t\treturn fmt.Errorf(\"path must be relative to the repository root (no leading '/')\")\n\t}\n\tif slices.Contains(strings.Split(p, \"/\"), \"..\") {\n\t\treturn fmt.Errorf(\"path must not contain '..' segments\")\n\t}\n\tfor _, r := range p {\n\t\tif r < 0x20 || r == 0x7f {\n\t\t\treturn fmt.Errorf(\"path must not contain control characters\")\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc GetFileBlame(t translations.TranslationHelperFunc) inventory.ServerTool {\n\tst := NewTool(\n\t\tToolsetMetadataRepos,\n\t\tmcp.Tool{\n\t\t\tName: \"get_file_blame\",\n\t\t\tDescription: t(\"TOOL_GET_FILE_BLAME_DESCRIPTION\",\n\t\t\t\t\"Get git blame information for a file, showing the commit that last modified each line. \"+\n\t\t\t\t\t\"Ranges share commit metadata via the top-level 'commits' map keyed by SHA. \"+\n\t\t\t\t\t\"Use 'start_line'/'end_line' to restrict the result to a window of the file, and \"+","sourceCodeStart":2438,"sourceCodeEnd":2474,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/repositories.go#L2438-L2474","documentation":"Error \"path must not contain '..' segments\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at pkg/github/repositories.go:2456 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}