{"record":{"id":"4c46b175362f5050","repo":"JuliusBrussee/caveman","slug":"ccr-sqlite-path-is-required","errorCode":null,"errorMessage":"ccr sqlite path is required","messagePattern":"ccr sqlite path is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":209,"sourceCode":"\n// PrepareSQLitePath creates or tightens a persistent SQLite file before the\n// driver sees it. Recovery databases can contain prompts, credentials, and tool\n// results, so neither a permissive umask nor a caller-supplied symlink may widen\n// access. Existing WAL/SHM files receive the same checks.\nfunc PrepareSQLitePath(path string) error {\n\t_, err := PrepareSQLitePathCanonical(path)\n\treturn err\n}\n\n// PrepareSQLitePathCanonical secures path and returns the one canonical path\n// callers must use for every subsequent open and sidecar check. Returning the\n// resolved parent closes the check/use gap from a swappable parent symlink.\nfunc PrepareSQLitePathCanonical(path string) (string, error) {\n\tif path == \":memory:\" {\n\t\treturn path, nil\n\t}\n\tif strings.TrimSpace(path) == \"\" {\n\t\treturn \"\", fmt.Errorf(\"ccr sqlite path is required\")\n\t}\n\tparent := filepath.Dir(path)\n\tabsoluteParent, err := filepath.Abs(parent)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"resolve sqlite parent %q: %w\", parent, err)\n\t}\n\tresolvedParent, err := filepath.EvalSymlinks(absoluteParent)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"resolve sqlite parent %q: %w\", parent, err)\n\t}\n\tparentInfo, err := os.Stat(resolvedParent)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"inspect sqlite parent %q: %w\", resolvedParent, err)\n\t}\n\tif !parentInfo.IsDir() {\n\t\treturn \"\", fmt.Errorf(\"sqlite parent %q must be a directory\", resolvedParent)\n\t}\n\tif err := validateSQLiteParentSecurity(resolvedParent, parentInfo); err != nil {","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/engine/ccr/store_sqlite.go#L191-L227","documentation":"Error \"ccr sqlite path is required\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:209 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the ccr sqlite path."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}