{"record":{"id":"218f9824f25265fd","repo":"goreleaser/goreleaser","slug":"dockers-v2-sbom-w","errorCode":null,"errorMessage":"dockers_v2.sbom: %w","messagePattern":"dockers_v2\\.sbom: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pipe/docker/v2/docker.go","lineNumber":183,"sourceCode":"\treturn g.Wait()\n}\n\n// Publish implements publish.Publisher.\nfunc (p Publish) Publish(ctx *context.Context) error {\n\tenabled, err := anyEnabled(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !enabled {\n\t\treturn pipe.Skip(\"configuration is disabled\")\n\t}\n\tcheckBuildxDriver(ctx)\n\tg := semerrgroup.NewSkipAware(semerrgroup.New(ctx.Parallelism))\n\tfor _, d := range ctx.Config.DockersV2 {\n\t\tg.Go(func() error {\n\t\t\textraArgs, err := p.extraArgs(ctx, d)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"dockers_v2.sbom: %w\", err)\n\t\t\t}\n\t\t\treturn buildImage(ctx, d, extraArgs...)\n\t\t})\n\t}\n\terr = g.Wait()\n\t// reports whatever was actually pushed, even if another configuration was\n\t// skipped or failed.\n\tfor _, img := range ctx.Artifacts.Filter(artifact.ByType(artifact.DockerImageV2)).List() {\n\t\tsummary.Appendf(\"Pushed Docker image `%s`\", img.Name)\n\t}\n\treturn err\n}\n\nfunc (Publish) extraArgs(ctx *context.Context, d config.DockerV2) ([]string, error) {\n\tsbom, err := tmpl.New(ctx).Bool(d.SBOM)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"dockers_v2.sbom: %w\", err)\n\t}","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/goreleaser/goreleaser/blob/f5edd7395693c0c6b501dc722d445d2e86af854d/internal/pipe/docker/v2/docker.go#L165-L201","documentation":"In the dockers_v2 Run/SBOM step, each DockersV2 config is processed in parallel; before building, p.extraArgs resolves configured SBOM/extra flag options. This error wraps a failure of extraArgs for the dockers_v2.sbom path, meaning the SBOM-related configuration could not be resolved (e.g. SBOM tool unsupported or bad options) and the image build for that config is skipped/failed with the `dockers_v2.sbom:` prefix.","triggerScenarios":"A DockersV2 entry with sbom configuration whose options extraArgs cannot resolve — invalid sbom setting or arguments rejected by the pipe's validation — inside the parallel semerrgroup during Run.","commonSituations":"Misconfigured dockers_v2.sbom blocks (unknown tool names/flags), configs copied from the v1 dockers pipe that aren't valid for dockers_v2, or environment lacking the SBOM tooling the option requires.","solutions":["Read the wrapped inner error after the `dockers_v2.sbom:` prefix for the exact cause.","Fix the dockers_v2 sbom configuration to use options supported by dockers_v2 (not the legacy dockers pipe syntax).","Validate with `goreleaser check` and test with `goreleaser build --snapshot` before a release."],"exampleFix":"// before\ndockers_v2:\n  - sbom: true\n// after\ndockers_v2:\n  - sbom:\n      artifacts: image","handlingStrategy":"validation","validationCode":"for _, d := range cfg.DockersV2 {\n    if err := validateV2SbomConfig(d.Sbom); err != nil {\n        return fmt.Errorf(\"dockers_v2.sbom misconfigured: %w\", err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := release(); err != nil {\n    if strings.Contains(err.Error(), \"dockers_v2.sbom:\") {\n        // inspect wrapped cause and fix the sbom block\n    }\n}","preventionTips":["Use dockers_v2's own sbom schema, not the legacy dockers pipe options","Run `goreleaser check` to validate config schema","Test snapshot builds with the same sbom settings before releasing"],"tags":["docker","sbom","configuration"],"backgroundTag":"invalid-config-value","analyzedSha":"f5edd7395693c0c6b501dc722d445d2e86af854d","analyzedAt":"2026-09-05T09:57:18.807Z","contentChangedAt":"2026-09-05T09:57:18.807Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}