Skip to content

Add bufcheck support for remote policies #3934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

emcfarlane
Copy link
Contributor

@emcfarlane emcfarlane commented Jul 23, 2025

This PR adds support to bufcheck.Clients to invoke remote Policies with remote Plugins. Remote Policies are pulled from a registry and stored locally in the buf cache. Remote plugins are supported for both Local and Remote Policies. These are resolved through the policy's plugin providers (see the buf.lock file changes).

Invoking a remote policy will show the PolicyRef, and the PluginRef if a custom plugin, per each lint annotation. For example with a remote policy that enforces a custom plugin:

$ buf lint
local.proto:9:1:Service name "acme.v1.example.LibraryServiceTest" has banned suffix "Test". (buf.build/acme/buf-plugin-suffix, buf.build/acme/buf-policy-suffix:v1)

Policies that invoke just a built-in rule do not have a plugin reference (buf.build/acme/buf-policy-suffix:v1)

@emcfarlane emcfarlane requested a review from doriable July 23, 2025 14:21
Copy link
Contributor

github-actions bot commented Jul 23, 2025

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJul 23, 2025, 2:41 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant