@kungfu-tech/buildchain 2.14.18-alpha.7 → 2.14.18-alpha.9
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/dist/site/buildchain-contract.json +5 -5
- package/dist/site/buildchain-site.json +4 -4
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/node-api-registry.json +1 -1
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +4 -4
- package/package.json +1 -1
- package/packages/core/publication-control-plane-audit.js +4 -1
- package/scripts/audit-publication-control-plane.mjs +38 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"product": {
|
|
5
5
|
"name": "Buildchain",
|
|
6
6
|
"package": "@kungfu-tech/buildchain",
|
|
7
|
-
"version": "2.14.18-alpha.
|
|
7
|
+
"version": "2.14.18-alpha.9",
|
|
8
8
|
"repository": "https://github.com/kungfu-systems/buildchain"
|
|
9
9
|
},
|
|
10
10
|
"majorLine": "v2",
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
"promotion reuses PR-stage release-candidate artifacts and does not run the heavy native build matrix"
|
|
213
213
|
],
|
|
214
214
|
"breakingDigest": "sha256:aa30f22e3af0a89841310bdbdc900844dd95a66974db173fa140a71bbd7e82c0",
|
|
215
|
-
"auditDigest": "sha256:
|
|
215
|
+
"auditDigest": "sha256:8eea73b0f1dafd490b8bbbfc41fb345055b457097e16a8c05fe6258d43bd6983"
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
"contractVersion": 1,
|
|
@@ -663,7 +663,7 @@
|
|
|
663
663
|
"agents can discover supported Node APIs without importing internal file paths"
|
|
664
664
|
],
|
|
665
665
|
"breakingDigest": "sha256:48f925608d3e2131d90936b07dc2a30341204cae3e6e785c0f77d61ad755c945",
|
|
666
|
-
"auditDigest": "sha256:
|
|
666
|
+
"auditDigest": "sha256:2b5ddfdf209121d62d41bd8565094e4df5e2314a3f26e5e71ed6422c7fd6f69e"
|
|
667
667
|
},
|
|
668
668
|
{
|
|
669
669
|
"contractVersion": 1,
|
|
@@ -2928,7 +2928,7 @@
|
|
|
2928
2928
|
"missing receipts are non-qualifying and must not be represented as a successful controller run"
|
|
2929
2929
|
],
|
|
2930
2930
|
"breakingDigest": "sha256:015d8de793adbd4c539416be7d7512e18cc92097e629b0203fa06d2c183e98bd",
|
|
2931
|
-
"auditDigest": "sha256:
|
|
2931
|
+
"auditDigest": "sha256:8eea73b0f1dafd490b8bbbfc41fb345055b457097e16a8c05fe6258d43bd6983"
|
|
2932
2932
|
},
|
|
2933
2933
|
{
|
|
2934
2934
|
"contractVersion": 1,
|
|
@@ -3126,5 +3126,5 @@
|
|
|
3126
3126
|
}
|
|
3127
3127
|
],
|
|
3128
3128
|
"compatibilityDigest": "sha256:df13c3b8066068925ce847b31002201d533034d10d342542422db3a665c10475",
|
|
3129
|
-
"contractDigest": "sha256:
|
|
3129
|
+
"contractDigest": "sha256:1123021240712e38cee4354638e6b25261c5444764aea2ee7b1aaf34cca5bd60"
|
|
3130
3130
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-bundle",
|
|
4
|
-
"generatedAt": "2026-07-24T14:
|
|
5
|
-
"publishedAt": "2026-07-24T14:
|
|
4
|
+
"generatedAt": "2026-07-24T14:45:55.889Z",
|
|
5
|
+
"publishedAt": "2026-07-24T14:45:55.889Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "0a6e29f7c10cee85b49cfd974349bb883ee6330c",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"package": {
|
|
39
39
|
"name": "@kungfu-tech/buildchain",
|
|
40
|
-
"version": "2.14.18-alpha.
|
|
40
|
+
"version": "2.14.18-alpha.9",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"source": {
|
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
"specifier": "@kungfu-tech/buildchain/publication-control-plane-audit",
|
|
321
321
|
"export": "./publication-control-plane-audit",
|
|
322
322
|
"target": "./packages/core/publication-control-plane-audit.js",
|
|
323
|
-
"digest": "sha256:
|
|
323
|
+
"digest": "sha256:3817d243ef01490be7375d7ed8bb0d00326f528b1fe0681bfd0d003c9932cc96",
|
|
324
324
|
"summary": "Read-only publication control-plane snapshot evaluation APIs.",
|
|
325
325
|
"capabilityGroup": "release-passport-trust",
|
|
326
326
|
"audience": [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-publication-release-registry",
|
|
4
|
-
"generatedAt": "2026-07-24T14:
|
|
5
|
-
"publishedAt": "2026-07-24T14:
|
|
4
|
+
"generatedAt": "2026-07-24T14:45:55.889Z",
|
|
5
|
+
"publishedAt": "2026-07-24T14:45:55.889Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "0a6e29f7c10cee85b49cfd974349bb883ee6330c",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"package": {
|
|
34
34
|
"name": "@kungfu-tech/buildchain",
|
|
35
|
-
"version": "2.14.18-alpha.
|
|
35
|
+
"version": "2.14.18-alpha.9",
|
|
36
36
|
"versionSource": "package.json#version"
|
|
37
37
|
},
|
|
38
38
|
"sourceKind": "package-site-bundle",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-manifest",
|
|
4
|
-
"generatedAt": "2026-07-24T14:
|
|
5
|
-
"publishedAt": "2026-07-24T14:
|
|
4
|
+
"generatedAt": "2026-07-24T14:45:55.889Z",
|
|
5
|
+
"publishedAt": "2026-07-24T14:45:55.889Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "0a6e29f7c10cee85b49cfd974349bb883ee6330c",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"package": {
|
|
39
39
|
"name": "@kungfu-tech/buildchain",
|
|
40
|
-
"version": "2.14.18-alpha.
|
|
40
|
+
"version": "2.14.18-alpha.9",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "2.14.18-alpha.
|
|
3
|
+
"version": "2.14.18-alpha.9",
|
|
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",
|
|
@@ -122,6 +122,8 @@ export function evaluatePublicationControlPlaneSnapshot({
|
|
|
122
122
|
Array.isArray(branchPolicy.releaseReconciliation.changedPaths) &&
|
|
123
123
|
branchPolicy.releaseReconciliation.changedPaths.length > 0
|
|
124
124
|
);
|
|
125
|
+
const sourceBranchBindingPass = branchPolicy.sourceSha === branchPolicy.headSha ||
|
|
126
|
+
branchPolicy.sourceContainedInBranch === true;
|
|
125
127
|
const providerTransactionBranchPass = branchPolicy.ref === branch &&
|
|
126
128
|
branchPolicy.policyMode === "provider-enforced-transaction" &&
|
|
127
129
|
branchPolicy.protected === true &&
|
|
@@ -132,7 +134,7 @@ export function evaluatePublicationControlPlaneSnapshot({
|
|
|
132
134
|
branchPolicy.requiredCheckPassed === true &&
|
|
133
135
|
/^[0-9a-f]{40}$/i.test(String(branchPolicy.requiredCheckSha || "")) &&
|
|
134
136
|
branchPolicy.requiredCheckSha === branchPolicy.pullRequestHeadSha &&
|
|
135
|
-
|
|
137
|
+
sourceBranchBindingPass &&
|
|
136
138
|
sourceAuthorizationPass &&
|
|
137
139
|
branchPolicy.mergedPullRequest === true &&
|
|
138
140
|
branchPolicy.baseRef === branch &&
|
|
@@ -158,6 +160,7 @@ export function evaluatePublicationControlPlaneSnapshot({
|
|
|
158
160
|
environmentPolicy.declared === true &&
|
|
159
161
|
environmentPolicy.exists === true &&
|
|
160
162
|
environmentPolicy.protected === true &&
|
|
163
|
+
environmentPolicy.branchAuthorized === true &&
|
|
161
164
|
(environmentPolicy.reviewRequired !== true || environmentPolicy.preventSelfReview === true),
|
|
162
165
|
environmentPolicy,
|
|
163
166
|
),
|
|
@@ -239,6 +239,16 @@ function main() {
|
|
|
239
239
|
const deploymentBranches = environment !== "none" && environmentState.deployment_branch_policy?.custom_branch_policies === true
|
|
240
240
|
? githubJson(`repos/${repository}/environments/${encodeURIComponent(environment)}/deployment-branch-policies?per_page=100`, "Environment deployment branch policy")
|
|
241
241
|
: { branch_policies: [] };
|
|
242
|
+
const exactEnvironmentBranchPolicy = (deploymentBranches.branch_policies || []).find((entry) =>
|
|
243
|
+
entry?.type === "branch" && entry?.name === branch
|
|
244
|
+
);
|
|
245
|
+
const environmentBranchAuthorized = environment !== "none" && (
|
|
246
|
+
(
|
|
247
|
+
environmentState.deployment_branch_policy?.protected_branches === true &&
|
|
248
|
+
branchState.protected === true
|
|
249
|
+
) ||
|
|
250
|
+
Boolean(exactEnvironmentBranchPolicy)
|
|
251
|
+
);
|
|
242
252
|
const oidc = githubJson(`repos/${repository}/actions/oidc/customization/sub`, "OIDC subject policy");
|
|
243
253
|
if (!["npm-trusted-publisher", "github-token", "oidc-role"].includes(publisherMode)) {
|
|
244
254
|
throw new Error(`unsupported --publisher-mode: ${publisherMode}`);
|
|
@@ -277,10 +287,24 @@ function main() {
|
|
|
277
287
|
message: sourceMessage,
|
|
278
288
|
changedPaths: sourceChangedPaths,
|
|
279
289
|
};
|
|
290
|
+
const branchHeadSha = String(branchState.commit?.sha || "").toLowerCase();
|
|
291
|
+
const sourceComparison = sourceSha === branchHeadSha
|
|
292
|
+
? null
|
|
293
|
+
: githubJson(
|
|
294
|
+
`repos/${repository}/compare/${sourceSha}...${branchHeadSha}`,
|
|
295
|
+
"source protected-branch lineage",
|
|
296
|
+
);
|
|
297
|
+
const sourceContainedInBranch = sourceSha === branchHeadSha || (
|
|
298
|
+
sourceComparison?.status === "ahead" &&
|
|
299
|
+
String(sourceComparison?.merge_base_commit?.sha || "").toLowerCase() === sourceSha
|
|
300
|
+
);
|
|
280
301
|
let pullRequests = githubJson(`repos/${repository}/commits/${authorizationSha}/pulls`, "source pull-request lineage");
|
|
281
302
|
let mergedPullRequest = (Array.isArray(pullRequests) ? pullRequests : []).find((entry) =>
|
|
282
303
|
entry?.merged_at &&
|
|
283
|
-
|
|
304
|
+
(
|
|
305
|
+
String(entry.merge_commit_sha || "").toLowerCase() === authorizationSha ||
|
|
306
|
+
String(entry.head?.sha || "").toLowerCase() === authorizationSha
|
|
307
|
+
) &&
|
|
284
308
|
entry.base?.ref === branch &&
|
|
285
309
|
entry.head?.repo?.full_name === repository
|
|
286
310
|
);
|
|
@@ -318,10 +342,12 @@ function main() {
|
|
|
318
342
|
const login = String(review?.user?.login || "");
|
|
319
343
|
if (login) latestReviews.set(login, review);
|
|
320
344
|
}
|
|
345
|
+
const pullRequestHeadSha = String(mergedPullRequest?.head?.sha || "").toLowerCase();
|
|
321
346
|
const independentApprovals = [...latestReviews.values()].filter((review) =>
|
|
322
|
-
review.state === "APPROVED" &&
|
|
347
|
+
review.state === "APPROVED" &&
|
|
348
|
+
review.user?.login !== mergedPullRequest?.user?.login &&
|
|
349
|
+
String(review.commit_id || "").toLowerCase() === pullRequestHeadSha
|
|
323
350
|
);
|
|
324
|
-
const pullRequestHeadSha = String(mergedPullRequest?.head?.sha || "").toLowerCase();
|
|
325
351
|
const checkRuns = /^[0-9a-f]{40}$/.test(pullRequestHeadSha)
|
|
326
352
|
? githubJson(`repos/${repository}/commits/${pullRequestHeadSha}/check-runs?per_page=100`, "merged pull-request head check runs")
|
|
327
353
|
: { check_runs: [] };
|
|
@@ -360,7 +386,8 @@ function main() {
|
|
|
360
386
|
requiredCheckSha: pullRequestHeadSha,
|
|
361
387
|
sourceSha,
|
|
362
388
|
authorizationSha,
|
|
363
|
-
headSha:
|
|
389
|
+
headSha: branchHeadSha,
|
|
390
|
+
sourceContainedInBranch,
|
|
364
391
|
releaseReconciliation,
|
|
365
392
|
mergedPullRequest: Boolean(mergedPullRequest),
|
|
366
393
|
pullRequestNumber: mergedPullRequest?.number || 0,
|
|
@@ -437,6 +464,13 @@ function main() {
|
|
|
437
464
|
protected: (environmentState.protection_rules || []).length > 0 ||
|
|
438
465
|
environmentState.deployment_branch_policy?.protected_branches === true ||
|
|
439
466
|
(deploymentBranches.branch_policies || []).length > 0,
|
|
467
|
+
branchAuthorized: environmentBranchAuthorized,
|
|
468
|
+
branchPolicyMode: environmentState.deployment_branch_policy?.protected_branches === true
|
|
469
|
+
? "protected-branches"
|
|
470
|
+
: exactEnvironmentBranchPolicy
|
|
471
|
+
? "exact-custom-branch"
|
|
472
|
+
: "unqualified",
|
|
473
|
+
authorizedBranch: exactEnvironmentBranchPolicy?.name || "",
|
|
440
474
|
reviewRequired: reviewRules.length > 0,
|
|
441
475
|
preventSelfReview: reviewRules.some((rule) => rule.prevent_self_review === true),
|
|
442
476
|
},
|