@kungfu-tech/buildchain 2.12.6 → 2.12.7-alpha.1
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/actions/promote-buildchain-ref/README.md +7 -3
- package/bin/buildchain.mjs +78 -0
- package/dist/site/agent-index.json +1 -0
- package/dist/site/artifact-schemas.json +1 -0
- package/dist/site/buildchain-contract.json +137 -37
- package/dist/site/buildchain-site.json +68 -12
- package/dist/site/capability-registry.json +6 -5
- package/dist/site/cli-registry.json +36 -0
- package/dist/site/controller-registry.json +104 -13
- package/dist/site/kfd-claims.json +251 -15
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +15 -1
- package/dist/site/node-api-registry.json +43 -4
- package/dist/site/page-registry.json +54 -7
- package/dist/site/public-surface-audit.json +150 -17
- package/dist/site/publication-authority-registry.json +754 -0
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +4 -0
- package/dist/site/site-manifest.json +14 -5
- package/dist/site/workflow-registry.json +108 -10
- package/docs/MAP.md +2 -1
- package/docs/publication-artifacts.md +12 -10
- package/docs/publication-authority.md +204 -0
- package/package.json +5 -1
- package/packages/core/buildchain-kfd-claims.js +5 -0
- package/packages/core/buildchain-publication-authority.js +79 -0
- package/packages/core/controller-evidence.js +7 -7
- package/packages/core/index.js +28 -0
- package/packages/core/publication-authority.js +725 -0
- package/packages/core/publication-control-plane-audit.js +133 -0
- package/scripts/assemble-self-publication-admission.mjs +182 -0
- package/scripts/audit-publication-control-plane.mjs +406 -0
- package/scripts/check-inventory.mjs +20 -2
- package/scripts/generate-site-bundle.mjs +16 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import { createPublicationAuthorityRegistry } from "./publication-authority.js";
|
|
5
|
+
|
|
6
|
+
const DESCRIPTORS = Object.freeze([
|
|
7
|
+
[".github/workflows/.build.yml", "non-publication-oidc"],
|
|
8
|
+
[".github/workflows/.publication-authority.yml", "evidence-publication"],
|
|
9
|
+
[".github/workflows/.release-verify.yml", "governance-write"],
|
|
10
|
+
[".github/workflows/.sam-release.yml", "retired-deny"],
|
|
11
|
+
[".github/workflows/.sam-verify.yml", "retired-deny"],
|
|
12
|
+
[".github/workflows/.sync-remote-git.yml", "governance-write"],
|
|
13
|
+
[".github/workflows/.web-surface.yml", "product-publication", true, ["web-production"], "oidc", "consumer-defined", "caller-bound", "caller-bound"],
|
|
14
|
+
[".github/workflows/.wheel-release.yml", "retired-deny"],
|
|
15
|
+
[".github/workflows/.wheel-verify.yml", "retired-deny"],
|
|
16
|
+
[".github/workflows/.binary-release-assets.yml", "product-publication", true, ["github-release"], "github-token", "buildchain-release-assets"],
|
|
17
|
+
[".github/workflows/binary-distribution.yml", "evidence-publication"],
|
|
18
|
+
[".github/workflows/binary-release-assets.yml", "governance-write"],
|
|
19
|
+
[".github/workflows/build-surface-fixture.yml", "non-publication-oidc"],
|
|
20
|
+
[".github/workflows/build.yml", "non-publication-oidc"],
|
|
21
|
+
[".github/workflows/buildchain-alpha-self-dogfood.yml", "non-publication-oidc"],
|
|
22
|
+
[".github/workflows/buildchain-patrol-daily.yml", "governance-write"],
|
|
23
|
+
[".github/workflows/buildchain-patrol-monthly.yml", "governance-write"],
|
|
24
|
+
[".github/workflows/buildchain-patrol-weekly.yml", "governance-write"],
|
|
25
|
+
[".github/workflows/buildchain-patrol.yml", "governance-write"],
|
|
26
|
+
[".github/workflows/buildchain-ref-promotion.yml", "governance-write"],
|
|
27
|
+
[".github/workflows/buildchain-stable-candidate-patrol.yml", "governance-write"],
|
|
28
|
+
[".github/workflows/dev-pr-auto-merge.yml", "governance-write"],
|
|
29
|
+
[".github/workflows/npm-publish.yml", "dry-run-only"],
|
|
30
|
+
[".github/workflows/paper-release.yml", "product-publication", true, ["npm-publish", "github-release"], "trusted-publishing", "none", "fixed", "caller-bound"],
|
|
31
|
+
[".github/workflows/patrol-daily.yml", "governance-write"],
|
|
32
|
+
[".github/workflows/patrol-monthly.yml", "governance-write"],
|
|
33
|
+
[".github/workflows/patrol-weekly.yml", "governance-write"],
|
|
34
|
+
[".github/workflows/publication-artifact.yml", "evidence-publication"],
|
|
35
|
+
[".github/workflows/release-candidate-promote.yml", "product-publication", true, ["npm-publish", "github-release", "channel-ref"], "trusted-publishing", "none", "fixed", "caller-bound"],
|
|
36
|
+
[".github/workflows/release-line-bootstrap.yml", "governance-write"],
|
|
37
|
+
[".github/workflows/release-propagation.yml", "governance-write"],
|
|
38
|
+
[".github/workflows/release-verify.yml", "governance-write"],
|
|
39
|
+
[".github/workflows/stable-candidate-patrol.yml", "governance-write"],
|
|
40
|
+
]);
|
|
41
|
+
|
|
42
|
+
export function buildchainPublicationAuthorityDescriptors() {
|
|
43
|
+
return DESCRIPTORS.map(([
|
|
44
|
+
workflowPath,
|
|
45
|
+
authorityClass,
|
|
46
|
+
publicationCapable = false,
|
|
47
|
+
capabilityIds = [],
|
|
48
|
+
credentialMode = "none",
|
|
49
|
+
environment = "",
|
|
50
|
+
environmentMode = "fixed",
|
|
51
|
+
publisherWorkflowMode = "fixed",
|
|
52
|
+
publisherWorkflowPath = workflowPath,
|
|
53
|
+
]) => ({
|
|
54
|
+
workflowPath,
|
|
55
|
+
authorityClass,
|
|
56
|
+
publicationCapable,
|
|
57
|
+
capabilityIds,
|
|
58
|
+
credentialMode,
|
|
59
|
+
publisherWorkflowMode,
|
|
60
|
+
publisherWorkflowPath,
|
|
61
|
+
environment,
|
|
62
|
+
environmentMode,
|
|
63
|
+
runnerPolicy: publicationCapable ? "qualified-measured" : "unqualified",
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function createBuildchainPublicationAuthorityRegistry({ root = process.cwd() } = {}) {
|
|
68
|
+
const workflowsDir = path.join(root, ".github", "workflows");
|
|
69
|
+
const workflows = fs.readdirSync(workflowsDir)
|
|
70
|
+
.filter((name) => name.endsWith(".yml") || name.endsWith(".yaml"))
|
|
71
|
+
.map((name) => ({
|
|
72
|
+
path: `.github/workflows/${name}`,
|
|
73
|
+
text: fs.readFileSync(path.join(workflowsDir, name), "utf8"),
|
|
74
|
+
}));
|
|
75
|
+
return createPublicationAuthorityRegistry({
|
|
76
|
+
descriptors: buildchainPublicationAuthorityDescriptors(),
|
|
77
|
+
workflows,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
@@ -47,9 +47,9 @@ const CONTROLLER_SPECS = [
|
|
|
47
47
|
id: "web-surface",
|
|
48
48
|
workflowId: ".web-surface",
|
|
49
49
|
version: 1,
|
|
50
|
-
capabilities: ["web-build", "web-verify", "deployment-plan", "deployment-apply"],
|
|
51
|
-
stages: ["resolve-runtime", "plan", "build", "verify", "apply", "aggregate"],
|
|
52
|
-
optionalStages: ["build", "verify", "apply"],
|
|
50
|
+
capabilities: ["web-build", "web-verify", "deployment-plan", "deployment-apply", "publication-authority"],
|
|
51
|
+
stages: ["resolve-runtime", "plan", "build", "verify", "publication-authority", "apply", "aggregate"],
|
|
52
|
+
optionalStages: ["build", "verify", "publication-authority", "apply"],
|
|
53
53
|
evidence: ["web-surface-plan", "controller-receipt"],
|
|
54
54
|
},
|
|
55
55
|
{
|
|
@@ -65,8 +65,8 @@ const CONTROLLER_SPECS = [
|
|
|
65
65
|
id: "paper-release",
|
|
66
66
|
workflowId: "paper-release",
|
|
67
67
|
version: 1,
|
|
68
|
-
capabilities: ["publication-build", "artifact-admission", "release-publish", "release-passport"],
|
|
69
|
-
stages: ["resolve-runtime", "build", "verify", "collect", "publish", "passport", "aggregate"],
|
|
68
|
+
capabilities: ["publication-build", "artifact-admission", "publication-authority", "release-publish", "release-passport"],
|
|
69
|
+
stages: ["resolve-runtime", "build", "verify", "collect", "publication-authority", "publish", "passport", "aggregate"],
|
|
70
70
|
optionalStages: ["verify"],
|
|
71
71
|
evidence: ["publication-manifest", "release-passport", "controller-receipt"],
|
|
72
72
|
},
|
|
@@ -74,8 +74,8 @@ const CONTROLLER_SPECS = [
|
|
|
74
74
|
id: "release-candidate-promotion",
|
|
75
75
|
workflowId: "release-candidate-promote",
|
|
76
76
|
version: 1,
|
|
77
|
-
capabilities: ["promotion-preflight", "artifact-admission", "publish-transaction", "release-passport"],
|
|
78
|
-
stages: ["preflight", "admit-release-candidate", "publish", "passport", "aggregate"],
|
|
77
|
+
capabilities: ["promotion-preflight", "artifact-admission", "publication-authority", "publish-transaction", "release-passport"],
|
|
78
|
+
stages: ["preflight", "admit-release-candidate", "publication-authority", "publish", "passport", "aggregate"],
|
|
79
79
|
evidence: ["release-candidate-passport", "publish-evidence", "release-passport", "controller-receipt"],
|
|
80
80
|
},
|
|
81
81
|
{
|
package/packages/core/index.js
CHANGED
|
@@ -132,6 +132,34 @@ export {
|
|
|
132
132
|
preparePublicationNpmPackage,
|
|
133
133
|
} from "./publication-package.js";
|
|
134
134
|
|
|
135
|
+
export {
|
|
136
|
+
PUBLICATION_ADMISSION_CONTRACT,
|
|
137
|
+
PUBLICATION_ARTIFACT_MANIFEST_SET_CONTRACT,
|
|
138
|
+
PUBLICATION_AUTHORITY_CLASSES,
|
|
139
|
+
PUBLICATION_AUTHORITY_REGISTRY_CONTRACT,
|
|
140
|
+
PUBLICATION_CAPABILITY_CONTRACT,
|
|
141
|
+
PUBLICATION_CONTROL_PLANE_AUDIT_CONTRACT,
|
|
142
|
+
PUBLICATION_GATE_DECISION_CONTRACT,
|
|
143
|
+
RUNNER_PROVENANCE_CLASSES,
|
|
144
|
+
RUNNER_PROVENANCE_CONTRACT,
|
|
145
|
+
createPublicationAuthorityRegistry,
|
|
146
|
+
createPublicationAdmission,
|
|
147
|
+
createPublicationArtifactManifestSet,
|
|
148
|
+
createPublicationControlPlaneAudit,
|
|
149
|
+
createPublicationGateDecision,
|
|
150
|
+
createRunnerProvenance,
|
|
151
|
+
detectPublicationAuthoritySignals,
|
|
152
|
+
publicationAuthorityDigest,
|
|
153
|
+
verifyPublicationAdmission,
|
|
154
|
+
} from "./publication-authority.js";
|
|
155
|
+
|
|
156
|
+
export {
|
|
157
|
+
buildchainPublicationAuthorityDescriptors,
|
|
158
|
+
createBuildchainPublicationAuthorityRegistry,
|
|
159
|
+
} from "./buildchain-publication-authority.js";
|
|
160
|
+
|
|
161
|
+
export { evaluatePublicationControlPlaneSnapshot } from "./publication-control-plane-audit.js";
|
|
162
|
+
|
|
135
163
|
export {
|
|
136
164
|
ARTIFACT_PASSPORT_LOCATOR_CONTRACT,
|
|
137
165
|
ARTIFACT_PASSPORT_POINTER_CONTRACT,
|