Commit 882d29e
release: harden supply chain with CGO=0, SLSA provenance, cosign (#250)
* release: harden supply chain with CGO=0, SLSA provenance, cosign
- Pin CGO_ENABLED=0 on the build matrix so the native
linux/amd64 binary stays statically linked. Cross-compiles
already auto-disable CGO; the native build would otherwise
link glibc-resolved net/os-user resolvers and break the
manylinux_2_17 wheel and the @mdsmith/linux-x64 npm package
on Alpine/musl and old-glibc systems.
- Generate SLSA build provenance attestations for the 5
binaries and the .vsix via actions/attest-build-provenance.
Verifiable with `gh attestation verify <file> -R jeduden/mdsmith`.
- Sign checksums.txt with cosign keyless (Sigstore + GitHub OIDC).
Defeats the case where an attacker who rewrites the binary
on the release page also rewrites checksums.txt; forging a
matching signature would require compromising release.yml.
- Document both verification paths in docs/guides/install.md.
* release: address Copilot review on CGO comment + asset filename
- Reword the CGO_ENABLED=0 comment to describe the
concrete portability goal (avoid glibc-resolved
net/os/user on linux/amd64) rather than overstating
it as full static linking, which doesn't apply on
macOS (libSystem) or Windows (kernel32).
- Download the binary under its release-asset name
(mdsmith-linux-amd64) so both `sha256sum -c` (which
matches the local filename against the entry in
checksums.txt) and `gh attestation verify` (which
needs the attested asset name) work without
renaming. install -m 0755 still places the binary
on $PATH as mdsmith, leaving the source file in
place for the cosign verify step that follows.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent fd54c7e commit 882d29e
2 files changed
Lines changed: 95 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
| |||
278 | 289 | | |
279 | 290 | | |
280 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
281 | 298 | | |
282 | 299 | | |
| 300 | + | |
| 301 | + | |
283 | 302 | | |
284 | 303 | | |
285 | 304 | | |
286 | 305 | | |
287 | 306 | | |
288 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
289 | 342 | | |
290 | 343 | | |
291 | 344 | | |
| |||
295 | 348 | | |
296 | 349 | | |
297 | 350 | | |
| 351 | + | |
| 352 | + | |
298 | 353 | | |
299 | 354 | | |
300 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
| 133 | + | |
| 134 | + | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
139 | 176 | | |
140 | 177 | | |
141 | 178 | | |
| |||
0 commit comments