{"id":13590311,"url":"https://github.com/jhump/protoreflect","last_synced_at":"2026-01-12T04:52:37.720Z","repository":{"id":37692407,"uuid":"81850273","full_name":"jhump/protoreflect","owner":"jhump","description":"Reflection (Rich Descriptors) for Go Protocol Buffers","archived":false,"fork":false,"pushed_at":"2025-10-20T17:47:17.000Z","size":4535,"stargazers_count":1458,"open_issues_count":15,"forks_count":179,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-10-20T19:30:54.182Z","etag":null,"topics":["go","golang","grpc","protobuf","protocol-buffers","reflection"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhump.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-02-13T17:11:38.000Z","updated_at":"2025-10-20T17:47:22.000Z","dependencies_parsed_at":"2023-10-11T04:54:58.076Z","dependency_job_id":"70efb82d-b612-448c-a9e3-2c03312419bf","html_url":"https://github.com/jhump/protoreflect","commit_stats":{"total_commits":514,"total_committers":40,"mean_commits":12.85,"dds":0.5116731517509727,"last_synced_commit":"2e9626be64b51a17286d7e9783e5aa546ecebf1d"},"previous_names":["jhump/grpcreflect"],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/jhump/protoreflect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhump%2Fprotoreflect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhump%2Fprotoreflect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhump%2Fprotoreflect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhump%2Fprotoreflect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhump","download_url":"https://codeload.github.com/jhump/protoreflect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhump%2Fprotoreflect/sbom","scorecard":{"id":519290,"data":{"date":"2025-08-11","repo":{"name":"github.com/jhump/protoreflect","commit":"170fc7af656126cb450190be2f9e43ab305e6f27"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":6,"reason":"dependency not pinned by hash detected -- score normalized to 6","details":["Warn: goCommand not pinned by hash: internal/testprotos/make_protos.sh:35","Info:   2 out of   3 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T02:34:02.410Z","repository_id":37692407,"created_at":"2025-08-20T02:34:02.410Z","updated_at":"2025-08-20T02:34:02.410Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28334970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","grpc","protobuf","protocol-buffers","reflection"],"created_at":"2024-08-01T16:00:43.366Z","updated_at":"2026-01-12T04:52:37.682Z","avatar_url":"https://github.com/jhump.png","language":"Go","funding_links":[],"categories":["Go","Language-Specific","Repositories"],"sub_categories":["Go"],"readme":"# Protocol Buffer and gRPC Reflection\n[![Build Status](https://circleci.com/gh/jhump/protoreflect/tree/v2.svg?style=svg)](https://circleci.com/gh/jhump/protoreflect/tree/v2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jhump/protoreflect)](https://goreportcard.com/report/github.com/jhump/protoreflect)\n\nThis repo builds on top of the reflection capabilities in the [Protobuf runtime for Go](https://pkg.go.dev/google.golang.org/protobuf/reflect/protoreflect)\nand also provides reflection APIs for [gRPC](https://grpc.io/) as well.\n\n[![GoDoc](https://pkg.go.dev/badge/github.com/jhump/protoreflect/v2.svg)](https://pkg.go.dev/github.com/jhump/protoreflect/v2)\n\n\u003e [!NOTE]\n\u003e Version 2.0.0 is still a work in progress. It is basically feature complete, but still needs more tests\n\u003e for the new functionality.\n\u003e\n\u003e You can try it out by getting a pre-release version:\n\u003e ```\n\u003e go get github.com/jhump/protoreflect/v2@v2.0.0-beta.2\n\u003e ```\n\u003e\n\u003e Note that the APIs may change a little bit between now and a final v2.0.0 release. Also note\n\u003e that some packages in v2 still need more tests, so you may find some bugs. But that should mostly\n\u003e be for new functionality. If you're just trying to update your code from v1 of this repo, those\n\u003e packages should be rock-solid and least likely to see any further API changes.\n\n----\n## Descriptors and Reflection Utilities\n\nThe [`protoreflect`](https://pkg.go.dev/google.golang.org/protobuf/reflect/protoreflect) package in\nthe Protobuf Go runtime provides the `Descriptor` interface and implementations of it that correspond\nto each of the descriptor types. These types are effectively smart wrappers around the generated Protobuf\ntypes in the [`descriptorpb`](https://pkg.go.dev/google.golang.org/protobuf/types/descriptorpb) package.\nThese wrappers make descriptors *much* more useful and easier to use.\n\nThis repo provides some additional packages for using and interacting with descriptors.\n\n```go\nimport \"github.com/jhump/protoreflect/v2/protoprint\"\n```\n\nThe `protoprint` package allows for printing of descriptors to `.proto` source files. This is\neffectively the inverse of a parser/compiler (such as the [`protocompile`](https://pkg.go.dev/github.com/bufbuild/protocompile)\npackage.) Combined with the `protobuilder` package, this is a useful tool for programmatically\ngenerating protocol buffer sources.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/protoprint)*\n\n```go\nimport \"github.com/jhump/protoreflect/v2/protobuilder\"\n```\n\nThe `protobuilder` package allows for programmatic construction of rich descriptors. Descriptors can\nbe constructed programmatically by creating trees of descriptor protos and using the [`protodesc`](https://pkg.go.dev/google.golang.org/protobuf/reflect/protodesc)\npackage to link those into rich descriptors. But constructing a valid tree of descriptor protos is far\nfrom trivial.\n\nSo this package provides generous API to greatly simplify that task. It also allows for converting\nrich descriptors into builders, which means you can programmatically modify/tweak existing\ndescriptors.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/protobuilder)*\n\n```go\nimport \"github.com/jhump/protoreflect/v2/protoresolve\"\n```\n\nThe `protoresolve` package provides named interfaces for many kinds of resolvers. It also provides\na `Resolver` interface that acts like a union of the various resolver interfaces and unifies both\n_descriptor_ resolvers and _type_ resolvers. The former returns descriptor instances; the latter\nreturns types (often implemented by the `dynamicpb` package). These interfaces provide a comprehensive\nset of types for resolving elements in Protobuf schemas and effectively _extend_ the APIs in\nthe [`protoregistry`](https://pkg.go.dev/google.golang.org/protobuf/reflect/protoregistry) package\nprovided by the Protobuf Go runtime.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/protoresolve)*\n\n```go\nimport \"github.com/jhump/protoreflect/v2/protomessage\"\n```\n\nThe `protomessage` package contains helpers for work with `proto.Message` instances from generic\nand/or dynamic code.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/protomessage)*\n\n```go\nimport \"github.com/jhump/protoreflect/v2/protodescs\"\n```\n\nThe `protodescs` package contains miscellaneous helpers for working with descriptors.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/protodescs)*\n\n----\n## Source Code Info\n\nGenerated Protobuf types in Go do not include \"source code information\". Source code information\nis data that comes from the original Protobuf source file that defined messages and includes things\nlike position information (i.e. the filename, line, and column on which a message, enum, or service\nwas defined) and comments.\n\nThis repo includes some APIs to help work with source code info and also a mechanism (and Proto plugin)\nfor restoring the source code information to the descriptors embedded in generated Go code.\n\n```go\nimport \"github.com/jhump/protoreflect/v2/sourceinfo\"\n```\n\nThe `sourceinfo` package contains APIs that for retrieving descriptors for generated types that include\nsource code info. When generating Go code, source code information is not preserved. But if you also\ngenerate code using the included `protoc-gen-gosrcinfo` plugin and query for the descriptors using this\npackage, you can access that information. The most immediate use of this information is to provide\ncomments for services, methods, and types to dynamic RPC clients that use the gRPC server reflection\nservice.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/sourceinfo)*\n\n```go\nimport \"github.com/jhump/protoreflect/v2/sourceloc\"\n```\n\nThe `sourceloc` package contains helpers for working with instances of `protoreflect.SourceLocation`\nand `protoreflect.SourcePath`.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/sourceloc)*\n\n----\n## Dynamic RPC Stubs\n\nThe [`dynamicpb`](https://pkg.go.dev/google.golang.org/protobuf/types/dynamicpb) package in the Protobuf\nGo runtime provides a dynamic message implementation. It implements `proto.Message` but is backed by a\nmessage descriptor and a map of fields-\u003evalues, instead of a generated struct. This is useful for acting\ngenerically with protocol buffer messages, without having to generate and link in Go code for every kind\nof message. This is particularly useful for general-purpose tools that need to operate on arbitrary\nProtobuf schemas. This is made possible by having the tools load descriptors at runtime.\n\nThis repo provides capabilities on top of `dynamicpb` to not only use message schemas dynamically but to\nalso use RPC schemas dynamically. This enables invoking RPCs without having any generated code for the\nRPC service to be used.\n\n```go\nimport \"github.com/jhump/protoreflect/v2/grpcdynamic\"\n```\n\nThe `grpcdynamic` package provides the dynamic stub implementation. The stub can be used to issue\nRPC methods using method descriptors instead of generated client interfaces.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/grpcdynamic)*\n\n----\n## gRPC Server Reflection\n\n```go\nimport \"github.com/jhump/protoreflect/v2/grpcreflect\"\n```\n\nThe `grpcreflect` package provides an easy-to-use client for the\n[gRPC reflection service](https://github.com/grpc/grpc-go/blob/6bd4f6eb1ea9d81d1209494242554dcde44429a4/reflection/grpc_reflection_v1alpha/reflection.proto#L36),\nmaking it much easier to query for and work with the schemas of remote services.\n\nIt also provides some helper methods for querying for rich service descriptors for the\nservices registered in a gRPC server.\n\n*[Read more ≫](https://pkg.go.dev/github.com/jhump/protoreflect/v2/grpcreflect)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhump%2Fprotoreflect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhump%2Fprotoreflect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhump%2Fprotoreflect/lists"}