-
Notifications
You must be signed in to change notification settings - Fork 277
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
Fix b5 digest calculation for remote modules #3190
base: main
Are you sure you want to change the base?
Conversation
See the comment in `added_module.go` for details. A minimal repro can be found [here](TODO).
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me. Good catch and thanks for updating the comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm extremely uncomfortable with this solution, and it's going to require some deep in-person conversations to resolve. Overall concerns:
- For remote modules, we're just completely bypassing any local calculation of what the digest is, based on how we expect digests to be calculated, and relying on the remote calculation. This feels subtly iffy in a few ways.
- I'm not confident that tamper-proofing will actually occur after this is done - I would need to spend more time on this, but while it "happens at the ModuleData" level, I don't understand why we can effecvtively do the old calculation method at the ModuleData level with no issue, but we need to do this bypass at the Module level.
With more time, I could parse this out, but it's not clear to me, and I'm concerned that this is going to introduce a nasty long-term bug. Let's talk about this next week.
See the comment in
added_module.go
for details.