Repository navigation
Test the pgstencil provenance gate before a Hosted production deploy - #1489
Merged
Merged
Conversation
security-hosted.md names production.test.mjs as pinning the provenance check before a production deploy, but no test called verifyPackages. Inject the provenance reader and cover each refusal: a malformed or uppercase commit, a missing commit, a dirty build, and packages built from different commits. Co-Authored-By: Claude <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
309d134
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://76fb5cc7.mouseterm.pages.dev |
| Branch Preview URL: | https://test-verify-packages-provena.mouseterm.pages.dev |
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.
docs/specs/security-hosted.md→ "Deployment boundary" nameshosted/scripts/production.test.mjsas pinning the check that a production deploy runs only clean pgstencil builds, but no test calledverifyPackages. Removing any of its three assertions (40-hex commit, notdirty, one commit across all three packages) left CI green. That function gates theverifyjob in.github/workflows/hosted-production.yml, whichdeployneeds.verifyPackagesnow takes an optional provenance reader. The default is the old behaviour: readprovenance.jsonbeside each package's resolved entrypoint. The new test covers the accepted case and each refusal: a short commit, an uppercase commit, a missing commit, a dirty build, and packages built from different commits. The format cases apply to all three packages so the same-commit check can't mask them.Verification: with each assertion removed in turn, and with the hex check widened to uppercase, the new test fails; with the code as it is, it passes. The rest of
production.test.mjspasses on Node 24. The defaultverifyPackages()passes against the locally installed packages.