{"record":{"id":"6731f8f041f98edc","repo":"hashicorp/nomad","slug":"unsupported-checksum-type-s","errorCode":null,"errorMessage":"unsupported checksum type: %s","messagePattern":"unsupported checksum type: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/structs.go","lineNumber":10001,"sourceCode":"\n\texpectedLength := 0\n\tswitch checksumType {\n\tcase \"md5\":\n\t\tif fips140.Enabled() {\n\t\t\treturn fmt.Errorf(\"md5 checksums are not supported in FIPS-140 mode\")\n\t\t}\n\t\texpectedLength = md5.Size\n\tcase \"sha1\":\n\t\tif fips140.Enabled() {\n\t\t\treturn fmt.Errorf(\"sha1 checksums are not supported in FIPS-140 mode\")\n\t\t}\n\t\texpectedLength = sha1.Size\n\tcase \"sha256\":\n\t\texpectedLength = sha256.Size\n\tcase \"sha512\":\n\t\texpectedLength = sha512.Size\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported checksum type: %s\", checksumType)\n\t}\n\n\tif len(checksumBytes) != expectedLength {\n\t\treturn fmt.Errorf(\"invalid %s checksum: %v\", checksumType, checksumVal)\n\t}\n\n\treturn nil\n}\n\nconst (\n\tConstraintDistinctProperty  = \"distinct_property\"\n\tConstraintDistinctHosts     = \"distinct_hosts\"\n\tConstraintRegex             = \"regexp\"\n\tConstraintVersion           = \"version\"\n\tConstraintSemver            = \"semver\"\n\tConstraintSetContains       = \"set_contains\"\n\tConstraintSetContainsAll    = \"set_contains_all\"\n\tConstraintSetContainsAny    = \"set_contains_any\"","sourceCodeStart":9983,"sourceCodeEnd":10019,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/structs.go#L9983-L10019","documentation":"Artifact checksum validation error: the checksum prefix before the ':' is not one of the recognized types (md5, sha1, sha256, sha512, file). Nomad cannot pick a digest length or verifier for an unknown algorithm name.","triggerScenarios":"checksum = \"sha384:<hex>\", \"crc32:...\", \"blake2:...\", or a misspelled type like \"sha265:<hex>\" in an artifact block.","commonSituations":"Typo'd algorithm names; algorithms supported by other tools (sha384, blake3) assumed supported here; copy-paste from docs of a different product.","solutions":["Use a supported type: md5, sha1, sha256, or sha512 (prefer sha256).","Fix typos such as 'sha265' -> 'sha256'.","Use checksum = \"file:<url>\" if the remote side provides a checksum file go-getter can consume."],"exampleFix":"// before\nchecksum = \"sha384:abcd...\"\n// after\nchecksum = \"sha256:abcd...\"","handlingStrategy":"validation","validationCode":"var validTypes = map[string]bool{\"md5\":true,\"sha1\":true,\"sha256\":true,\"sha512\":true,\"file\":true}\ntype := strings.SplitN(checksum, \":\", 2)[0]\nif !validTypes[type] { return fmt.Errorf(\"unsupported checksum type %q\", type) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a canonical list of supported types in your job templating code","Spell-check algorithm names; watch for sha265-style typos","Prefer sha256 by convention"],"tags":["nomad","checksum","validation","artifact"],"backgroundTag":"invalid-checksum-format","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"}