Repository navigation
feat: build manifests, dg verify-app, and a notice on unpublished builds - #374
Merged
Merged
Conversation
Every build now writes forge-manifest.json: each file it made with its SHA-256, plus its commit, network and variant. The Pages deploy attests the manifest's digest with a GitHub build-provenance attestation, and each release publishes the IPFS build's manifest as forge-web-<version>.manifest.json, in SHA256SUMS and so under the release attestation. Both IPFS builds must produce the same manifest. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
dg verify-app <url> reads the site's forge-manifest.json, trusts it only when this repository's CI attested it on GitHub (or when --manifest names one you got yourself, such as a release's from dg release download), then fetches and hashes every file it lists. A missing or changed file, or an unpublished manifest, fails with E504. The nightly workflow runs it against forge.dashhq.org. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…uild Where a private repository's key is unlocked (a locked private repo, Settings → Private repos), the app looks up its own manifest's attestation and, when GitHub has none, notes that this copy isn't a published build and could read what is unlocked, with a link to the verify guide. Nothing shows while checking or when the check cannot run. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (18)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review fixes. The Pages build runs third-party npm code, so it now holds no deploy or attestation permission: a separate job, master only, attests the manifest it uploads. dg verify-app asks for files as a browser does, so content injected only for browsers is caught; --commit requires the build you expect, since any published build passes otherwise; a fetch failure is E504 like the rest of the check; --json says whether --manifest was a file or a URL. The nightly check retries once after a deploy's propagation window. The web check asks again after an unknown result, and both reuse existing SHA-256 and GitHub API helpers. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Owner
Author
|
@coderabbitai review 🤖 Posted autonomously by Claude on behalf of pasta. |
|
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
App integrity for the hosted web app:
pnpm buildandpnpm build:ipfsnow writeforge-manifest.json: every file of the build with its SHA-256, plus the commit, network and variant. The site serves it at its root.actions/attest-build-provenance).forge-web-<version>.manifest.json. It is listed inSHA256SUMS, so the release attestation covers it. The two IPFS builds must produce the same manifest.dg verify-app <url>fetches the site's manifest. It trusts the manifest only when GitHub holds an attestation of it from this repository's CI, or when--manifest <file|url>gives one you got yourself, such as a release's fromdg release download. It then fetches and hashes every listed file. An unpublished manifest, or a missing or changed file, fails with E504, and each failing file is named.--jsonis supported. The nightly workflow runs it against forge.dashhq.org.Why
Roadmap E7 / TS-12. A bad deploy, or a compromised host or DNS, is the undefended way to read private repos. Until now, checking a deployed copy meant rebuilding it by hand.
How
forge-web/scripts/build-manifest.mjswrites the manifest deterministically (sorted, no times), so the IPFS CID stays reproducible.ipfs-release.shextracts it next to the CAR.crates/dg/src/verify_app.rs: looks up the manifest throughGET /repos/PastaPastaPasta/dash-forge/attestations/sha256:<digest>, honouringGITHUB_TOKEN/GH_TOKEN. File paths are percent-encoded, and 12 files are fetched at once.forge-web/lib/build-check.tsmakes the same lookup from the browser (api.github.com allows CORS) once per page load.BuildIntegrityNoticerenders the result.docs/guides/verify-the-app.md(new "Check a deployed copy" section, the release asset table, the maintainer's Forge release command) anddocs/errors.md(E504).How tested
cargo fmt --check,clippy --workspace --all-targets -D warnings,cargo test --workspace. New tests: the comparison, path encoding and manifest format.tsc,eslint --max-warnings=0,vitest(5654 passed). New tests: the build manifest, and the attestation check's published, unpublished and unknown outcomes and site root.out/, then:dg verify-app http://127.0.0.1:8765 --manifest out/forge-manifest.jsonmatched 174 of 174 files;index.htmlit reporteddiffers: index.htmland exited 5 with E504;--manifestit reported "the site's build is not a published one", because GitHub has no attestation for a local build.4cakPSW…) against the local unattested build, in dark, light and 390 px. axe found no violations.Evidence:
/Users/pasta/workspace/dash-forge-qa/evidence/p0/integrity-dx/e7-notice/(01 dark, 04 light, 07 mobile, axe-*.json).Limits
gh attestation verifydoes, and both the output and the guide name it.docs/hosting.md).🤖 Generated with Claude Code