{"record":{"id":"225ae5d1f74c34f7","repo":"Tencent/WeKnora","slug":"skill-file-path-is-required","errorCode":null,"errorMessage":"skill file path is required","messagePattern":"skill file path is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/skills/tenant_source.go","lineNumber":269,"sourceCode":"\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn path.Join(basePath, clean), nil\n}\n\nfunc (s *TenantSkillSource) row(name string) (*types.TenantSkillEntity, error) {\n\tif row, ok := s.byName[name]; ok {\n\t\treturn row, nil\n\t}\n\treturn nil, fmt.Errorf(\"skill not found: %s\", name)\n}\n\n// safeSkillRelPath normalises a caller-supplied relative path and refuses\n// anything that leaves the skill directory.\nfunc safeSkillRelPath(relativePath string) (string, error) {\n\ttrimmed := strings.TrimSpace(relativePath)\n\tif trimmed == \"\" {\n\t\treturn \"\", fmt.Errorf(\"skill file path is required\")\n\t}\n\tif path.IsAbs(trimmed) {\n\t\treturn \"\", fmt.Errorf(\"invalid skill file path: %s\", relativePath)\n\t}\n\tclean := path.Clean(trimmed)\n\tif clean == \".\" || clean == \"..\" || strings.HasPrefix(clean, \"../\") {\n\t\treturn \"\", fmt.Errorf(\"invalid skill file path: %s\", relativePath)\n\t}\n\treturn clean, nil\n}\n\n// bundleArchive returns the compressed zip of one skill, downloading it at\n// most once per cache lifetime.\nfunc (s *TenantSkillSource) bundleArchive(\n\trow *types.TenantSkillEntity,\n) ([]byte, error) {\n\tif s.loadBundle == nil {\n\t\treturn nil, fmt.Errorf(\"skill bundles are not available in this deployment\")","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/skills/tenant_source.go#L251-L287","documentation":"Input guard in safeSkillRelPath: the caller passed an empty or whitespace-only relative path. A path is required to resolve any file inside a skill bundle, so the empty input is rejected before normalization.","triggerScenarios":"Thrown at internal/agent/skills/tenant_source.go:269 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty relative path such as \"SKILL.md\" or \"scripts/run.sh\"","Check upstream code for variables that are empty when the skill has no script file","Treat as a programming error: never call with an unset path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}