{"record":{"id":"23e2e7a92b029501","repo":"nektos/act","slug":"s-is-not-an-absolute-path","errorCode":null,"errorMessage":"%s is not an absolute path","messagePattern":"(.+?) is not an absolute path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/container/docker_cli.go","lineNumber":1135,"sourceCode":"\t\tif isValid := validator(split[1]); isValid {\n\t\t\tcontainerPath = split[0]\n\t\t\tmode = split[1]\n\t\t\tval = fmt.Sprintf(\"%s:%s\", path.Clean(containerPath), mode)\n\t\t} else {\n\t\t\tcontainerPath = split[1]\n\t\t\tval = fmt.Sprintf(\"%s:%s\", split[0], path.Clean(containerPath))\n\t\t}\n\tcase 3:\n\t\tcontainerPath = split[1]\n\t\tmode = split[2]\n\t\tif isValid := validator(split[2]); !isValid {\n\t\t\treturn val, fmt.Errorf(\"bad mode specified: %s\", mode)\n\t\t}\n\t\tval = fmt.Sprintf(\"%s:%s:%s\", split[0], containerPath, mode)\n\t}\n\n\tif !path.IsAbs(containerPath) {\n\t\treturn val, fmt.Errorf(\"%s is not an absolute path\", containerPath)\n\t}\n\treturn val, nil\n}\n\n// validateAttach validates that the specified string is a valid attach option.\nfunc validateAttach(val string) (string, error) {\n\ts := strings.ToLower(val)\n\tif slices.Contains([]string{\"stdin\", \"stdout\", \"stderr\"}, s) {\n\t\treturn s, nil\n\t}\n\treturn val, errors.New(\"valid streams are STDIN, STDOUT and STDERR\")\n}\n\nfunc toNetipAddrSlice(ips []string) []netip.Addr {\n\tif len(ips) == 0 {\n\t\treturn nil\n\t}\n\tnetIPs := make([]netip.Addr, 0, len(ips))","sourceCodeStart":1117,"sourceCodeEnd":1153,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/container/docker_cli.go#L1117-L1153","documentation":"The final check in validateLinuxPath requires the container-side path to be absolute (path.IsAbs). If it is relative, the original value is returned with '%s is not an absolute path' naming the container path.","triggerScenarios":"Passing a container path without a leading slash, e.g. --device /dev/foo:dev/foo, or a two-part value whose second segment is a relative path (which the mode validator rejects, causing it to be treated as the container path).","commonSituations":"Omitting the leading / when writing the in-container name; or intending a mode but typing something the validator rejects, so the parser misclassifies the segment as a path.","solutions":["Prefix the container path with '/', e.g. /dev/foo","Double-check the third segment is a valid rwm mode so segments are classified correctly","Remember the one-segment form maps the same path on both sides: --device /dev/foo"],"exampleFix":"# before\n--device /dev/foo:dev/foo\n\n# after\n--device /dev/foo:/dev/foo","handlingStrategy":"validation","validationCode":"// Go: check container-side path is absolute before passing to act\nparts := strings.SplitN(deviceVal, \":\", 3)\ncontainerPath := parts[len(parts)-1]\nif len(parts) == 3 || (len(parts) == 2 && !isValidDeviceMode(parts[1])) {\n    containerPath = parts[1]\n}\nif !path.IsAbs(containerPath) { return fmt.Errorf(\"container path %q must be absolute\", containerPath) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write the in-container path with a leading slash","In the 2-part form, the second segment is mode-or-path: make sure it is unambiguous"],"tags":["docker","device-mapping","path-validation","absolute-path"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}