Repository navigation
Commit 2808e2b
fix: build releases on a BuildKit that honours rewrite-timestamp
The docker driver bundled with dockerd accepts the exporter's
rewrite-timestamp option and then ignores it: layer mtimes keep the build
clock, so two builds of one revision produce different images and
different measurements. It still normalises the image config's created
field, which is the only thing the old guard compared, so the check
passed and unreproducible releases shipped anyway.
Three builds of 96e1c23 demonstrate it -- CI attempt 1 measured PCR0
41459ff7, attempt 2 measured 98c3915c, and a local rebuild measured
f8abaf0f. Only a docker-container BuildKit honours the option, so the
release now runs on one and refuses to build otherwise.
Replace the created-only guard with a real one: build the enclave image
twice and require both to be identical. A normalised created field is not
evidence that the layers were normalised, and the manifest's
reproducibility claim should be tested by the release that makes it
rather than merely asserted.
verify-build.sh gets the same driver check. Without it a verifier on the
docker driver sees a mismatch against an honest release, which reads as
an accusation that the published measurements are dishonest.
Both scripts now build the nitro-cli image with buildx --load: a
docker-container builder leaves results in the build cache, so
build-enclave would either fail on a clean machine or silently reuse a
stale image of the same tag.
Verified locally: verify-build.sh now reports PASS against a manifest
produced by the fixed release path, and both scripts refuse to run on the
docker driver.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 96e1c23 commit 2808e2b
3 files changed
Lines changed: 70 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
105 | 112 | | |
106 | 113 | | |
107 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
101 | 119 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 120 | | |
106 | 121 | | |
107 | 122 | | |
| |||
111 | 126 | | |
112 | 127 | | |
113 | 128 | | |
114 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
115 | 148 | | |
116 | 149 | | |
117 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
| |||
124 | 137 | | |
125 | 138 | | |
126 | 139 | | |
127 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
128 | 143 | | |
129 | 144 | | |
130 | 145 | | |
| |||
0 commit comments