{
  "schemaVersion": "ebb.rule.v1",
  "id": "go.module.github.com.golang.protobuf.deprecated",
  "ecosystem": "go",
  "purl": "pkg:golang/github.com/golang/protobuf",
  "affectedVersions": "vers:golang/*",
  "event": "deprecated",
  "severity": "medium",
  "title": "github.com/golang/protobuf is deprecated",
  "summary": "The latest github.com/golang/protobuf module declares: \"Use the \"google.golang.org/protobuf\" module instead.\"",
  "replacement": "google.golang.org/protobuf",
  "sources": [
    {
      "title": "github.com/golang/protobuf v1.5.4 go.mod",
      "url": "https://proxy.golang.org/github.com/golang/protobuf/@v/v1.5.4.mod",
      "accessedAt": "2026-10-20"
    },
    {
      "title": "Go module deprecation reference",
      "url": "https://go.dev/ref/mod#go-mod-file-module-deprecation",
      "accessedAt": "2026-10-20"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-20",
    "reviewedAt": "2026-10-20",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Keep go.mod and go.sum consistent: after the change no package should still require github.com/golang/protobuf, directly or through a replace directive.",
      "Check google.golang.org/protobuf for API differences before switching; it may not be a drop-in replacement for every github.com/golang/protobuf call."
    ],
    "steps": [
      {
        "id": "replace-module-dependency",
        "title": "Replace the deprecated module",
        "instructions": "Replace the github.com/golang/protobuf requirement with google.golang.org/protobuf (`go get google.golang.org/protobuf@latest`), then run `go mod tidy`.",
        "targets": "declaration"
      },
      {
        "id": "migrate-module-usages",
        "title": "Migrate imports and calls",
        "instructions": "Update imports and calls of github.com/golang/protobuf in the reported files to google.golang.org/protobuf.",
        "targets": "usages"
      }
    ],
    "verification": [
      {
        "command": "go build ./... && go test ./...",
        "purpose": "Build and test every package without the deprecated module."
      },
      {
        "command": "go mod tidy && git diff --exit-code go.mod go.sum",
        "purpose": "Confirm go.mod and go.sum are tidy after the replacement."
      }
    ]
  }
}
