@kungfu-tech/buildchain 3.0.2-alpha.3 → 3.0.2-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/actions/github-artifact-attestation/README.md +10 -0
- package/actions/promote-buildchain-ref/README.md +7 -0
- package/bin/buildchain.mjs +5 -0
- package/bin/internal/trust-release-cli.mjs +74 -3
- package/dist/site/artifact-schemas.json +5 -1
- package/dist/site/buildchain-contract.json +79 -28
- package/dist/site/buildchain-site.json +110 -27
- package/dist/site/capability-registry.json +8 -7
- package/dist/site/cli-registry.json +12 -0
- package/dist/site/controller-registry.json +40 -4
- package/dist/site/kfd-claims.json +203 -18
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +19 -5
- package/dist/site/node-api-registry.json +23 -10
- package/dist/site/page-registry.json +91 -17
- package/dist/site/public-surface-audit.json +125 -15
- package/dist/site/publication-authority-registry.json +27 -2
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-model.json +2 -1
- package/dist/site/release-passport-check-manifest.json +1 -0
- package/dist/site/release-provenance.json +1 -0
- package/dist/site/schemas/release-passport-v1.schema.json +6 -0
- package/dist/site/site-manifest.json +17 -9
- package/dist/site/workflow-registry.json +84 -7
- package/docs/MAP.md +3 -1
- package/docs/binary-distribution.md +7 -0
- package/docs/cli.md +9 -0
- package/docs/dev-alpha-candidate-patrol.md +16 -4
- package/docs/github-artifact-attestation.md +219 -0
- package/docs/release-passport.md +13 -0
- package/docs/reusable-build-surface.md +6 -0
- package/package.json +2 -1
- package/packages/core/buildchain-contract.js +6 -0
- package/packages/core/buildchain-kfd-claims.js +5 -0
- package/packages/core/buildchain-publication-authority.js +1 -0
- package/packages/core/channel-candidate.js +67 -16
- package/packages/core/github-artifact-attestation.js +642 -0
- package/packages/core/index.js +19 -0
- package/packages/core/publication-authority.js +1 -1
- package/packages/core/release-passport-contract.js +2 -0
- package/packages/core/release-passport.js +51 -0
- package/scripts/check-inventory.mjs +4 -0
- package/scripts/create-github-artifact-attestation-policy.mjs +62 -0
- package/scripts/dev-alpha-candidate-patrol.mjs +256 -46
- package/scripts/generate-site-bundle.mjs +12 -0
- package/scripts/publish-github-artifact-attestation-evidence.mjs +201 -0
- package/scripts/release-candidate-resolver.mjs +12 -0
- package/scripts/stage-github-artifact-attestation-inputs.mjs +65 -0
|
@@ -111,6 +111,9 @@
|
|
|
111
111
|
"expected-artifacts-json",
|
|
112
112
|
"fail-fast",
|
|
113
113
|
"gate-profile-aggregate-json",
|
|
114
|
+
"github-artifact-attestation-platform-id",
|
|
115
|
+
"github-artifact-attestation-signer-sha",
|
|
116
|
+
"github-artifact-attestation-subject-path",
|
|
114
117
|
"install-command",
|
|
115
118
|
"kfd-agent-hub",
|
|
116
119
|
"lifecycle-timeout-minutes",
|
|
@@ -144,7 +147,7 @@
|
|
|
144
147
|
"verify-command",
|
|
145
148
|
"working-directory"
|
|
146
149
|
],
|
|
147
|
-
"inputCount":
|
|
150
|
+
"inputCount": 72,
|
|
148
151
|
"secrets": [
|
|
149
152
|
"BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
|
|
150
153
|
"BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
|
|
@@ -355,6 +358,9 @@
|
|
|
355
358
|
"buildchain-repository",
|
|
356
359
|
"channel",
|
|
357
360
|
"dry-run",
|
|
361
|
+
"github-artifact-attestation-environment",
|
|
362
|
+
"github-artifact-attestation-policy-json",
|
|
363
|
+
"github-artifact-attestation-retention-days",
|
|
358
364
|
"github-governance-receipt-json",
|
|
359
365
|
"github-release",
|
|
360
366
|
"github-release-notes",
|
|
@@ -428,7 +434,7 @@
|
|
|
428
434
|
"target-sha",
|
|
429
435
|
"trusted-publishing"
|
|
430
436
|
],
|
|
431
|
-
"inputCount":
|
|
437
|
+
"inputCount": 88,
|
|
432
438
|
"secrets": [
|
|
433
439
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
434
440
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -451,6 +457,10 @@
|
|
|
451
457
|
"controller-receipt-digest",
|
|
452
458
|
"controller-receipt-json",
|
|
453
459
|
"controller-receipt-status",
|
|
460
|
+
"github-artifact-attestation-evidence-root",
|
|
461
|
+
"github-artifact-attestation-id",
|
|
462
|
+
"github-artifact-attestation-publication-receipt-digest",
|
|
463
|
+
"github-artifact-attestation-url",
|
|
454
464
|
"promoted-sha",
|
|
455
465
|
"publication-capability-digest",
|
|
456
466
|
"publication-commit-evidence-digest",
|
|
@@ -459,7 +469,7 @@
|
|
|
459
469
|
"publication-commit-url",
|
|
460
470
|
"release-candidate-artifact"
|
|
461
471
|
],
|
|
462
|
-
"outputCount":
|
|
472
|
+
"outputCount": 19,
|
|
463
473
|
"surface": "reusable-workflow",
|
|
464
474
|
"capabilityGroup": "api-cli-reference",
|
|
465
475
|
"status": "active"
|
|
@@ -935,6 +945,9 @@
|
|
|
935
945
|
"expected-artifacts-json",
|
|
936
946
|
"fail-fast",
|
|
937
947
|
"gate-profile-aggregate-json",
|
|
948
|
+
"github-artifact-attestation-platform-id",
|
|
949
|
+
"github-artifact-attestation-signer-sha",
|
|
950
|
+
"github-artifact-attestation-subject-path",
|
|
938
951
|
"install-command",
|
|
939
952
|
"kfd-agent-hub",
|
|
940
953
|
"lifecycle-timeout-minutes",
|
|
@@ -968,7 +981,7 @@
|
|
|
968
981
|
"verify-command",
|
|
969
982
|
"working-directory"
|
|
970
983
|
],
|
|
971
|
-
"inputCount":
|
|
984
|
+
"inputCount": 75,
|
|
972
985
|
"secrets": [
|
|
973
986
|
"BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
|
|
974
987
|
"BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
|
|
@@ -1296,6 +1309,40 @@
|
|
|
1296
1309
|
"capabilityGroup": "governance-versioning",
|
|
1297
1310
|
"status": "active"
|
|
1298
1311
|
},
|
|
1312
|
+
{
|
|
1313
|
+
"id": "github-artifact-attestation",
|
|
1314
|
+
"path": ".github/workflows/github-artifact-attestation.yml",
|
|
1315
|
+
"reusable": true,
|
|
1316
|
+
"inputs": [
|
|
1317
|
+
"buildchain-ref",
|
|
1318
|
+
"environment",
|
|
1319
|
+
"evidence-artifact-name",
|
|
1320
|
+
"evidence-run-id",
|
|
1321
|
+
"platform-manifest-artifact-name",
|
|
1322
|
+
"platform-manifest-relative-path",
|
|
1323
|
+
"policy-json",
|
|
1324
|
+
"release-passport-artifact-name",
|
|
1325
|
+
"release-passport-relative-path",
|
|
1326
|
+
"retention-days",
|
|
1327
|
+
"source-sha",
|
|
1328
|
+
"subject-artifact-name",
|
|
1329
|
+
"subject-relative-path"
|
|
1330
|
+
],
|
|
1331
|
+
"inputCount": 13,
|
|
1332
|
+
"secrets": [],
|
|
1333
|
+
"secretCount": 0,
|
|
1334
|
+
"outputs": [
|
|
1335
|
+
"attestation-id",
|
|
1336
|
+
"attestation-url",
|
|
1337
|
+
"bundle-digest",
|
|
1338
|
+
"evidence-artifact-name",
|
|
1339
|
+
"evidence-root"
|
|
1340
|
+
],
|
|
1341
|
+
"outputCount": 5,
|
|
1342
|
+
"surface": "release-passport",
|
|
1343
|
+
"capabilityGroup": "release-passport-trust",
|
|
1344
|
+
"status": "active"
|
|
1345
|
+
},
|
|
1299
1346
|
{
|
|
1300
1347
|
"id": "github-governance-audit",
|
|
1301
1348
|
"path": ".github/workflows/github-governance-audit.yml",
|
|
@@ -1632,6 +1679,9 @@
|
|
|
1632
1679
|
"buildchain-stable-contract-lock-path",
|
|
1633
1680
|
"channel",
|
|
1634
1681
|
"dry-run",
|
|
1682
|
+
"github-artifact-attestation-environment",
|
|
1683
|
+
"github-artifact-attestation-policy-json",
|
|
1684
|
+
"github-artifact-attestation-retention-days",
|
|
1635
1685
|
"github-governance-receipt-json",
|
|
1636
1686
|
"github-release",
|
|
1637
1687
|
"github-release-notes",
|
|
@@ -1694,7 +1744,7 @@
|
|
|
1694
1744
|
"target-sha",
|
|
1695
1745
|
"trusted-publishing"
|
|
1696
1746
|
],
|
|
1697
|
-
"inputCount":
|
|
1747
|
+
"inputCount": 80,
|
|
1698
1748
|
"secrets": [
|
|
1699
1749
|
"BUILDCHAIN_ISSUE_APP_ID",
|
|
1700
1750
|
"BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
|
|
@@ -1718,6 +1768,10 @@
|
|
|
1718
1768
|
"controller-receipt-digest",
|
|
1719
1769
|
"controller-receipt-json",
|
|
1720
1770
|
"controller-receipt-status",
|
|
1771
|
+
"github-artifact-attestation-evidence-root",
|
|
1772
|
+
"github-artifact-attestation-id",
|
|
1773
|
+
"github-artifact-attestation-publication-receipt-digest",
|
|
1774
|
+
"github-artifact-attestation-url",
|
|
1721
1775
|
"promoted-sha",
|
|
1722
1776
|
"promotion-contract-lock-digest",
|
|
1723
1777
|
"promotion-contract-lock-path",
|
|
@@ -1737,7 +1791,7 @@
|
|
|
1737
1791
|
"publication-commit-url",
|
|
1738
1792
|
"release-candidate-artifact"
|
|
1739
1793
|
],
|
|
1740
|
-
"outputCount":
|
|
1794
|
+
"outputCount": 31,
|
|
1741
1795
|
"surface": "release-governance",
|
|
1742
1796
|
"capabilityGroup": "reusable-build",
|
|
1743
1797
|
"status": "active"
|
|
@@ -1932,6 +1986,28 @@
|
|
|
1932
1986
|
],
|
|
1933
1987
|
"actionSource": "actions/*/action.yml reverse input enumeration",
|
|
1934
1988
|
"actions": [
|
|
1989
|
+
{
|
|
1990
|
+
"id": "github-artifact-attestation",
|
|
1991
|
+
"path": "actions/github-artifact-attestation/action.yml",
|
|
1992
|
+
"inputs": [
|
|
1993
|
+
"attestation-id",
|
|
1994
|
+
"attestation-url",
|
|
1995
|
+
"bundle-path",
|
|
1996
|
+
"expected-buildchain-ref",
|
|
1997
|
+
"expected-caller-repository",
|
|
1998
|
+
"expected-source-sha",
|
|
1999
|
+
"mode",
|
|
2000
|
+
"output-dir",
|
|
2001
|
+
"platform-manifest-path",
|
|
2002
|
+
"policy-json",
|
|
2003
|
+
"preparation-json",
|
|
2004
|
+
"release-passport-path",
|
|
2005
|
+
"subject-path"
|
|
2006
|
+
],
|
|
2007
|
+
"inputCount": 13,
|
|
2008
|
+
"capabilityGroup": "release-passport-trust",
|
|
2009
|
+
"status": "active"
|
|
2010
|
+
},
|
|
1935
2011
|
{
|
|
1936
2012
|
"id": "macos-credential-island",
|
|
1937
2013
|
"path": "actions/macos-credential-island/action.yml",
|
|
@@ -2006,6 +2082,7 @@
|
|
|
2006
2082
|
"release-passport",
|
|
2007
2083
|
"release-passport-build-summary-path",
|
|
2008
2084
|
"release-passport-buildchain-self-kfd",
|
|
2085
|
+
"release-passport-github-artifact-attestation-policy-jsons",
|
|
2009
2086
|
"release-passport-impact-json",
|
|
2010
2087
|
"release-passport-invariant-passport-command",
|
|
2011
2088
|
"release-passport-invariant-passport-jsons",
|
|
@@ -2032,7 +2109,7 @@
|
|
|
2032
2109
|
"transaction-state-path",
|
|
2033
2110
|
"verification-command"
|
|
2034
2111
|
],
|
|
2035
|
-
"inputCount":
|
|
2112
|
+
"inputCount": 67,
|
|
2036
2113
|
"capabilityGroup": "release-passport-trust",
|
|
2037
2114
|
"status": "active"
|
|
2038
2115
|
},
|
package/docs/MAP.md
CHANGED
|
@@ -27,7 +27,7 @@ workflow, action, and Node API export also carries a `capabilityGroup`,
|
|
|
27
27
|
| Capability group | Primary facts | Primary manuals |
|
|
28
28
|
| --- | --- | --- |
|
|
29
29
|
| Getting Started | `capability-registry.json`, `product-mechanism.json` | [`install.md`](install.md), [`product-mechanism.md`](product-mechanism.md), [`cli.md`](cli.md) |
|
|
30
|
-
| Release Passport and Trust | `release-model.json`, `artifact-schemas.json`, `publication-authority-registry.json`, `kfd-claims.json` | [`release-passport.md`](release-passport.md), [`publication-authority.md`](publication-authority.md), [`release-candidate.md`](release-candidate.md), [`publish-transaction.md`](publish-transaction.md), [`binary-distribution.md`](binary-distribution.md) |
|
|
30
|
+
| Release Passport and Trust | `release-model.json`, `artifact-schemas.json`, `publication-authority-registry.json`, `kfd-claims.json` | [`release-passport.md`](release-passport.md), [`github-artifact-attestation.md`](github-artifact-attestation.md), [`publication-authority.md`](publication-authority.md), [`release-candidate.md`](release-candidate.md), [`publish-transaction.md`](publish-transaction.md), [`binary-distribution.md`](binary-distribution.md) |
|
|
31
31
|
| Reusable Build and Lifecycle | `workflow-registry.json`, `controller-registry.json`, `release-model.json` | [`reusable-build-surface.md`](reusable-build-surface.md), [`controller-evidence.md`](controller-evidence.md), [`shifu-gate-profiles.md`](shifu-gate-profiles.md), [`lifecycle-protocol.md`](lifecycle-protocol.md) |
|
|
32
32
|
| KFD Trust and Surface Closure | `kfd-claims.json`, `public-surface-audit.json`, `cli-registry.json`, `node-api-registry.json` | [`kfd-support.md`](kfd-support.md), [`release-passport.md`](release-passport.md) |
|
|
33
33
|
| Site Bundle, Web Surfaces, and Propagation | `buildchain-site.json`, `site-manifest.json`, `page-registry.json`, `release-model.json` | [`site-bundle-contract.md`](site-bundle-contract.md), [`web-surface-deployments.md`](web-surface-deployments.md), [`release-propagation.md`](release-propagation.md) |
|
|
@@ -42,6 +42,7 @@ workflow, action, and Node API export also carries a `capabilityGroup`,
|
|
|
42
42
|
| Capability-grouped KFD navigation | `dist/site/capability-registry.json`, `dist/site/page-registry.json`, `dist/site/manual-registry.json`, `dist/site/cli-registry.json`, `dist/site/node-api-registry.json` | this map, [`site-bundle-contract.md`](site-bundle-contract.md), [`kfd-support.md`](kfd-support.md) |
|
|
43
43
|
| KFD-1 / KFD-2 / KFD-3 release-passport gates | `dist/site/kfd-claims.json`, `dist/site/buildchain-contract.json`, `dist/site/artifact-schemas.json` | [`release-passport.md`](release-passport.md) |
|
|
44
44
|
| Product invariant Passport release gate | `buildchain.release.json#invariantPassports`, `dist/site/buildchain-contract.json` | [`release-passport.md`](release-passport.md) |
|
|
45
|
+
| GitHub keyless Linux artifact attestation | `buildchain.release.json#githubArtifactAttestations`, `dist/site/workflow-registry.json`, `dist/site/artifact-schemas.json` | [`github-artifact-attestation.md`](github-artifact-attestation.md) |
|
|
45
46
|
| KFD-3 public surface reverse audit | `dist/site/public-surface-audit.json`, `dist/site/cli-registry.json`, `dist/site/workflow-registry.json`, `dist/site/page-registry.json` | [`cli.md`](cli.md), [`site-bundle-contract.md`](site-bundle-contract.md) |
|
|
46
47
|
| KFD-1 / KFD-2 / KFD-3 first-class CLI and Node API | `.buildchain/kfd/kfd-3/surfaces.json`, `dist/site/kfd-claims.json`, `buildchain.release.json`, KFD schemas from `@kungfu-tech/kfd` | [`kfd-support.md`](kfd-support.md), [`cli.md`](cli.md#commands) |
|
|
47
48
|
| Declarative KFD Agent Hub adapter conformance and Passport evidence | `.buildchain/kfd/agent-hub.json`, `.buildchain/artifacts/kfd-agent-hub/evidence.json`, `buildchain.release.json#kfdAgentHub` | [`kfd-agent-hub.md`](kfd-agent-hub.md) |
|
|
@@ -85,6 +86,7 @@ replace them.
|
|
|
85
86
|
| How does publish evidence, recovery, and finalization work? | [`publish-transaction.md`](publish-transaction.md) | verify | stable |
|
|
86
87
|
| How do I collect and verify module/product build facts from Git source, version files, and outputs? | [`build-facts.md`](build-facts.md) + [`cli.md`](cli.md) | use/verify | stable |
|
|
87
88
|
| How do I publish or verify release passport artifacts? | [`release-passport.md`](release-passport.md) | use | stable |
|
|
89
|
+
| How do I keylessly attest Linux release artifacts with GitHub and bind them to a Release Passport? | [`github-artifact-attestation.md`](github-artifact-attestation.md) | verify/use | preview |
|
|
88
90
|
| How do I seal exact artifact, identity, lifecycle, and KFD assessment roots for KFX admission? | [`artifact-verification-envelope.md`](artifact-verification-envelope.md) | verify/use | preview |
|
|
89
91
|
| How is product publication authority sealed to an exact workflow, runner, control plane, nonce, and artifact? | [`publication-authority.md`](publication-authority.md) | verify | preview |
|
|
90
92
|
| How are GitHub ownership, independent review, effective protection, and plan capability audited fail-closed? | [`github-governance-authority.md`](github-governance-authority.md) | verify | preview |
|
|
@@ -47,6 +47,13 @@ Each archive is accompanied by:
|
|
|
47
47
|
- `buildchain-release-bundle.tar.gz`;
|
|
48
48
|
- `buildchain-release-bundle.json`.
|
|
49
49
|
|
|
50
|
+
Linux archives may also be accompanied by a GitHub/Sigstore bundle and
|
|
51
|
+
`buildchain.github-artifact-attestation-evidence/v1`. These prove the exact
|
|
52
|
+
GitHub signer workflow and source digest while preserving the original compiler
|
|
53
|
+
runner in the platform manifest. The GitHub-hosted signer does not rebuild or
|
|
54
|
+
execute consumer source. See
|
|
55
|
+
[`github-artifact-attestation.md`](github-artifact-attestation.md).
|
|
56
|
+
|
|
50
57
|
## KFD-3 Distribution Declaration
|
|
51
58
|
|
|
52
59
|
Buildchain self-describes this release lane in `dist/site/kfd-claims.json` as
|
package/docs/cli.md
CHANGED
|
@@ -74,6 +74,7 @@ import { verifyKfd1ReleaseGate } from "@kungfu-tech/buildchain/kfd-gate";
|
|
|
74
74
|
import { collectBadgeBundleFacts } from "@kungfu-tech/buildchain/badges";
|
|
75
75
|
import { collectReadmeBadgeFacts } from "@kungfu-tech/buildchain/readme-badges";
|
|
76
76
|
import { verifyReleasePassport } from "@kungfu-tech/buildchain/release-passport";
|
|
77
|
+
import { verifyGitHubArtifactAttestationEvidence } from "@kungfu-tech/buildchain/github-artifact-attestation";
|
|
77
78
|
import { createReleasePropagationPlan } from "@kungfu-tech/buildchain/release-propagation";
|
|
78
79
|
import { planReleaseLineBootstrap } from "@kungfu-tech/buildchain/release-line-bootstrap";
|
|
79
80
|
import { collectPublicSurfaceReverseAudit } from "@kungfu-tech/buildchain/public-surface-audit";
|
|
@@ -92,6 +93,14 @@ floating-ref contract world for a runtime such as `@v3`.
|
|
|
92
93
|
|
|
93
94
|
## Commands
|
|
94
95
|
|
|
96
|
+
`buildchain create github-artifact-attestation-policy` seals the expected
|
|
97
|
+
artifact, caller source, original Linux build, immutable Buildchain signer, and
|
|
98
|
+
GitHub permission set before the Release Passport is collected.
|
|
99
|
+
`buildchain verify github-artifact-attestation` invokes `gh attestation verify`
|
|
100
|
+
with the exact signer/source policy and then verifies the retained bundle,
|
|
101
|
+
predicate, platform manifest, Passport, and Buildchain evidence locally. See
|
|
102
|
+
[`github-artifact-attestation.md`](github-artifact-attestation.md).
|
|
103
|
+
|
|
95
104
|
`buildchain layout` is the stable machine question for repository layout. Tools
|
|
96
105
|
such as Shifu should call it instead of copying `.buildchain/` path constants:
|
|
97
106
|
|
|
@@ -21,14 +21,26 @@ ai_provenance:
|
|
|
21
21
|
|
|
22
22
|
Buildchain provides a reusable observation and PR controller for repositories
|
|
23
23
|
that promote a development branch into a protected Alpha branch. It does not
|
|
24
|
-
publish Alpha. The controller reads the exact heads of both branches
|
|
25
|
-
|
|
24
|
+
publish Alpha. The controller reads the exact heads of both branches, walks the
|
|
25
|
+
bounded development history from newest to oldest (stopping early at the Alpha
|
|
26
|
+
head), and selects the newest commit that satisfies all of these conditions:
|
|
26
27
|
|
|
27
28
|
- the source is strictly ahead of the recorded target head;
|
|
28
|
-
- the latest completed Dev Patrol for that exact
|
|
29
|
-
- the latest completed Alpha preflight for the same SHA succeeded; and
|
|
29
|
+
- the latest completed Dev Patrol for that exact commit SHA succeeded;
|
|
30
|
+
- the latest completed Alpha preflight for the same commit SHA succeeded; and
|
|
30
31
|
- both runs are within the caller's evidence age limit.
|
|
31
32
|
|
|
33
|
+
The selected commit can be behind the observed development head when newer
|
|
34
|
+
commits have not completed both workflows yet. The decision binds the observed
|
|
35
|
+
head, selected SHA, and count of skipped newer commits. This makes a slow native
|
|
36
|
+
verification lane live under continuous development without silently treating
|
|
37
|
+
an unqualified head as releasable.
|
|
38
|
+
|
|
39
|
+
History discovery is bounded to the newest 1000 development commits. The
|
|
40
|
+
controller then compares the selected SHA to the exact Alpha head before it can
|
|
41
|
+
be eligible, so a bounded scan cannot turn a commit outside the promotion
|
|
42
|
+
ancestry into a candidate.
|
|
43
|
+
|
|
32
44
|
The decision is `kungfu-buildchain-channel-candidate-decision/v1`. It records the
|
|
33
45
|
source and target branches and SHAs, comparison distance, workflow paths, run
|
|
34
46
|
identities and attempts, completion times, URLs, policy, and a canonical decision
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: draft
|
|
3
|
+
period: 2026-07
|
|
4
|
+
theme: buildchain-linux-artifact-provenance
|
|
5
|
+
doc_type: protocol
|
|
6
|
+
source_level: code-and-official-docs
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: unreviewed
|
|
11
|
+
last_reviewed: 2026-07-24
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-07-24
|
|
16
|
+
visible_context: Buildchain source, tests, GitHub Actions documentation, and actions/attest documentation
|
|
17
|
+
invisible_context: Model internals and provider-side implementation details are not visible
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# GitHub-native Linux Artifact Attestation
|
|
21
|
+
|
|
22
|
+
Buildchain can bind a Linux release artifact to its original compiler run, exact
|
|
23
|
+
source revision, platform manifest, Release Passport, and an immutable
|
|
24
|
+
Buildchain attester workflow. GitHub's OIDC identity and artifact attestation
|
|
25
|
+
service provide the keyless signature; Buildchain provides the release contract
|
|
26
|
+
and fail-closed local verification.
|
|
27
|
+
|
|
28
|
+
This capability proves provenance and integrity. It does not prove that source
|
|
29
|
+
code is safe, that a compiler was uncompromised, or that a self-hosted build
|
|
30
|
+
runner had no privileged observer.
|
|
31
|
+
|
|
32
|
+
## Trust Boundary
|
|
33
|
+
|
|
34
|
+
The original Linux runner remains the compiler identity. The reusable attester
|
|
35
|
+
runs on `ubuntu-24.04` only after the artifact, platform manifest, and Release
|
|
36
|
+
Passport have been sealed and uploaded. It downloads those files as data and
|
|
37
|
+
never checks out or executes consumer source.
|
|
38
|
+
|
|
39
|
+
The attester checks out only
|
|
40
|
+
`actions/github-artifact-attestation` from an exact Buildchain commit. It
|
|
41
|
+
rejects a floating Buildchain ref, a different caller repository, a different
|
|
42
|
+
source SHA, a different workflow run, a non-Linux platform manifest, or a
|
|
43
|
+
subject digest absent from the Release Passport.
|
|
44
|
+
|
|
45
|
+
The protected Environment defaults to `buildchain-artifact-attestation`.
|
|
46
|
+
Consumer repositories should require review or restrict deployment branches on
|
|
47
|
+
that Environment when their release policy requires an independent gate.
|
|
48
|
+
|
|
49
|
+
## Non-circular Passport Binding
|
|
50
|
+
|
|
51
|
+
The Release Passport first records
|
|
52
|
+
`githubArtifactAttestations[]`, an immutable expected-attestation policy:
|
|
53
|
+
|
|
54
|
+
- artifact name, relative path, byte size, and SHA-256;
|
|
55
|
+
- caller repository, source commit, and source tree;
|
|
56
|
+
- original Linux platform and platform-manifest digest; the initial v3 contract
|
|
57
|
+
requires the runner receipt root to equal that exact manifest digest;
|
|
58
|
+
- Buildchain signer workflow path and exact signer-bootstrap commit;
|
|
59
|
+
- exact Buildchain runtime commit used to build and release the artifact;
|
|
60
|
+
- exact GitHub permission set.
|
|
61
|
+
|
|
62
|
+
The GitHub attestation predicate then records the completed Release Passport
|
|
63
|
+
file digest. The returned attestation id, URL, Sigstore bundle digest, and
|
|
64
|
+
predicate root are written to a separate
|
|
65
|
+
`buildchain.github-artifact-attestation-evidence/v1` document. Keeping dynamic
|
|
66
|
+
provider evidence outside the Passport avoids a self-referential hash while
|
|
67
|
+
still binding both directions.
|
|
68
|
+
|
|
69
|
+
## GitHub Permissions and Runtime Pins
|
|
70
|
+
|
|
71
|
+
Both caller and reusable workflow grant only:
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
permissions:
|
|
75
|
+
actions: read
|
|
76
|
+
artifact-metadata: write
|
|
77
|
+
attestations: write
|
|
78
|
+
contents: read
|
|
79
|
+
id-token: write
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The reusable workflow pins `actions/checkout`, `actions/download-artifact`,
|
|
83
|
+
`actions/upload-artifact`, and `actions/attest` by full commit SHA. The workflow
|
|
84
|
+
itself must also be called at its exact signer-bootstrap commit. The signer
|
|
85
|
+
commit and the later Buildchain runtime commit are separately bound so the
|
|
86
|
+
first v3 integration never relies on a mutable or self-referential workflow ref.
|
|
87
|
+
|
|
88
|
+
## Prepare the Release Passport
|
|
89
|
+
|
|
90
|
+
Create one input document for each Linux artifact and seal it as a policy:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
buildchain create github-artifact-attestation-policy \
|
|
94
|
+
--input-json .buildchain/github-artifact-attestation/policy-input.json \
|
|
95
|
+
--output .buildchain/github-artifact-attestation/policy.json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The input object contains `subject`, `caller`, `signer`, and `build` objects.
|
|
99
|
+
The CLI computes no trusted values implicitly: the caller supplies the already
|
|
100
|
+
measured subject size/digest, source commit/tree, platform-manifest digest,
|
|
101
|
+
runner receipt root, and exact Buildchain workflow commit.
|
|
102
|
+
|
|
103
|
+
Pass the policy into Release Passport collection:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
buildchain collect github-release \
|
|
107
|
+
--github-artifact-attestation-policy-json \
|
|
108
|
+
.buildchain/github-artifact-attestation/policy.json \
|
|
109
|
+
--output-dir .buildchain/release-passport \
|
|
110
|
+
# ...the existing release inputs
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The build, Passport, and attestation jobs must stay in the same workflow run.
|
|
114
|
+
The release-candidate build declares both the subject and the already-merged
|
|
115
|
+
signer bootstrap commit. The Buildchain runtime remains the exact runtime ref
|
|
116
|
+
used by the build workflow and may be a later commit:
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
with:
|
|
120
|
+
github-artifact-attestation-subject-path: dist/kungfu-linux-x64.tar.gz
|
|
121
|
+
github-artifact-attestation-signer-sha: <exact-signer-bootstrap-sha>
|
|
122
|
+
github-artifact-attestation-platform-id: linux-x64
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
For release promotion, prefer the integrated v3 route. The policy must already
|
|
126
|
+
be present in the downloaded release-candidate payload:
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
permissions:
|
|
130
|
+
actions: write
|
|
131
|
+
artifact-metadata: write
|
|
132
|
+
attestations: write
|
|
133
|
+
checks: write
|
|
134
|
+
contents: write
|
|
135
|
+
id-token: write
|
|
136
|
+
issues: write
|
|
137
|
+
|
|
138
|
+
jobs:
|
|
139
|
+
promote:
|
|
140
|
+
uses: kungfu-systems/buildchain/.github/workflows/release-candidate-promote.yml@<exact-buildchain-v3-runtime-sha>
|
|
141
|
+
with:
|
|
142
|
+
buildchain-ref: <exact-buildchain-v3-runtime-sha>
|
|
143
|
+
github-release: true
|
|
144
|
+
release-passport: true
|
|
145
|
+
github-artifact-attestation-policy-json: .buildchain/release-candidate/payload/<artifact>/policy.json
|
|
146
|
+
github-artifact-attestation-environment: buildchain-artifact-attestation
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Promotion binds the policy into the Passport, stages only digest-matching data,
|
|
150
|
+
calls the exact v3 signer, verifies the provider identity a second time, and
|
|
151
|
+
publishes immutable bundle, predicate, verification, evidence, and receipt
|
|
152
|
+
assets beside the release artifact. A same-name Release asset with different
|
|
153
|
+
bytes is rejected instead of overwritten.
|
|
154
|
+
|
|
155
|
+
Low-level callers may call the reusable attester directly after their Passport
|
|
156
|
+
job. Both the reusable workflow ref and `buildchain-ref` use the same exact
|
|
157
|
+
40-hex signer-bootstrap commit and fail closed if the provider identity differs:
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
jobs:
|
|
161
|
+
attest-linux:
|
|
162
|
+
needs: [build-linux, release-passport]
|
|
163
|
+
permissions:
|
|
164
|
+
actions: read
|
|
165
|
+
artifact-metadata: write
|
|
166
|
+
attestations: write
|
|
167
|
+
contents: read
|
|
168
|
+
id-token: write
|
|
169
|
+
uses: kungfu-systems/buildchain/.github/workflows/github-artifact-attestation.yml@<exact-signer-bootstrap-sha>
|
|
170
|
+
with:
|
|
171
|
+
buildchain-ref: <exact-signer-bootstrap-sha>
|
|
172
|
+
evidence-run-id: ${{ github.run_id }}
|
|
173
|
+
source-sha: ${{ github.sha }}
|
|
174
|
+
subject-artifact-name: linux-release
|
|
175
|
+
subject-relative-path: libnode-linux-x64.tar.gz
|
|
176
|
+
platform-manifest-artifact-name: linux-platform-manifest
|
|
177
|
+
platform-manifest-relative-path: manifest.json
|
|
178
|
+
release-passport-artifact-name: release-passport
|
|
179
|
+
release-passport-relative-path: buildchain.release.json
|
|
180
|
+
policy-json: ${{ needs.release-passport.outputs.github-attestation-policy-json }}
|
|
181
|
+
evidence-artifact-name: linux-attestation-evidence
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Verify Online and Offline
|
|
185
|
+
|
|
186
|
+
The Buildchain verifier reconstructs exact `gh attestation verify` arguments
|
|
187
|
+
from the policy, including repository, signer workflow, signer digest, source
|
|
188
|
+
digest, predicate type, and self-hosted-runner denial. It then verifies the
|
|
189
|
+
local artifact, platform manifest, Release Passport, retained Sigstore bundle,
|
|
190
|
+
custom predicate, and Buildchain evidence root:
|
|
191
|
+
|
|
192
|
+
The reusable workflow runs that same exact signer/source verification
|
|
193
|
+
immediately after `actions/attest` and before it finalizes or uploads evidence.
|
|
194
|
+
Passing a different `buildchain-ref` than the commit used to invoke the reusable
|
|
195
|
+
workflow therefore fails in the signer job, not only during later consumption.
|
|
196
|
+
The policy additionally retains the distinct Buildchain runtime SHA that
|
|
197
|
+
created the build and release evidence.
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
buildchain verify github-artifact-attestation \
|
|
201
|
+
--artifact libnode-linux-x64.tar.gz \
|
|
202
|
+
--platform-manifest manifest.json \
|
|
203
|
+
--release-passport buildchain.release.json \
|
|
204
|
+
--bundle attestation.sigstore.json \
|
|
205
|
+
--evidence github-artifact-attestation.evidence.json
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Verification fails if a single artifact byte changes, the source commit or
|
|
209
|
+
repository differs, the signer workflow or Buildchain commit differs, the
|
|
210
|
+
Passport was replaced, the platform manifest drifts, the bundle omits the
|
|
211
|
+
expected statement, or GitHub reports a self-hosted signer.
|
|
212
|
+
|
|
213
|
+
## Qualification Policy
|
|
214
|
+
|
|
215
|
+
New protocol work qualifies on the Buildchain v3 alpha line first. The v2
|
|
216
|
+
development branch is not a supported landing target. Production
|
|
217
|
+
adoption waits for the exact v3 implementation commit to pass the repository
|
|
218
|
+
suite and a real GitHub OIDC/Sigstore qualification run, including the negative
|
|
219
|
+
cases above. A successful local fixture is necessary but not sufficient.
|
package/docs/release-passport.md
CHANGED
|
@@ -8,6 +8,14 @@ promotion PRs, exact tags, GitHub Releases, npm Trusted Publishing, and
|
|
|
8
8
|
machine-readable evidence. A project can keep its existing build system and use
|
|
9
9
|
Buildchain to make the release record auditable.
|
|
10
10
|
|
|
11
|
+
Linux release artifacts can additionally carry a GitHub keyless attestation
|
|
12
|
+
policy in `githubArtifactAttestations[]`. The policy binds the exact subject,
|
|
13
|
+
consumer source, original Linux build evidence, immutable Buildchain signer
|
|
14
|
+
workflow, and minimum permissions before the provider attestation exists. The
|
|
15
|
+
completed provider bundle and attestation identifier remain separate evidence,
|
|
16
|
+
avoiding a Passport hash cycle. See
|
|
17
|
+
[`github-artifact-attestation.md`](github-artifact-attestation.md).
|
|
18
|
+
|
|
11
19
|
Release-candidate and final passports may also include compact
|
|
12
20
|
`controllerReceipts[]` references. These bind a real reusable-workflow receipt
|
|
13
21
|
to its plan digest, consumer source SHA, and exact Buildchain runtime SHA; they
|
|
@@ -91,6 +99,10 @@ Additive passport sections:
|
|
|
91
99
|
semantic Passport root, exact clean source revision, complete platform
|
|
92
100
|
coverage, verdict, and residual risk. Buildchain owns release admission, not
|
|
93
101
|
the meaning of the product invariants.
|
|
102
|
+
- `githubArtifactAttestations`: expected GitHub keyless attestation identities
|
|
103
|
+
for Linux release artifacts, including subject, caller source, original build
|
|
104
|
+
evidence, exact Buildchain signer workflow digest, and least-privilege
|
|
105
|
+
permissions. Dynamic provider evidence is stored beside the Passport.
|
|
94
106
|
|
|
95
107
|
Buildchain's own binary lane also publishes observability artifacts generated by
|
|
96
108
|
the Buildchain logging API and CLI:
|
|
@@ -144,6 +156,7 @@ buildchain collect github-release \
|
|
|
144
156
|
--kfd-1-witness-json .buildchain/kfd/kfd-1/contract-world.witness.json \
|
|
145
157
|
--kfd-2-claim-json .buildchain/kfd/kfd-2/release-claims.json \
|
|
146
158
|
--invariant-passport-json product/release/qualification/invariant-passport.json \
|
|
159
|
+
--github-artifact-attestation-policy-json .buildchain/github-artifact-attestation/policy.json \
|
|
147
160
|
--output-dir .buildchain/release-passport
|
|
148
161
|
```
|
|
149
162
|
|
|
@@ -5,6 +5,12 @@ Buildchain's release semantics but cannot be described as a simple Node package.
|
|
|
5
5
|
The first target shape is `libnode`: expensive native builds, multiple operating
|
|
6
6
|
systems, self-hosted runner labels, and release artifacts that must be auditable.
|
|
7
7
|
|
|
8
|
+
For Linux release artifacts, the build workflow can hand the sealed artifact,
|
|
9
|
+
platform manifest, and Release Passport to the separate GitHub-hosted keyless
|
|
10
|
+
attester. The compiler runner remains the recorded build identity; the attester
|
|
11
|
+
only signs and verifies immutable data. See
|
|
12
|
+
[`github-artifact-attestation.md`](github-artifact-attestation.md).
|
|
13
|
+
|
|
8
14
|
## Automatic Channel Router
|
|
9
15
|
|
|
10
16
|
The preferred consumer surface is one reusable workflow call. After v2.12
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "3.0.2-alpha.
|
|
3
|
+
"version": "3.0.2-alpha.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
|
|
6
6
|
"repository": "https://github.com/kungfu-systems/buildchain",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"./core": "./packages/core/index.js",
|
|
18
18
|
"./artifact-passport": "./packages/core/artifact-passport.js",
|
|
19
19
|
"./artifact-verification-envelope": "./packages/core/artifact-verification-envelope.js",
|
|
20
|
+
"./github-artifact-attestation": "./packages/core/github-artifact-attestation.js",
|
|
20
21
|
"./anchored-version-material": "./packages/core/anchored-version-material.js",
|
|
21
22
|
"./buildchain-contract": "./packages/core/buildchain-contract.js",
|
|
22
23
|
"./candidate-timeline": "./packages/core/candidate-timeline.js",
|
|
@@ -121,6 +121,8 @@ export function createBuildchainContractWorld({
|
|
|
121
121
|
"runner-preset",
|
|
122
122
|
"platforms-json",
|
|
123
123
|
"release-candidate",
|
|
124
|
+
"github-artifact-attestation-subject-path",
|
|
125
|
+
"github-artifact-attestation-platform-id",
|
|
124
126
|
"artifact-transfer-mode",
|
|
125
127
|
"checkout-cache-mode",
|
|
126
128
|
"checkout-cache-fallback",
|
|
@@ -196,6 +198,9 @@ export function createBuildchainContractWorld({
|
|
|
196
198
|
"release-passport-kfd-3-artifact-verify-command",
|
|
197
199
|
"release-passport-invariant-passport-jsons",
|
|
198
200
|
"release-passport-invariant-passport-command",
|
|
201
|
+
"github-artifact-attestation-policy-json",
|
|
202
|
+
"github-artifact-attestation-environment",
|
|
203
|
+
"github-artifact-attestation-retention-days",
|
|
199
204
|
"buildchain-contract-lock-path",
|
|
200
205
|
"buildchain-contract-drift-issue-mode",
|
|
201
206
|
"github-release",
|
|
@@ -369,6 +374,7 @@ export function createBuildchainContractWorld({
|
|
|
369
374
|
"release-passport-kfd-3-artifact-verify-command",
|
|
370
375
|
"release-passport-invariant-passport-jsons",
|
|
371
376
|
"release-passport-invariant-passport-command",
|
|
377
|
+
"release-passport-github-artifact-attestation-policy-jsons",
|
|
372
378
|
"github-release",
|
|
373
379
|
"github-release-title",
|
|
374
380
|
"github-release-notes",
|
|
@@ -16,6 +16,7 @@ export const BUILDCHAIN_AGENT_MANUALS = Object.freeze([
|
|
|
16
16
|
{ id: "auditable-demo", title: "Auditable demo artifact pipeline", path: "docs/auditable-demo.md", plane: "verify" },
|
|
17
17
|
{ id: "install", title: "Install and verify Buildchain", path: "docs/install.md", plane: "use" },
|
|
18
18
|
{ id: "release-passport", title: "Release Passport protocol", path: "docs/release-passport.md", plane: "verify" },
|
|
19
|
+
{ id: "github-artifact-attestation", title: "GitHub-native Linux artifact attestation", path: "docs/github-artifact-attestation.md", plane: "verify" },
|
|
19
20
|
{ id: "controller-evidence", title: "Controller evidence contract", path: "docs/controller-evidence.md", plane: "verify" },
|
|
20
21
|
{ id: "publication-authority", title: "Sealed publication authority", path: "docs/publication-authority.md", plane: "verify" },
|
|
21
22
|
{ id: "github-governance-authority", title: "GitHub governance authority", path: "docs/github-governance-authority.md", plane: "verify" },
|
|
@@ -71,6 +72,7 @@ const SITE_CONTRACT_FILES = Object.freeze([
|
|
|
71
72
|
const SCHEMA_AND_STANDARD_FILES = Object.freeze([
|
|
72
73
|
"packages/core/kfd-gate.js",
|
|
73
74
|
"packages/core/release-passport.js",
|
|
75
|
+
"packages/core/github-artifact-attestation.js",
|
|
74
76
|
"packages/core/buildchain-contract.js",
|
|
75
77
|
"packages/core/controller-evidence.js",
|
|
76
78
|
"packages/core/publication-authority.js",
|
|
@@ -89,6 +91,9 @@ const WORKFLOW_AND_ACTION_FILES = Object.freeze([
|
|
|
89
91
|
".github/workflows/.release-candidate-promote.yml",
|
|
90
92
|
".github/workflows/release-candidate-promote.yml",
|
|
91
93
|
".github/workflows/buildchain-ref-promotion.yml",
|
|
94
|
+
".github/workflows/github-artifact-attestation.yml",
|
|
95
|
+
"actions/github-artifact-attestation/action.yml",
|
|
96
|
+
"actions/github-artifact-attestation/index.js",
|
|
92
97
|
".github/workflows/release-propagation.yml",
|
|
93
98
|
"actions/macos-credential-island/action.yml",
|
|
94
99
|
"actions/macos-credential-island/index.js",
|
|
@@ -31,6 +31,7 @@ const DESCRIPTORS = Object.freeze([
|
|
|
31
31
|
[".github/workflows/dev-merge-queue-governance.yml", "governance-write"],
|
|
32
32
|
[".github/workflows/dev-pr-auto-merge.yml", "governance-write"],
|
|
33
33
|
[".github/workflows/github-governance-audit.yml", "governance-write"],
|
|
34
|
+
[".github/workflows/github-artifact-attestation.yml", "evidence-publication", true, ["github-artifact-attestation"], "oidc", "consumer-defined", "caller-bound", "caller-bound"],
|
|
34
35
|
[".github/workflows/npm-publish.yml", "dry-run-only"],
|
|
35
36
|
[".github/workflows/paper-release-sealed.yml", "product-publication", true, ["npm-publish", "github-release"], "trusted-publishing", "none", "fixed", "caller-bound"],
|
|
36
37
|
[".github/workflows/paper-release.yml", "product-publication", true, ["npm-publish", "github-release"], "trusted-publishing", "none", "fixed", "caller-bound"],
|