Repository navigation
Let a plugin pin its own plugin SDK - #415
Merged
Merged
Conversation
A plugin that needs a newer SDK than the repository pin can carry vendor/get-bb-plugin-sdk-<version>.tgz and vendor/sdk-provenance.json. check-repository verifies that archive's sha256 and the plugin's SDK floor against its own pin; artifact validation checks the floor the same way. Plugins without a pin keep the shared SDK and builder. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
A plugin's vendor/sdk-provenance.json could vouch for any archive it shipped, because the expected hash lived next to the archive. Pins are now valid only for SDK versions listed in tooling/vendor/plugin-sdk-pins.json, and the pinned archive must match that entry's npm registry integrity byte for byte. Co-Authored-By: Claude Opus 5.5 <[email protected]>
brsbl
marked this pull request as ready for review
October 12, 2026 21:32
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.
What was wrong
This repo requires every plugin to build against one shared plugin SDK, currently 0.5.9. A plugin that needs newer SDK APIs, such as Playgrounds on 0.6.37, can't pass the repo check. Raising the shared pin breaks 13 plugins whose composer APIs SDK 0.6 no longer exports.
What changed
vendor/get-bb-plugin-sdk-<version>.tgzandvendor/sdk-provenance.json.pluginSdkForintooling/plugin-sdk-provenance.mjsreads that record, or falls back to the shared pin.tooling/vendor/plugin-sdk-pins.json, which records that version's npm registry integrity. A plugin's ownsdk-provenance.jsoncan't vouch for itself: it must match that entry, and the archive must be the npm-published tarball byte for byte. 0.6.37 is the first entry.check-repository: for a pinned plugin, it requires the dependencyfile:./vendor/<archive>and checks the archive's sha256 against the record and its sha512 against the allowlisted npm integrity. It checks the plugin'sengines.bbPluginSdkfloor against that plugin's own pin.validate-plugin-artifacts: checks the floor the same way. Artifact metadata still records the shared builder's SDK.This is the bottom of the Playgrounds stack. #405 is the first plugin to use it.
How you verified
8f0c2f2b1. It found one P1: the pin's hash was only compared against a value in the same plugin folder. The allowlist above fixes it. Checked against the real 0.6.37 archive from Add Playgrounds #405: the archive matches its npm integrity, and a record with a forged integrity is rejected.Follow-ups (P2, not in this PR)
pluginSdkFortreats every read error as "no pin". Only a missing file should mean no pin.publish-install-refsrelease provenance should record a pinned plugin's own SDK.tooling/README.mdthat the builder and app exports still follow the shared SDK.BB-Thread: Interactive Answers as a built-in plugin
🤖 Generated with Claude Code