Archived
tests: the served dashboard bytes get hashed from outside
dashboard_page.h is the Node build of dashboard/, committed because the engine's build has no Node. The ctest dashboard_page compares dashboard/'s sources against the digest recorded INSIDE that header -- which proves the sources and the header's own claim agree, nothing more. Rewrite the header and its embedded digest together and the check passes while the engine serves a page nobody built from these sources. artifact_sums.sh hashes the artifact itself from outside, the mechanical half vendor/SHA256SUMS is to vendor/UPSTREAM: tests/ARTIFACTS names every committed built artifact and its hash, and a lone tamper of a served byte now fails. A rebuild re-records the manifest in the same commit. The residual gap -- a single commit rewriting an artifact AND the manifest -- is exactly the vendor-tree gap, and documented as such.
This commit is contained in:
1 parent
70be48c6fa
commit
4c9a79ca98
4 files changed
+39
No files matched your search
@@ -10,6 +10,11 @@ committed as core/server/dashboard_page.h and this keeps the two together:
|
||||
dashboard/THIRD-PARTY-LICENSES.txt (`npm run embed` in dashboard/ builds and writes)
|
||||
check exits 1 if dashboard/'s sources no longer have the recorded digest: someone changed the
|
||||
page's source and did not rebuild the header (the ctest `dashboard_page`)
|
||||
|
||||
The digest lives inside the header and only proves sources and claim agree; the served bytes are
|
||||
hashed from outside by tests/ARTIFACTS (the ctest `artifact_sums`), so tampering with the header
|
||||
alone fails. After a real rebuild, re-record both in the same commit:
|
||||
sha256sum $(awk '{print $2}' tests/ARTIFACTS) > tests/ARTIFACTS
|
||||
"""
|
||||
import hashlib, os, sys
|
||||
|
||||
|
||||
Reference in new issue
Block a user