@kungfu-tech/buildchain 3.0.2-alpha.4 → 3.0.2-alpha.6

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.
Files changed (49) hide show
  1. package/README.md +1 -0
  2. package/actions/github-artifact-attestation/README.md +10 -0
  3. package/actions/promote-buildchain-ref/README.md +7 -0
  4. package/bin/buildchain.mjs +5 -0
  5. package/bin/internal/trust-release-cli.mjs +74 -3
  6. package/dist/site/artifact-schemas.json +5 -1
  7. package/dist/site/buildchain-contract.json +79 -28
  8. package/dist/site/buildchain-site.json +110 -27
  9. package/dist/site/capability-registry.json +8 -7
  10. package/dist/site/cli-registry.json +12 -0
  11. package/dist/site/controller-registry.json +40 -4
  12. package/dist/site/kfd-claims.json +205 -19
  13. package/dist/site/kfd-upstream-aggregate.json +1 -1
  14. package/dist/site/manual-registry.json +19 -5
  15. package/dist/site/node-api-registry.json +22 -9
  16. package/dist/site/page-registry.json +91 -17
  17. package/dist/site/public-surface-audit.json +132 -17
  18. package/dist/site/publication-authority-registry.json +27 -2
  19. package/dist/site/publication-registry.json +4 -4
  20. package/dist/site/release-model.json +2 -1
  21. package/dist/site/release-passport-check-manifest.json +1 -0
  22. package/dist/site/release-provenance.json +1 -0
  23. package/dist/site/schemas/release-passport-v1.schema.json +6 -0
  24. package/dist/site/site-manifest.json +17 -9
  25. package/dist/site/workflow-registry.json +91 -9
  26. package/docs/MAP.md +3 -1
  27. package/docs/binary-distribution.md +7 -0
  28. package/docs/cli.md +9 -0
  29. package/docs/dev-alpha-candidate-patrol.md +51 -13
  30. package/docs/github-artifact-attestation.md +219 -0
  31. package/docs/release-passport.md +13 -0
  32. package/docs/reusable-build-surface.md +6 -0
  33. package/package.json +2 -1
  34. package/packages/core/buildchain-contract.js +6 -0
  35. package/packages/core/buildchain-kfd-claims.js +5 -0
  36. package/packages/core/buildchain-publication-authority.js +1 -0
  37. package/packages/core/github-artifact-attestation.js +642 -0
  38. package/packages/core/index.js +19 -0
  39. package/packages/core/publication-authority.js +1 -1
  40. package/packages/core/release-passport-contract.js +2 -0
  41. package/packages/core/release-passport.js +60 -3
  42. package/scripts/check-inventory.mjs +4 -0
  43. package/scripts/create-github-artifact-attestation-policy.mjs +62 -0
  44. package/scripts/dev-alpha-candidate-patrol.mjs +471 -71
  45. package/scripts/generate-channel-promotion-workflow.mjs +6 -0
  46. package/scripts/generate-site-bundle.mjs +12 -0
  47. package/scripts/publish-github-artifact-attestation-evidence.mjs +201 -0
  48. package/scripts/release-candidate-resolver.mjs +12 -0
  49. 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": 69,
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": 85,
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": 15,
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": 72,
984
+ "inputCount": 75,
972
985
  "secrets": [
973
986
  "BUILDCHAIN_ARTIFACT_RELAY_S3_DOWNLOAD_ROLE_ARN",
974
987
  "BUILDCHAIN_ARTIFACT_RELAY_S3_ROLE_ARN",
@@ -1225,22 +1238,27 @@
1225
1238
  "dev-workflow-path",
1226
1239
  "dry-run",
1227
1240
  "max-age-seconds",
1241
+ "settlement-authorized",
1228
1242
  "source-branch",
1229
1243
  "target-branch"
1230
1244
  ],
1231
- "inputCount": 9,
1245
+ "inputCount": 10,
1232
1246
  "secrets": [
1233
1247
  "promotion-token"
1234
1248
  ],
1235
1249
  "secretCount": 1,
1236
1250
  "outputs": [
1251
+ "active-candidate-pr",
1252
+ "controller-state",
1237
1253
  "eligible",
1254
+ "next-candidate-sha",
1238
1255
  "promotion-pr",
1239
1256
  "result-path",
1240
1257
  "selected-sha",
1258
+ "settlement-action",
1241
1259
  "source-lock-ref"
1242
1260
  ],
1243
- "outputCount": 5,
1261
+ "outputCount": 9,
1244
1262
  "surface": "repository-patrol",
1245
1263
  "capabilityGroup": "governance-versioning",
1246
1264
  "status": "active"
@@ -1296,6 +1314,40 @@
1296
1314
  "capabilityGroup": "governance-versioning",
1297
1315
  "status": "active"
1298
1316
  },
1317
+ {
1318
+ "id": "github-artifact-attestation",
1319
+ "path": ".github/workflows/github-artifact-attestation.yml",
1320
+ "reusable": true,
1321
+ "inputs": [
1322
+ "buildchain-ref",
1323
+ "environment",
1324
+ "evidence-artifact-name",
1325
+ "evidence-run-id",
1326
+ "platform-manifest-artifact-name",
1327
+ "platform-manifest-relative-path",
1328
+ "policy-json",
1329
+ "release-passport-artifact-name",
1330
+ "release-passport-relative-path",
1331
+ "retention-days",
1332
+ "source-sha",
1333
+ "subject-artifact-name",
1334
+ "subject-relative-path"
1335
+ ],
1336
+ "inputCount": 13,
1337
+ "secrets": [],
1338
+ "secretCount": 0,
1339
+ "outputs": [
1340
+ "attestation-id",
1341
+ "attestation-url",
1342
+ "bundle-digest",
1343
+ "evidence-artifact-name",
1344
+ "evidence-root"
1345
+ ],
1346
+ "outputCount": 5,
1347
+ "surface": "release-passport",
1348
+ "capabilityGroup": "release-passport-trust",
1349
+ "status": "active"
1350
+ },
1299
1351
  {
1300
1352
  "id": "github-governance-audit",
1301
1353
  "path": ".github/workflows/github-governance-audit.yml",
@@ -1632,6 +1684,9 @@
1632
1684
  "buildchain-stable-contract-lock-path",
1633
1685
  "channel",
1634
1686
  "dry-run",
1687
+ "github-artifact-attestation-environment",
1688
+ "github-artifact-attestation-policy-json",
1689
+ "github-artifact-attestation-retention-days",
1635
1690
  "github-governance-receipt-json",
1636
1691
  "github-release",
1637
1692
  "github-release-notes",
@@ -1694,7 +1749,7 @@
1694
1749
  "target-sha",
1695
1750
  "trusted-publishing"
1696
1751
  ],
1697
- "inputCount": 77,
1752
+ "inputCount": 80,
1698
1753
  "secrets": [
1699
1754
  "BUILDCHAIN_ISSUE_APP_ID",
1700
1755
  "BUILDCHAIN_ISSUE_APP_PRIVATE_KEY",
@@ -1718,6 +1773,10 @@
1718
1773
  "controller-receipt-digest",
1719
1774
  "controller-receipt-json",
1720
1775
  "controller-receipt-status",
1776
+ "github-artifact-attestation-evidence-root",
1777
+ "github-artifact-attestation-id",
1778
+ "github-artifact-attestation-publication-receipt-digest",
1779
+ "github-artifact-attestation-url",
1721
1780
  "promoted-sha",
1722
1781
  "promotion-contract-lock-digest",
1723
1782
  "promotion-contract-lock-path",
@@ -1737,7 +1796,7 @@
1737
1796
  "publication-commit-url",
1738
1797
  "release-candidate-artifact"
1739
1798
  ],
1740
- "outputCount": 27,
1799
+ "outputCount": 31,
1741
1800
  "surface": "release-governance",
1742
1801
  "capabilityGroup": "reusable-build",
1743
1802
  "status": "active"
@@ -1932,6 +1991,28 @@
1932
1991
  ],
1933
1992
  "actionSource": "actions/*/action.yml reverse input enumeration",
1934
1993
  "actions": [
1994
+ {
1995
+ "id": "github-artifact-attestation",
1996
+ "path": "actions/github-artifact-attestation/action.yml",
1997
+ "inputs": [
1998
+ "attestation-id",
1999
+ "attestation-url",
2000
+ "bundle-path",
2001
+ "expected-buildchain-ref",
2002
+ "expected-caller-repository",
2003
+ "expected-source-sha",
2004
+ "mode",
2005
+ "output-dir",
2006
+ "platform-manifest-path",
2007
+ "policy-json",
2008
+ "preparation-json",
2009
+ "release-passport-path",
2010
+ "subject-path"
2011
+ ],
2012
+ "inputCount": 13,
2013
+ "capabilityGroup": "release-passport-trust",
2014
+ "status": "active"
2015
+ },
1935
2016
  {
1936
2017
  "id": "macos-credential-island",
1937
2018
  "path": "actions/macos-credential-island/action.yml",
@@ -2006,6 +2087,7 @@
2006
2087
  "release-passport",
2007
2088
  "release-passport-build-summary-path",
2008
2089
  "release-passport-buildchain-self-kfd",
2090
+ "release-passport-github-artifact-attestation-policy-jsons",
2009
2091
  "release-passport-impact-json",
2010
2092
  "release-passport-invariant-passport-command",
2011
2093
  "release-passport-invariant-passport-jsons",
@@ -2032,7 +2114,7 @@
2032
2114
  "transaction-state-path",
2033
2115
  "verification-command"
2034
2116
  ],
2035
- "inputCount": 66,
2117
+ "inputCount": 67,
2036
2118
  "capabilityGroup": "release-passport-trust",
2037
2119
  "status": "active"
2038
2120
  },
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
 
@@ -8,20 +8,21 @@ confidence: high
8
8
  sensitivity: public
9
9
  evidence_grade: A
10
10
  review_state: self-reviewed
11
- last_reviewed: 2026-07-26
11
+ last_reviewed: 2026-07-27
12
12
  ai_provenance:
13
13
  model_family: GPT-5
14
14
  product: Codex
15
- generated_at: 2026-07-26
15
+ generated_at: 2026-07-27
16
16
  visible_context: Existing Buildchain stable-candidate source locks, Kungfu exact-source Alpha preflight, Dev Patrol, and repository release governance.
17
17
  invisible_context_boundary: No credentials, private logs, or private configuration were used.
18
18
  ---
19
19
 
20
20
  # Dev to Alpha Candidate Patrol
21
21
 
22
- Buildchain provides a reusable observation and PR controller for repositories
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, walks the
22
+ Buildchain provides a reusable observation and single-flight PR controller for
23
+ repositories that promote a development branch into a protected Alpha branch.
24
+ It does not publish Alpha. The read-only observer reads the exact heads of both
25
+ branches, walks the
25
26
  bounded development history from newest to oldest (stopping early at the Alpha
26
27
  head), and selects the newest commit that satisfies all of these conditions:
27
28
 
@@ -45,19 +46,56 @@ The decision is `kungfu-buildchain-channel-candidate-decision/v1`. It records th
45
46
  source and target branches and SHAs, comparison distance, workflow paths, run
46
47
  identities and attempts, completion times, URLs, policy, and a canonical decision
47
48
  root. Missing, stale, failed, duplicate, or source-mismatched evidence fails
48
- closed.
49
+ closed as an auditable `blocked` or `stale` observation and cannot enter
50
+ settlement.
51
+
52
+ The companion state is
53
+ `kungfu-buildchain-dev-alpha-candidate-state/v1`. Its current state is one of:
54
+
55
+ - `observed`: no exact candidate is currently settleable;
56
+ - `eligible-for-settlement`: a qualified candidate exists and no managed Alpha
57
+ candidate PR is active;
58
+ - `active`: exactly one managed candidate PR is open;
59
+ - `retained-next`: an active PR remains authoritative and the newest different
60
+ qualified SHA is retained as `nextCandidate`;
61
+ - `stale`: the available exact-SHA evidence pair is outside policy age; or
62
+ - `blocked`: qualification or reconciliation failed closed.
63
+
64
+ When a newer qualified SHA replaces an earlier `nextCandidate`, the state also
65
+ records that earlier SHA as `supersededCandidate`. Every state carries exact
66
+ repository, source/target refs and SHAs, workflow-run evidence through the
67
+ candidate decision, and canonical decision/state roots.
49
68
 
50
69
  ## Reusable workflow
51
70
 
52
71
  Call `.github/workflows/dev-alpha-candidate-patrol.yml` from a thin repository
53
- workflow. Start with `dry-run: true`. Once the repository has proven that its
54
- two workflow names and branch topology produce exact same-SHA evidence, it may
55
- set `create-pull-request: true` and `dry-run: false`.
72
+ workflow. Start with `dry-run: true`. The reusable workflow always runs an
73
+ `observe` job with only Actions/content/pull-request read permissions. Once the
74
+ repository has proven that its two workflow names and branch topology produce
75
+ exact same-SHA evidence, it may set `settlement-authorized: true` and
76
+ `dry-run: false`. The older `create-pull-request` input remains a compatibility
77
+ alias for settlement authorization.
78
+
79
+ The separately permissioned `settle` job re-runs the exact observation before
80
+ any write. With no active managed candidate, it creates one branch named from
81
+ the target branch and the first 12 characters of the full source SHA. An
82
+ existing branch must point to the same full SHA or the run fails. With one
83
+ active managed candidate, it only updates the machine-readable state marker in
84
+ that PR body so repeated events and rapid dev progress cannot create another
85
+ candidate PR or another heavy candidate build. Foreign human-authored Alpha PRs
86
+ are ignored. More than one open Buildchain-managed candidate fails closed.
87
+
88
+ The PR body is the bounded durable controller state: it preserves the active
89
+ candidate and newest retained `nextCandidate` without introducing an always-on
90
+ service. Once the active PR settles or is abandoned, the next execution
91
+ recomputes current exact-SHA qualification and creates only the newest still
92
+ fresh candidate. It never trusts a `workflow_run` trigger SHA as evidence.
56
93
 
57
- Candidate mode creates one branch named from the target branch and the first 12
58
- characters of the full source SHA. An existing branch must point to the same
59
- full SHA or the run fails. The controller then creates or reuses one open pull
60
- request from that immutable branch to the protected Alpha branch.
94
+ Consumers should invoke this workflow after relevant qualification workflow
95
+ completion and from an offset periodic fallback. GitHub may delay scheduled
96
+ runs, so the event path supplies low latency while the fallback supplies
97
+ recovery. Workflow concurrency plus the server-side open-PR reconciliation
98
+ makes duplicate or delayed events idempotent.
61
99
 
62
100
  The workflow never moves the Alpha ref directly, merges or auto-merges the pull
63
101
  request, publishes npm, creates a Git tag or GitHub Release, or changes branch
@@ -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.
@@ -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