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
@@ -851,6 +851,12 @@ if(RAD_PYTHON3 AND EXISTS ${CMAKE_SOURCE_DIR}/dashboard/package.json)
|
||||
LABELS "fast;unit"
|
||||
TIMEOUT ${RAD_TEST_TIMEOUT})
|
||||
endif()
|
||||
# The header's digest proves sources and its own claim agree, nothing more: it cannot catch a
|
||||
# tamper of the committed served bytes that rewrites that digest to match. This hashes the
|
||||
# artifacts themselves from outside, so tampering with one alone fails.
|
||||
add_test(NAME artifact_sums
|
||||
COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/artifact_sums.sh ${CMAKE_SOURCE_DIR})
|
||||
set_tests_properties(artifact_sums PROPERTIES LABELS "fast;unit" TIMEOUT 120)
|
||||
if(RAD_PYTHON3)
|
||||
add_test(NAME rad_export_test COMMAND ${RAD_PYTHON3} ${CMAKE_CURRENT_SOURCE_DIR}/rad_export_test.py)
|
||||
set_tests_properties(rad_export_test PROPERTIES LABELS "unit;fast" TIMEOUT ${RAD_TEST_TIMEOUT})
|
||||
|
||||
Reference in new issue
Block a user