@cleocode/cleo 2026.3.4 → 2026.3.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.
- package/dist/cli/index.js +2277 -609
- package/dist/cli/index.js.map +4 -4
- package/dist/mcp/index.js +1838 -443
- package/dist/mcp/index.js.map +4 -4
- package/package.json +1 -1
- package/packages/ct-skills/index.js +1 -1
- package/packages/ct-skills/package.json +0 -2
- package/packages/ct-skills/profiles/core.json +1 -1
- package/packages/ct-skills/profiles/full.json +4 -5
- package/packages/ct-skills/profiles/minimal.json +3 -3
- package/packages/ct-skills/profiles/recommended.json +2 -2
- package/packages/ct-skills/provider-skills-map.json +97 -0
- package/packages/ct-skills/skills/_shared/skill-chaining-patterns.md +23 -26
- package/packages/ct-skills/skills/_shared/testing-framework-config.md +9 -9
- package/packages/ct-skills/skills/ct-cleo/SKILL.md +21 -1
- package/packages/ct-skills/skills/ct-dev-workflow/SKILL.md +1 -1
- package/packages/ct-skills/skills/ct-documentor/SKILL.md +1 -1
- package/packages/ct-skills/skills/ct-epic-architect/SKILL.md +1 -1
- package/packages/ct-skills/skills/ct-orchestrator/SKILL.md +119 -43
- package/packages/ct-skills/skills/ct-orchestrator/orchestrator-prompt.txt +17 -0
- package/packages/ct-skills/skills/ct-orchestrator/references/orchestrator-patterns.md +1 -1
- package/packages/ct-skills/skills/ct-research-agent/SKILL.md +1 -1
- package/packages/ct-skills/skills/ct-spec-writer/SKILL.md +1 -1
- package/packages/ct-skills/skills/ct-task-executor/SKILL.md +1 -1
- package/packages/ct-skills/skills/ct-validator/SKILL.md +1 -1
- package/packages/ct-skills/skills/manifest.json +217 -947
- package/packages/ct-skills/skills.json +244 -3
- package/templates/CLEO-INJECTION.md +24 -0
- package/packages/ct-skills/protocols/agent-protocol.md +0 -260
- package/packages/ct-skills/protocols/artifact-publish.md +0 -587
- package/packages/ct-skills/protocols/consensus.md +0 -309
- package/packages/ct-skills/protocols/contribution.md +0 -375
- package/packages/ct-skills/protocols/decomposition.md +0 -352
- package/packages/ct-skills/protocols/implementation.md +0 -344
- package/packages/ct-skills/protocols/provenance.md +0 -600
- package/packages/ct-skills/protocols/release.md +0 -635
- package/packages/ct-skills/protocols/research.md +0 -248
- package/packages/ct-skills/protocols/specification.md +0 -287
- package/packages/ct-skills/protocols/testing.md +0 -346
- package/packages/ct-skills/protocols/validation.md +0 -229
- package/packages/ct-skills/skills/ct-gitbook/SKILL.md +0 -516
- package/packages/ct-skills/skills/ct-gitbook/assets/SUMMARY.md +0 -28
- package/packages/ct-skills/skills/ct-gitbook/assets/gitbook.yaml +0 -14
- package/packages/ct-skills/skills/ct-gitbook/references/api-sdk.md +0 -318
- package/packages/ct-skills/skills/ct-gitbook/references/auth-sso.md +0 -208
- package/packages/ct-skills/skills/ct-gitbook/references/change-requests.md +0 -169
- package/packages/ct-skills/skills/ct-gitbook/references/content-blocks.md +0 -230
- package/packages/ct-skills/skills/ct-gitbook/references/docs-sites.md +0 -202
- package/packages/ct-skills/skills/ct-gitbook/references/git-sync.md +0 -175
- package/packages/ct-skills/skills/ct-gitbook/references/llm-ready.md +0 -178
- package/packages/ct-skills/skills/ct-gitbook/references/migration.md +0 -263
- package/packages/ct-skills/skills/ct-library-implementer-bash/SKILL.md +0 -316
- package/packages/ct-skills/skills/ct-skill-lookup/SKILL.md +0 -179
- package/packages/ct-skills/skills/ct-test-writer-bats/SKILL.md +0 -347
- package/packages/ct-skills/skills/railway-platform/SKILL.md +0 -506
- package/packages/ct-skills/skills/railway-platform/_shared/scripts/railway-api.sh +0 -180
- package/packages/ct-skills/skills/railway-platform/_shared/scripts/railway-common.sh +0 -262
- package/packages/ct-skills/skills/railway-platform/references/01-getting-started.md +0 -149
- package/packages/ct-skills/skills/railway-platform/references/02-projects.md +0 -116
- package/packages/ct-skills/skills/railway-platform/references/03-services.md +0 -147
- package/packages/ct-skills/skills/railway-platform/references/04-deployments.md +0 -210
- package/packages/ct-skills/skills/railway-platform/references/05-databases.md +0 -142
- package/packages/ct-skills/skills/railway-platform/references/06-environments.md +0 -261
- package/packages/ct-skills/skills/railway-platform/references/07-domains.md +0 -139
- package/packages/ct-skills/skills/railway-platform/references/08-volumes.md +0 -533
- package/packages/ct-skills/skills/railway-platform/references/09-networking.md +0 -592
- package/packages/ct-skills/skills/railway-platform/references/10-cron.md +0 -488
- package/packages/ct-skills/skills/railway-platform/references/11-functions.md +0 -170
- package/packages/ct-skills/skills/railway-platform/references/12-monorepo.md +0 -294
- package/packages/ct-skills/skills/railway-platform/references/13-troubleshooting.md +0 -335
- package/packages/ct-skills/skills/railway-platform/references/14-railway-metal.md +0 -197
|
@@ -1,600 +0,0 @@
|
|
|
1
|
-
# Provenance Protocol
|
|
2
|
-
|
|
3
|
-
**Version**: 1.0.0
|
|
4
|
-
**Type**: Conditional Protocol
|
|
5
|
-
**Max Active**: 3 protocols (including base)
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Trigger Conditions
|
|
10
|
-
|
|
11
|
-
This protocol activates when the task involves:
|
|
12
|
-
|
|
13
|
-
| Trigger | Keywords | Context |
|
|
14
|
-
|---------|----------|---------|
|
|
15
|
-
| Supply Chain | "provenance", "supply chain", "chain of custody" | Artifact traceability |
|
|
16
|
-
| Attestation | "attest", "attestation", "in-toto", "SLSA" | Cryptographic evidence |
|
|
17
|
-
| SBOM | "sbom", "bill of materials", "cyclonedx", "spdx" | Dependency inventory |
|
|
18
|
-
| Signing | "sign", "cosign", "sigstore", "verify signature" | Artifact integrity |
|
|
19
|
-
| Checksums | "checksum", "digest", "sha256", "integrity" | Content verification |
|
|
20
|
-
|
|
21
|
-
**Explicit Override**: `--protocol provenance` flag on task creation.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Requirements (RFC 2119)
|
|
26
|
-
|
|
27
|
-
### MUST
|
|
28
|
-
|
|
29
|
-
| Requirement | Description |
|
|
30
|
-
|-------------|-------------|
|
|
31
|
-
| PROV-001 | MUST record provenance chain from source commit to published artifact |
|
|
32
|
-
| PROV-002 | MUST compute SHA-256 digest for every produced artifact |
|
|
33
|
-
| PROV-003 | MUST generate attestation in in-toto Statement v1 format |
|
|
34
|
-
| PROV-004 | MUST record SLSA Build Level achieved (L1 minimum) |
|
|
35
|
-
| PROV-005 | MUST store provenance record in `.cleo/releases.json` via `record_release()` |
|
|
36
|
-
| PROV-006 | MUST verify provenance chain integrity before publishing attestation |
|
|
37
|
-
| PROV-007 | MUST set `agent_type: "provenance"` in manifest |
|
|
38
|
-
|
|
39
|
-
### SHOULD
|
|
40
|
-
|
|
41
|
-
| Requirement | Description |
|
|
42
|
-
|-------------|-------------|
|
|
43
|
-
| PROV-010 | SHOULD generate SBOM (CycloneDX or SPDX) for artifacts with dependencies |
|
|
44
|
-
| PROV-011 | SHOULD sign attestations using keyless signing (sigstore/cosign) |
|
|
45
|
-
| PROV-012 | SHOULD publish provenance attestation alongside artifact |
|
|
46
|
-
| PROV-013 | SHOULD verify all input materials (dependencies, base images) have provenance |
|
|
47
|
-
|
|
48
|
-
### MAY
|
|
49
|
-
|
|
50
|
-
| Requirement | Description |
|
|
51
|
-
|-------------|-------------|
|
|
52
|
-
| PROV-020 | MAY achieve SLSA Build Level 3 or 4 |
|
|
53
|
-
| PROV-021 | MAY use key-based signing (GPG) as alternative to keyless |
|
|
54
|
-
| PROV-022 | MAY generate multiple SBOM formats (both CycloneDX and SPDX) |
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Provenance Chain Model
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
commit --> build --> artifact --> attestation --> registry
|
|
62
|
-
| | | | |
|
|
63
|
-
sha log digest signature published
|
|
64
|
-
| | | | |
|
|
65
|
-
source env checksum certificate location
|
|
66
|
-
identity capture file bundle URL
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### Chain Links
|
|
70
|
-
|
|
71
|
-
| Stage | Input | Output | Required Field |
|
|
72
|
-
|-------|-------|--------|----------------|
|
|
73
|
-
| Source | Repository URL | Commit SHA | `invocation.configSource.digest.sha1` |
|
|
74
|
-
| Build | Commit + Config | Build log | `metadata.buildInvocationId` |
|
|
75
|
-
| Artifact | Build output | File + SHA-256 | `artifacts[].sha256` |
|
|
76
|
-
| Attestation | Artifact digest | in-toto Statement | `attestation.predicateType` |
|
|
77
|
-
| Registry | Attestation + Artifact | Published URL | `artifacts[].registry` |
|
|
78
|
-
|
|
79
|
-
### Chain Integrity Rules
|
|
80
|
-
|
|
81
|
-
| Rule | Enforcement |
|
|
82
|
-
|------|-------------|
|
|
83
|
-
| Each link MUST reference previous link's output | `verify_provenance_chain()` validates |
|
|
84
|
-
| No link MAY be modified after creation | Append-only in `releases.json` |
|
|
85
|
-
| Missing links MUST be recorded as `incomplete` | `metadata.completeness` flags |
|
|
86
|
-
| Chain MUST be verifiable offline | Digests stored locally |
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## SLSA Compliance Levels
|
|
91
|
-
|
|
92
|
-
### Requirements Matrix
|
|
93
|
-
|
|
94
|
-
| Requirement | L1 | L2 | L3 | L4 |
|
|
95
|
-
|-------------|:--:|:--:|:--:|:--:|
|
|
96
|
-
| Provenance exists | MUST | MUST | MUST | MUST |
|
|
97
|
-
| Provenance is signed | -- | MUST | MUST | MUST |
|
|
98
|
-
| Build on hosted platform | -- | MUST | MUST | MUST |
|
|
99
|
-
| Non-falsifiable provenance | -- | -- | MUST | MUST |
|
|
100
|
-
| All dependencies have provenance | -- | -- | -- | MUST |
|
|
101
|
-
| Two-party review | -- | -- | -- | MUST |
|
|
102
|
-
| Hermetic, reproducible build | -- | -- | -- | MUST |
|
|
103
|
-
|
|
104
|
-
### Level Detection Decision Tree
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
HAS provenance record?
|
|
108
|
-
+-- NO -> Level 0 (non-compliant)
|
|
109
|
-
+-- YES
|
|
110
|
-
+-- IS provenance signed?
|
|
111
|
-
| +-- NO -> Level 1
|
|
112
|
-
| +-- YES
|
|
113
|
-
| +-- IS build on hosted/isolated platform?
|
|
114
|
-
| | +-- NO -> Level 1
|
|
115
|
-
| | +-- YES
|
|
116
|
-
| | +-- IS build non-falsifiable?
|
|
117
|
-
| | | +-- NO -> Level 2
|
|
118
|
-
| | | +-- YES
|
|
119
|
-
| | | +-- ALL deps pinned + hermetic + reproducible?
|
|
120
|
-
| | | | +-- NO -> Level 3
|
|
121
|
-
| | | | +-- YES -> Level 4
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Configuration
|
|
125
|
-
|
|
126
|
-
```json
|
|
127
|
-
{
|
|
128
|
-
"release": {
|
|
129
|
-
"security": {
|
|
130
|
-
"provenance": {
|
|
131
|
-
"enabled": true,
|
|
132
|
-
"framework": "slsa",
|
|
133
|
-
"level": "SLSA_BUILD_LEVEL_3"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
## Attestation Schema
|
|
143
|
-
|
|
144
|
-
### in-toto Statement (v1)
|
|
145
|
-
|
|
146
|
-
```json
|
|
147
|
-
{
|
|
148
|
-
"_type": "https://in-toto.io/Statement/v1",
|
|
149
|
-
"subject": [
|
|
150
|
-
{
|
|
151
|
-
"name": "<artifact-name>",
|
|
152
|
-
"digest": {
|
|
153
|
-
"sha256": "<64-hex-chars>"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
],
|
|
157
|
-
"predicateType": "https://slsa.dev/provenance/v1",
|
|
158
|
-
"predicate": {
|
|
159
|
-
"buildDefinition": {
|
|
160
|
-
"buildType": "<build-system-uri>",
|
|
161
|
-
"externalParameters": {
|
|
162
|
-
"source": {
|
|
163
|
-
"uri": "git+<repo-url>",
|
|
164
|
-
"digest": { "sha1": "<commit-sha>" }
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
"internalParameters": {},
|
|
168
|
-
"resolvedDependencies": [
|
|
169
|
-
{
|
|
170
|
-
"uri": "<dependency-uri>",
|
|
171
|
-
"digest": { "sha256": "<dep-digest>" }
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
"runDetails": {
|
|
176
|
-
"builder": {
|
|
177
|
-
"id": "<builder-id-uri>"
|
|
178
|
-
},
|
|
179
|
-
"metadata": {
|
|
180
|
-
"invocationId": "<unique-build-id>",
|
|
181
|
-
"startedOn": "<ISO-8601>",
|
|
182
|
-
"finishedOn": "<ISO-8601>"
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Required Fields
|
|
190
|
-
|
|
191
|
-
| Field | Required | Validation |
|
|
192
|
-
|-------|----------|------------|
|
|
193
|
-
| `subject[].digest.sha256` | MUST | 64-char hex, matches artifact |
|
|
194
|
-
| `predicateType` | MUST | Valid SLSA provenance URI |
|
|
195
|
-
| `buildDefinition.buildType` | MUST | Non-empty URI |
|
|
196
|
-
| `runDetails.builder.id` | MUST | Non-empty URI |
|
|
197
|
-
| `runDetails.metadata.invocationId` | SHOULD | Unique per build |
|
|
198
|
-
| `buildDefinition.resolvedDependencies` | SHOULD (L3+) | Array of URI+digest pairs |
|
|
199
|
-
|
|
200
|
-
### Storage Locations
|
|
201
|
-
|
|
202
|
-
| Location | Format | Purpose |
|
|
203
|
-
|----------|--------|---------|
|
|
204
|
-
| `.cleo/attestations/<version>.intoto.jsonl` | in-toto Statement (DSSE envelope) | Local attestation store |
|
|
205
|
-
| `<artifact>.att` | DSSE envelope (JSON) | Bundled with artifact |
|
|
206
|
-
| OCI registry (tag: `sha256-<digest>.att`) | Cosign attachment | Registry-hosted attestation |
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
## SBOM Requirements
|
|
211
|
-
|
|
212
|
-
### When to Generate
|
|
213
|
-
|
|
214
|
-
| Condition | SBOM Required |
|
|
215
|
-
|-----------|:-------------:|
|
|
216
|
-
| Artifact has runtime dependencies | MUST |
|
|
217
|
-
| Docker/OCI image | MUST |
|
|
218
|
-
| Library/package published to registry | MUST |
|
|
219
|
-
| Standalone binary with no deps | SHOULD |
|
|
220
|
-
| Documentation-only artifact | MAY skip |
|
|
221
|
-
|
|
222
|
-
### Supported Formats
|
|
223
|
-
|
|
224
|
-
| Format | Spec Version | Use Case |
|
|
225
|
-
|--------|-------------|----------|
|
|
226
|
-
| CycloneDX | 1.5+ | Default (machine-readable, JSON) |
|
|
227
|
-
| SPDX | 2.3+ | Compliance-focused (regulatory) |
|
|
228
|
-
|
|
229
|
-
### Minimum Schema (CycloneDX)
|
|
230
|
-
|
|
231
|
-
```json
|
|
232
|
-
{
|
|
233
|
-
"bomFormat": "CycloneDX",
|
|
234
|
-
"specVersion": "1.5",
|
|
235
|
-
"version": 1,
|
|
236
|
-
"metadata": {
|
|
237
|
-
"timestamp": "<ISO-8601>",
|
|
238
|
-
"tools": [{ "name": "<generator>", "version": "<version>" }],
|
|
239
|
-
"component": {
|
|
240
|
-
"type": "application",
|
|
241
|
-
"name": "<artifact-name>",
|
|
242
|
-
"version": "<artifact-version>",
|
|
243
|
-
"purl": "<package-url>"
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
"components": [
|
|
247
|
-
{
|
|
248
|
-
"type": "library",
|
|
249
|
-
"name": "<dep-name>",
|
|
250
|
-
"version": "<dep-version>",
|
|
251
|
-
"purl": "<dep-purl>",
|
|
252
|
-
"hashes": [{ "alg": "SHA-256", "content": "<hex-digest>" }]
|
|
253
|
-
}
|
|
254
|
-
]
|
|
255
|
-
}
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### Storage
|
|
259
|
-
|
|
260
|
-
| Location | Purpose |
|
|
261
|
-
|----------|---------|
|
|
262
|
-
| `.cleo/sbom/<artifact-name>-<version>.cdx.json` | CycloneDX local store |
|
|
263
|
-
| `.cleo/sbom/<artifact-name>-<version>.spdx.json` | SPDX local store |
|
|
264
|
-
| `<artifact>.sbom.json` | Bundled with artifact |
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## Signing Protocol
|
|
269
|
-
|
|
270
|
-
### Method Decision Tree
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
SIGNING_METHOD configured?
|
|
274
|
-
+-- "sigstore" (default)
|
|
275
|
-
| +-- IS keyless enabled? (default: true)
|
|
276
|
-
| +-- YES -> cosign sign-blob --yes <artifact>
|
|
277
|
-
| +-- NO -> cosign sign-blob --key <key-ref> <artifact>
|
|
278
|
-
+-- "gpg"
|
|
279
|
-
| +-- GPG_KEY_ID set?
|
|
280
|
-
| +-- YES -> gpg --detach-sign --armor -u <key-id> <artifact>
|
|
281
|
-
| +-- NO -> Exit 91 (E_SIGNING_KEY_MISSING)
|
|
282
|
-
+-- "none"
|
|
283
|
-
+-- Skip signing (SLSA L1 only)
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### Command Templates
|
|
287
|
-
|
|
288
|
-
| Method | Command | Output |
|
|
289
|
-
|--------|---------|--------|
|
|
290
|
-
| Sigstore (keyless) | `cosign sign-blob --yes --output-signature <sig> --output-certificate <cert> <artifact>` | `.sig` + `.pem` |
|
|
291
|
-
| Sigstore (key) | `cosign sign-blob --key <ref> --output-signature <sig> <artifact>` | `.sig` |
|
|
292
|
-
| GPG | `gpg --detach-sign --armor -u <key-id> <artifact>` | `.asc` |
|
|
293
|
-
| None | (skip) | (none) |
|
|
294
|
-
|
|
295
|
-
### Signing Metadata Record
|
|
296
|
-
|
|
297
|
-
```json
|
|
298
|
-
{
|
|
299
|
-
"method": "sigstore",
|
|
300
|
-
"keyless": true,
|
|
301
|
-
"signed": true,
|
|
302
|
-
"signedAt": "<ISO-8601>",
|
|
303
|
-
"signature": "<path-to-sig>",
|
|
304
|
-
"certificate": "<path-to-cert>",
|
|
305
|
-
"transparencyLog": {
|
|
306
|
-
"index": "<rekor-log-index>",
|
|
307
|
-
"url": "https://rekor.sigstore.dev"
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
### Validation
|
|
313
|
-
|
|
314
|
-
| Check | Condition | Exit Code |
|
|
315
|
-
|-------|-----------|-----------|
|
|
316
|
-
| Method configured | `signing.method` in `["sigstore", "gpg", "none"]` | 90 |
|
|
317
|
-
| Key available (if key-based) | Key reference resolves | 91 |
|
|
318
|
-
| Signature produced | `.sig` or `.asc` file exists | 92 |
|
|
319
|
-
| Signature verifies | `cosign verify-blob` or `gpg --verify` passes | 92 |
|
|
320
|
-
|
|
321
|
-
---
|
|
322
|
-
|
|
323
|
-
## Verification Protocol
|
|
324
|
-
|
|
325
|
-
### Verification Decision Tree
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
VERIFY artifact provenance:
|
|
329
|
-
+-- 1. Digest check
|
|
330
|
-
| +-- Compute SHA-256, compare to recorded digest
|
|
331
|
-
| +-- MISMATCH -> Exit 93 (E_DIGEST_MISMATCH)
|
|
332
|
-
| +-- MATCH -> continue
|
|
333
|
-
+-- 2. Signature check (if signed)
|
|
334
|
-
| +-- Verify signature against artifact
|
|
335
|
-
| +-- FAIL -> Exit 92 (E_SIGNATURE_INVALID)
|
|
336
|
-
| +-- PASS -> continue
|
|
337
|
-
+-- 3. Attestation check (if exists)
|
|
338
|
-
| +-- Verify attestation subject matches artifact digest
|
|
339
|
-
| +-- MISMATCH -> Exit 94 (E_ATTESTATION_INVALID)
|
|
340
|
-
| +-- MATCH -> continue
|
|
341
|
-
+-- 4. Chain completeness
|
|
342
|
-
+-- Walk chain: commit -> build -> artifact -> attestation
|
|
343
|
-
+-- BROKEN -> report incomplete (warning, not blocking)
|
|
344
|
-
+-- COMPLETE -> VERIFIED
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
### Verification Result Schema
|
|
348
|
-
|
|
349
|
-
```json
|
|
350
|
-
{
|
|
351
|
-
"artifact": "<name>",
|
|
352
|
-
"version": "<version>",
|
|
353
|
-
"verified": true,
|
|
354
|
-
"checks": {
|
|
355
|
-
"digest": { "status": "pass", "algorithm": "sha256", "value": "<hex>" },
|
|
356
|
-
"signature": { "status": "pass", "method": "sigstore" },
|
|
357
|
-
"attestation": { "status": "pass", "predicateType": "https://slsa.dev/provenance/v1" },
|
|
358
|
-
"chain": { "status": "pass", "completeness": { "source": true, "build": true, "artifact": true } }
|
|
359
|
-
},
|
|
360
|
-
"slsaLevel": "SLSA_BUILD_LEVEL_3",
|
|
361
|
-
"verifiedAt": "<ISO-8601>"
|
|
362
|
-
}
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
## Checksum & Digest Management
|
|
368
|
-
|
|
369
|
-
### Supported Algorithms
|
|
370
|
-
|
|
371
|
-
| Algorithm | Required | Use Case |
|
|
372
|
-
|-----------|:--------:|----------|
|
|
373
|
-
| SHA-256 | MUST | All artifacts, attestation subjects |
|
|
374
|
-
| SHA-512 | MAY | High-security contexts |
|
|
375
|
-
|
|
376
|
-
### Computation Per Type
|
|
377
|
-
|
|
378
|
-
| Artifact Type | Input | Command |
|
|
379
|
-
|--------------|-------|---------|
|
|
380
|
-
| File | File path | `sha256sum <file> \| awk '{print $1}'` |
|
|
381
|
-
| Docker image | Image ref | `docker inspect --format='{{.Id}}' <image>` |
|
|
382
|
-
| OCI manifest | Manifest JSON | `sha256sum <manifest.json>` |
|
|
383
|
-
|
|
384
|
-
### Storage Locations
|
|
385
|
-
|
|
386
|
-
| Location | Format | Purpose |
|
|
387
|
-
|----------|--------|---------|
|
|
388
|
-
| `releases.json` -> `artifacts[].sha256` | Hex string (64 chars) | Provenance record |
|
|
389
|
-
| `checksums.txt` (release artifact) | `<sha256> <filename>` | Distribution verification |
|
|
390
|
-
| Attestation `subject[].digest.sha256` | Hex string (64 chars) | Attestation binding |
|
|
391
|
-
|
|
392
|
-
### Publishing Channels
|
|
393
|
-
|
|
394
|
-
| Channel | Format |
|
|
395
|
-
|---------|--------|
|
|
396
|
-
| Git tag annotation | `SHA-256: <hex>` per artifact |
|
|
397
|
-
| GitHub Release body | `## Checksums\n<sha256> <filename>` |
|
|
398
|
-
| Registry metadata | Registry-native digest field |
|
|
399
|
-
| `checksums.txt` file | `<sha256> <filename>` per line |
|
|
400
|
-
|
|
401
|
-
---
|
|
402
|
-
|
|
403
|
-
## Error Codes (90-94)
|
|
404
|
-
|
|
405
|
-
| Code | Constant | Meaning | Recovery |
|
|
406
|
-
|------|----------|---------|----------|
|
|
407
|
-
| 90 | `E_PROVENANCE_CONFIG_INVALID` | Invalid provenance/signing config | Check `.cleo/config.json` security section |
|
|
408
|
-
| 91 | `E_SIGNING_KEY_MISSING` | Signing key not found | Set `GPG_KEY_ID` or configure sigstore keyless |
|
|
409
|
-
| 92 | `E_SIGNATURE_INVALID` | Signature verification failed | Re-sign artifact, check key validity |
|
|
410
|
-
| 93 | `E_DIGEST_MISMATCH` | Computed digest does not match record | Investigate tampering or rebuild artifact |
|
|
411
|
-
| 94 | `E_ATTESTATION_INVALID` | Attestation subject/format error | Regenerate attestation from correct artifact |
|
|
412
|
-
|
|
413
|
-
### Recoverability
|
|
414
|
-
|
|
415
|
-
| Code | Recoverable | Agent Action |
|
|
416
|
-
|------|:-----------:|--------------|
|
|
417
|
-
| 90 | Yes | Fix config, retry |
|
|
418
|
-
| 91 | Yes | Set key, retry |
|
|
419
|
-
| 92 | Yes | Re-sign, retry |
|
|
420
|
-
| 93 | No | Investigate tampering, rebuild |
|
|
421
|
-
| 94 | Yes | Regenerate attestation, retry |
|
|
422
|
-
|
|
423
|
-
### Error Recovery Decision Tree
|
|
424
|
-
|
|
425
|
-
```
|
|
426
|
-
EXIT CODE?
|
|
427
|
-
+-- 90 (CONFIG_INVALID) -> Fix .cleo/config.json security section -> Retry
|
|
428
|
-
+-- 91 (SIGNING_KEY) -> Set GPG_KEY_ID or enable sigstore keyless -> Retry
|
|
429
|
-
+-- 92 (SIGNATURE_INVALID) -> Re-sign artifact with valid key -> Retry
|
|
430
|
-
+-- 93 (DIGEST_MISMATCH) -> Investigate tampering, clean rebuild -> Retry
|
|
431
|
-
+-- 94 (ATTESTATION) -> Regenerate attestation from artifact -> Retry
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
---
|
|
435
|
-
|
|
436
|
-
## Output Format
|
|
437
|
-
|
|
438
|
-
### File Output
|
|
439
|
-
|
|
440
|
-
```markdown
|
|
441
|
-
# Provenance Report: <artifact-name> v<version>
|
|
442
|
-
|
|
443
|
-
**Task**: T####
|
|
444
|
-
**Date**: YYYY-MM-DD
|
|
445
|
-
**Status**: complete|partial|blocked
|
|
446
|
-
**Agent Type**: provenance
|
|
447
|
-
|
|
448
|
-
---
|
|
449
|
-
|
|
450
|
-
## Summary
|
|
451
|
-
|
|
452
|
-
{2-3 sentence summary of provenance activities}
|
|
453
|
-
|
|
454
|
-
## Provenance Chain
|
|
455
|
-
|
|
456
|
-
| Stage | Value | Verified |
|
|
457
|
-
|-------|-------|:--------:|
|
|
458
|
-
| Source commit | `<sha>` | PASS |
|
|
459
|
-
| Build invocation | `<id>` | PASS |
|
|
460
|
-
| Artifact digest | `sha256:<hex>` | PASS |
|
|
461
|
-
| Attestation | `<predicate-type>` | PASS |
|
|
462
|
-
| Signature | `<method>` | PASS |
|
|
463
|
-
|
|
464
|
-
## SLSA Compliance
|
|
465
|
-
|
|
466
|
-
| Check | Status | Notes |
|
|
467
|
-
|-------|--------|-------|
|
|
468
|
-
| Level achieved | L3 | |
|
|
469
|
-
| Provenance exists | PASS | |
|
|
470
|
-
| Provenance signed | PASS | sigstore/keyless |
|
|
471
|
-
| Hardened build | PASS | CI/CD platform |
|
|
472
|
-
|
|
473
|
-
## SBOM
|
|
474
|
-
|
|
475
|
-
| Format | Location | Components |
|
|
476
|
-
|--------|----------|:----------:|
|
|
477
|
-
| CycloneDX 1.5 | `.cleo/sbom/<name>.cdx.json` | 42 |
|
|
478
|
-
|
|
479
|
-
## Verification Results
|
|
480
|
-
|
|
481
|
-
| Artifact | Digest | Signature | Attestation | Chain |
|
|
482
|
-
|----------|:------:|:---------:|:-----------:|:-----:|
|
|
483
|
-
| `<name>` | PASS | PASS | PASS | PASS |
|
|
484
|
-
```
|
|
485
|
-
|
|
486
|
-
### Manifest Entry
|
|
487
|
-
|
|
488
|
-
```bash
|
|
489
|
-
cleo research add \
|
|
490
|
-
--title "Provenance: <artifact-name> v<version>" \
|
|
491
|
-
--file "YYYY-MM-DD_provenance-<artifact>.md" \
|
|
492
|
-
--topics "provenance,supply-chain,slsa,attestation" \
|
|
493
|
-
--findings "SLSA L3 achieved,SHA-256 verified,Attestation signed,SBOM generated" \
|
|
494
|
-
--status complete \
|
|
495
|
-
--task T#### \
|
|
496
|
-
--not-actionable \
|
|
497
|
-
--agent-type provenance
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
---
|
|
501
|
-
|
|
502
|
-
## Integration Points
|
|
503
|
-
|
|
504
|
-
### Base Protocol
|
|
505
|
-
|
|
506
|
-
- Inherits task lifecycle (start, execute, complete)
|
|
507
|
-
- Inherits manifest append requirement
|
|
508
|
-
- Inherits error handling patterns
|
|
509
|
-
|
|
510
|
-
### Protocol Interactions
|
|
511
|
-
|
|
512
|
-
| Combined With | Behavior |
|
|
513
|
-
|---------------|----------|
|
|
514
|
-
| release | Release triggers provenance record via `record_release()` |
|
|
515
|
-
| artifact-publish | Artifact-publish delegates signing/attestation to provenance |
|
|
516
|
-
| implementation | Implementation produces artifacts requiring provenance |
|
|
517
|
-
| contribution | Contribution commits form source stage of chain |
|
|
518
|
-
|
|
519
|
-
### Existing Infrastructure
|
|
520
|
-
|
|
521
|
-
| Function | File | Purpose |
|
|
522
|
-
|----------|------|---------|
|
|
523
|
-
| `record_release()` | `lib/release-provenance.sh` | Store provenance record |
|
|
524
|
-
| `link_task_to_release()` | `lib/release-provenance.sh` | Associate tasks |
|
|
525
|
-
| `get_release_provenance()` | `lib/release-provenance.sh` | Retrieve chain |
|
|
526
|
-
| `verify_provenance_chain()` | `lib/release-provenance.sh` | Validate integrity |
|
|
527
|
-
| `generate_provenance_report()` | `lib/release-provenance.sh` | Human-readable output |
|
|
528
|
-
| `get_security_config()` | `lib/release-config.sh` | Read signing/provenance config |
|
|
529
|
-
|
|
530
|
-
### Handoff Patterns
|
|
531
|
-
|
|
532
|
-
| Scenario | Handoff Target |
|
|
533
|
-
|----------|----------------|
|
|
534
|
-
| Provenance complete, ready to publish | artifact-publish protocol |
|
|
535
|
-
| SBOM reveals vulnerable dependency | research protocol |
|
|
536
|
-
| Signing fails (key issue) | HITL escalation |
|
|
537
|
-
| Verification fails on consumed artifact | implementation protocol (rebuild) |
|
|
538
|
-
|
|
539
|
-
---
|
|
540
|
-
|
|
541
|
-
## Workflow Sequence
|
|
542
|
-
|
|
543
|
-
```
|
|
544
|
-
1. Read task requirements (cleo show T####)
|
|
545
|
-
2. Start task (cleo start T####)
|
|
546
|
-
3. Compute artifact digests (SHA-256)
|
|
547
|
-
4. Generate attestation (in-toto Statement v1)
|
|
548
|
-
5. Sign attestation (sigstore/cosign or gpg)
|
|
549
|
-
6. Generate SBOM (if applicable per PROV-010)
|
|
550
|
-
7. Record provenance via record_release()
|
|
551
|
-
8. Verify chain via verify_provenance_chain()
|
|
552
|
-
9. Write output file
|
|
553
|
-
10. Append manifest entry
|
|
554
|
-
11. Complete task (cleo complete T####)
|
|
555
|
-
12. Return: "Provenance complete. See MANIFEST.jsonl for summary."
|
|
556
|
-
```
|
|
557
|
-
|
|
558
|
-
---
|
|
559
|
-
|
|
560
|
-
## Example
|
|
561
|
-
|
|
562
|
-
**Task**: Generate provenance for CLEO v0.85.0 release
|
|
563
|
-
|
|
564
|
-
**Manifest Entry Command**:
|
|
565
|
-
```bash
|
|
566
|
-
cleo research add \
|
|
567
|
-
--title "Provenance: CLEO v0.85.0" \
|
|
568
|
-
--file "2026-02-09_provenance-v0850.md" \
|
|
569
|
-
--topics "provenance,slsa,v0.85.0,supply-chain" \
|
|
570
|
-
--findings "SLSA L3 achieved,3 artifacts signed,CycloneDX SBOM generated,Chain verified" \
|
|
571
|
-
--status complete \
|
|
572
|
-
--task T3200 \
|
|
573
|
-
--epic T3195 \
|
|
574
|
-
--not-actionable \
|
|
575
|
-
--agent-type provenance
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
**Return Message**:
|
|
579
|
-
```
|
|
580
|
-
Provenance complete. See MANIFEST.jsonl for summary.
|
|
581
|
-
```
|
|
582
|
-
|
|
583
|
-
---
|
|
584
|
-
|
|
585
|
-
## Anti-Patterns
|
|
586
|
-
|
|
587
|
-
| Pattern | Why Avoid |
|
|
588
|
-
|---------|-----------|
|
|
589
|
-
| Skipping digest computation | Breaks chain integrity, unverifiable artifacts |
|
|
590
|
-
| Hardcoding signing keys in config | Security risk, key exposure |
|
|
591
|
-
| Generating attestation without matching digest | Attestation binds to wrong artifact |
|
|
592
|
-
| Publishing artifact before signing | Cannot retrofit signatures |
|
|
593
|
-
| Modifying provenance records after creation | Violates immutability, breaks audit trail |
|
|
594
|
-
| Skipping SBOM for artifacts with dependencies | Hidden supply chain risk |
|
|
595
|
-
| Using SHA-1 or MD5 for digests | Cryptographically broken, non-compliant |
|
|
596
|
-
| Storing private keys in `.cleo/` directory | Key compromise risk |
|
|
597
|
-
|
|
598
|
-
---
|
|
599
|
-
|
|
600
|
-
*Protocol Version 1.0.0 - Supply Chain Provenance Protocol*
|