{"record":{"id":"52488dfa1b3dab27","repo":"hashicorp/nomad","slug":"source-must-be-specified","errorCode":null,"errorMessage":"source must be specified","messagePattern":"source must be specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/structs.go","lineNumber":9919,"sourceCode":"\t}\n\n\t_, _ = h.Write([]byte(ta.GetterSource))\n\n\thashStringMap(h, ta.GetterOptions)\n\thashStringMap(h, ta.GetterHeaders)\n\n\t_, _ = h.Write([]byte(ta.GetterMode))\n\t_, _ = h.Write([]byte(strconv.FormatBool(ta.GetterInsecure)))\n\t_, _ = h.Write([]byte(ta.RelativeDest))\n\t_, _ = h.Write([]byte(strconv.FormatBool(ta.Chown)))\n\treturn base64.RawStdEncoding.EncodeToString(h.Sum(nil))\n}\n\nfunc (ta *TaskArtifact) Validate() error {\n\t// Verify the source\n\tvar mErr multierror.Error\n\tif ta.GetterSource == \"\" {\n\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"source must be specified\"))\n\t}\n\n\tswitch ta.GetterMode {\n\tcase \"\":\n\t\t// Default to any\n\t\tta.GetterMode = GetterModeAny\n\tcase GetterModeAny, GetterModeFile, GetterModeDir:\n\t\t// Ok\n\tdefault:\n\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"invalid artifact mode %q; must be one of: %s, %s, %s\",\n\t\t\tta.GetterMode, GetterModeAny, GetterModeFile, GetterModeDir))\n\t}\n\n\tescaped, err := escapingfs.PathEscapesAllocViaRelative(\"task\", ta.RelativeDest)\n\tif err != nil {\n\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"invalid destination path: %v\", err))\n\t} else if escaped {\n\t\tmErr.Errors = append(mErr.Errors, fmt.Errorf(\"destination escapes allocation directory\"))","sourceCodeStart":9901,"sourceCodeEnd":9937,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/structs.go#L9901-L9937","documentation":"TaskArtifact.Validate: the artifact's source getter string is empty. Every artifact block needs a source URL/path for the go-getter to fetch.","triggerScenarios":"Thrown at nomad/structs/structs.go:9919 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a source URL (file, http, git, s3, etc.) in the artifact block","Remove the artifact block if no artifact is needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}