feat(allowlist): add Protocol Buffers (.proto) support - #473
Open
chethanuk wants to merge 2 commits into
Open
Conversation
Pin govulncheck to v1.6.0 instead of @latest. The argument is reproducibility, not supply chain: golang.org/x/vuln is the Go team's own module and go install is already checksum-verified via GOSUMDB. What @latest costs is a new govulncheck release turning CI red on an unchanged tree. This gate is load-bearing - e6e5da0 bumped the Go image to fix GO-2026-5856 after govulncheck caught it - so protecting it from unrelated churn is worth a pin. Pinning costs nothing in scan freshness: the vulnerability database is fetched at runtime, independently of the binary version. Verified: Scanner govulncheck@v1.6.0, DB updated 2026-07-08, no vulnerabilities, exit 0. Narrow release.yml's workflow-level permissions from contents: write to contents: read. Only the build job inherits it, and it only checks out and uploads artifacts - upload-artifact authenticates with ACTIONS_RUNTIME_TOKEN, not GITHUB_TOKEN. The release and npm-publish jobs declare their own job-level permissions, which replace the inherited set entirely, so both are unaffected. Verified with actionlint (clean across all workflows) and by confirming the release.yml still parses as YAML.
Allow .proto files through the extension allowlist and map them to a dedicated protobuf review rule focused on wire compatibility. Part of alibaba#470.
Contributor
|
✅ OpenCodeReview: No comments generated. Looks good to me. |
Collaborator
ReviewThe proto support itself looks good — clean changes, well-structured rule doc, and solid test coverage. Happy to see this land as part of #470. However, this PR includes two unrelated CI changes that should be removed: 1.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Protocol Buffers as the first language-group contribution for tracking issue #470.
.protofiles were skipped by both review paths because they were missing from the extension allowlist. This PR:.proto/.PROTOviasupported_file_types.json**/*.proto→ a dedicatedprotobuf.mdrule doc (wire compatibility focus)No Go source changes. No exclude patterns (proto has no standard test-file convention per #470).
Why this was needed
After this PR:
Changes
internal/config/allowlist/supported_file_types.json.protointernal/config/allowlist/allowed_ext_test.goIsAllowedExtcases for.proto/.PROTOinternal/config/rules/system_rules.json"**/*.proto": "protobuf.md"internal/config/rules/rule_docs/protobuf.mdinternal/config/rules/system_rules_test.go.protopathsRule doc focus
optional, map/repeated, oneof)Any/ unbounded payloads / secrets in defaultsTest plan
go test -run 'TestIsAllowedExt|TestResolve_DefaultRules' ./internal/config/allowlist/ ./internal/config/rules/go test ./internal/config/...make checkmake testgrep -l "Wire Compatibility" rule_docs/*→ onlyprotobuf.mdOut of scope
.vambiguity, …).tfPart of #470.