dsh-standards 0.0.3 → 1.0.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/40-checker/README.md +251 -0
- package/40-checker/bin/dsh-levels.mjs +15 -0
- package/40-checker/bin/dsh-plugin-verify.mjs +8 -0
- package/40-checker/fixtures/bad/index.mjs +12 -0
- package/40-checker/fixtures/bad/package.json +15 -0
- package/40-checker/fixtures/bad-manifest/index.js +1 -0
- package/40-checker/fixtures/bad-manifest/package.json +5 -0
- package/40-checker/fixtures/bundle/cordis.patch.yml +3 -0
- package/40-checker/fixtures/bundle/package.json +15 -0
- package/40-checker/fixtures/bundle/server.mjs +7 -0
- package/40-checker/fixtures/bundle-v0/cordis.patch.yml +3 -0
- package/40-checker/fixtures/bundle-v0/package.json +21 -0
- package/40-checker/fixtures/bundle-v0/server.mjs +7 -0
- package/40-checker/fixtures/client-missing/client.js +1 -0
- package/40-checker/fixtures/client-missing/index.js +1 -0
- package/40-checker/fixtures/client-missing/package.json +6 -0
- package/40-checker/fixtures/flow-config/index.js +9 -0
- package/40-checker/fixtures/flow-config/package.json +10 -0
- package/40-checker/fixtures/fs-write/index.mjs +7 -0
- package/40-checker/fixtures/fs-write/package.json +10 -0
- package/40-checker/fixtures/good/index.mjs +10 -0
- package/40-checker/fixtures/good/package.json +19 -0
- package/40-checker/fixtures/hang/index.mjs +5 -0
- package/40-checker/fixtures/hang/package.json +10 -0
- package/40-checker/fixtures/known-answer/expected.json +18 -0
- package/40-checker/fixtures/market-index-real.json +18 -0
- package/40-checker/fixtures/market-index.json +18 -0
- package/40-checker/fixtures/negative/bad-entry/package.json +1 -0
- package/40-checker/fixtures/negative/no-entry/package.json +1 -0
- package/40-checker/fixtures/negative/no-patch/package.json +1 -0
- package/40-checker/fixtures/negative/root-missing/cordis.patch.yml +2 -0
- package/40-checker/fixtures/negative/root-missing/package.json +1 -0
- package/40-checker/fixtures/negative/workspace/package.json +1 -0
- package/40-checker/package.json +22 -0
- package/40-checker/samples/README.md +8 -0
- package/40-checker/samples/entry18.json +139 -0
- package/40-checker/samples/frame.json +485 -0
- package/40-checker/scripts/apply-overlay.mjs +59 -0
- package/40-checker/scripts/attestation-check.mjs +151 -0
- package/40-checker/scripts/bundle-smoke.mjs +126 -0
- package/40-checker/scripts/claim-check.mjs +145 -0
- package/40-checker/scripts/clause-map.mjs +94 -0
- package/40-checker/scripts/collect-fixtures.mjs +44 -0
- package/40-checker/scripts/dashboard.mjs +85 -0
- package/40-checker/scripts/dco-check.mjs +147 -0
- package/40-checker/scripts/dependabot-check.mjs +40 -0
- package/40-checker/scripts/doc-commands-check.mjs +92 -0
- package/40-checker/scripts/entry-scan.mjs +190 -0
- package/40-checker/scripts/entry-validate.mjs +291 -0
- package/40-checker/scripts/entry18-attribution.mjs +66 -0
- package/40-checker/scripts/entry18-ci.mjs +685 -0
- package/40-checker/scripts/entry18-realweb-summary.mjs +71 -0
- package/40-checker/scripts/entry18-web.mjs +307 -0
- package/40-checker/scripts/evidence-chain.mjs +100 -0
- package/40-checker/scripts/flow-index.mjs +82 -0
- package/40-checker/scripts/flow-sample-ci.mjs +529 -0
- package/40-checker/scripts/governance-check.mjs +210 -0
- package/40-checker/scripts/host-farm.mjs +165 -0
- package/40-checker/scripts/journey-config-observe.mjs +109 -0
- package/40-checker/scripts/journey-disclosure-shape.mjs +83 -0
- package/40-checker/scripts/journey-runtime.mjs +178 -0
- package/40-checker/scripts/journey.mjs +76 -0
- package/40-checker/scripts/label-drift.mjs +74 -0
- package/40-checker/scripts/label-sync.mjs +87 -0
- package/40-checker/scripts/label-verify.mjs +90 -0
- package/40-checker/scripts/landlock-exec.c +101 -0
- package/40-checker/scripts/level-audit.mjs +336 -0
- package/40-checker/scripts/m1-sidecar.mjs +126 -0
- package/40-checker/scripts/m2-runner.mjs +213 -0
- package/40-checker/scripts/round-robin.mjs +88 -0
- package/40-checker/scripts/sample-frame.mjs +72 -0
- package/40-checker/scripts/sample20-ci.mjs +25 -0
- package/40-checker/scripts/sample60-ci.mjs +25 -0
- package/40-checker/scripts/stale-check.mjs +59 -0
- package/40-checker/scripts/surveillance.mjs +88 -0
- package/40-checker/scripts/web-probe.mjs +504 -0
- package/40-checker/src/cli.mjs +300 -0
- package/40-checker/src/client-shape.mjs +37 -0
- package/40-checker/src/declarations.mjs +242 -0
- package/40-checker/src/index.mjs +8 -0
- package/40-checker/src/install-spec.mjs +67 -0
- package/40-checker/src/label.mjs +130 -0
- package/40-checker/src/manifest.mjs +381 -0
- package/40-checker/src/permissions.mjs +60 -0
- package/40-checker/src/report.mjs +204 -0
- package/40-checker/src/result.mjs +60 -0
- package/40-checker/src/runtime.mjs +299 -0
- package/40-checker/src/semver.mjs +194 -0
- package/40-checker/src/util.mjs +148 -0
- package/40-checker/test/attestation.test.mjs +59 -0
- package/40-checker/test/checks.test.mjs +172 -0
- package/40-checker/test/claim.test.mjs +28 -0
- package/40-checker/test/client-shape.test.mjs +35 -0
- package/40-checker/test/dco.test.mjs +51 -0
- package/40-checker/test/entry-validate.test.mjs +172 -0
- package/40-checker/test/governance.test.mjs +76 -0
- package/40-checker/test/label.test.mjs +97 -0
- package/40-checker/test/level-audit.test.mjs +99 -0
- package/40-checker/test/levels.test.mjs +31 -0
- package/40-checker/test/ops.test.mjs +117 -0
- package/40-checker/test/permissions.test.mjs +40 -0
- package/40-checker/test/semver.test.mjs +32 -0
- package/40-checker/test/verify.test.mjs +57 -0
- package/CHANGELOG.md +24 -0
- package/LICENSE +28 -0
- package/LICENSE-APACHE +190 -0
- package/LICENSE-CC-BY +23 -0
- package/NOTICE +14 -0
- package/NOTICE.md +11 -0
- package/README.md +146 -3
- package/bin/dsh-levels.mjs +4 -0
- package/bin/dsh-standards.mjs +19 -0
- package/docs/BOOST-FIXTURES-2026-11-02.md +38 -0
- package/docs/DEVELOPER-JOURNEY.md +40 -0
- package/docs/HOST-J3-BUG-REPORT-DRAFT.md +27 -0
- package/docs/HOST-J3-CONFIG-REPRO-2026-11-02.md +36 -0
- package/docs/NAMING-FALLBACK.md +11 -0
- package/docs/fork-policy.md +12 -0
- package/docs/full-test-plan-2026-11-02.md +207 -0
- package/docs/incident.md +37 -0
- package/docs/onboarding.md +27 -0
- package/docs/privacy.md +12 -0
- package/docs/release.md +16 -0
- package/docs/scope-security.md +62 -0
- package/docs/status-taxonomy.md +54 -0
- package/docs/sunset.md +44 -0
- package/docs/translating.md +12 -0
- package/package.json +58 -12
- package/spec/README.md +27 -0
- package/spec/boost/README.md +8 -0
- package/spec/clauses.json +253 -0
- package/spec/entry/README.md +9 -0
- package/spec/flow/README.md +8 -0
- package/spec/levels.json +371 -0
- package/spec/levels.schema.json +45 -0
- package/spec/reference-suite.json +35 -0
- package/spec/schemas/attestation.schema.json +284 -0
- package/spec/schemas/evidence.schema.json +331 -0
- package/spec/schemas/report.schema.json +64 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/PerryLink/dsh-standards/spec/schemas/attestation.schema.json",
|
|
4
|
+
"title": "DSH attestation",
|
|
5
|
+
"description": "A quality-grade attestation (A-E evidence, A-D grade) is orthogonal to the adoption levels. A attestation MUST NOT carry a level field.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema",
|
|
10
|
+
"attestationId",
|
|
11
|
+
"subject",
|
|
12
|
+
"grade",
|
|
13
|
+
"claimLevel",
|
|
14
|
+
"status",
|
|
15
|
+
"issuedAt",
|
|
16
|
+
"expiresAt",
|
|
17
|
+
"scope",
|
|
18
|
+
"scheme",
|
|
19
|
+
"assessor",
|
|
20
|
+
"evidence",
|
|
21
|
+
"selfAssessed",
|
|
22
|
+
"disclaimer",
|
|
23
|
+
"verifyUrl"
|
|
24
|
+
],
|
|
25
|
+
"not": {
|
|
26
|
+
"required": [
|
|
27
|
+
"level"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"properties": {
|
|
31
|
+
"schema": {
|
|
32
|
+
"const": "dsh-attestation/1"
|
|
33
|
+
},
|
|
34
|
+
"attestationId": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "^DSH-ATT-[0-9]{4}-[0-9]{3}$"
|
|
37
|
+
},
|
|
38
|
+
"subject": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": false,
|
|
41
|
+
"required": [
|
|
42
|
+
"repo",
|
|
43
|
+
"version"
|
|
44
|
+
],
|
|
45
|
+
"properties": {
|
|
46
|
+
"repo": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"minLength": 1
|
|
49
|
+
},
|
|
50
|
+
"version": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"minLength": 1
|
|
53
|
+
},
|
|
54
|
+
"commit": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "^[0-9a-f]{7,40}$"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"grade": {
|
|
61
|
+
"enum": [
|
|
62
|
+
"A",
|
|
63
|
+
"B",
|
|
64
|
+
"C",
|
|
65
|
+
"D"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"status": {
|
|
69
|
+
"enum": [
|
|
70
|
+
"draft",
|
|
71
|
+
"active",
|
|
72
|
+
"suspended",
|
|
73
|
+
"withdrawn",
|
|
74
|
+
"expired"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"issuedAt": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"format": "date"
|
|
80
|
+
},
|
|
81
|
+
"expiresAt": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"format": "date"
|
|
84
|
+
},
|
|
85
|
+
"scope": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"required": [
|
|
89
|
+
"dimensions",
|
|
90
|
+
"excluded"
|
|
91
|
+
],
|
|
92
|
+
"properties": {
|
|
93
|
+
"dimensions": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"minItems": 1,
|
|
96
|
+
"items": {
|
|
97
|
+
"enum": [
|
|
98
|
+
"A",
|
|
99
|
+
"B",
|
|
100
|
+
"C",
|
|
101
|
+
"D",
|
|
102
|
+
"E"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"uniqueItems": true
|
|
106
|
+
},
|
|
107
|
+
"excluded": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"uniqueItems": true
|
|
113
|
+
},
|
|
114
|
+
"platform": {
|
|
115
|
+
"type": "string"
|
|
116
|
+
},
|
|
117
|
+
"dsh": {
|
|
118
|
+
"type": "string"
|
|
119
|
+
},
|
|
120
|
+
"cordis": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"scheme": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"required": [
|
|
129
|
+
"id",
|
|
130
|
+
"version"
|
|
131
|
+
],
|
|
132
|
+
"properties": {
|
|
133
|
+
"id": {
|
|
134
|
+
"const": "dsh-certification"
|
|
135
|
+
},
|
|
136
|
+
"version": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"assessor": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"additionalProperties": false,
|
|
145
|
+
"required": [
|
|
146
|
+
"handle",
|
|
147
|
+
"role",
|
|
148
|
+
"coi"
|
|
149
|
+
],
|
|
150
|
+
"properties": {
|
|
151
|
+
"handle": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"minLength": 1
|
|
154
|
+
},
|
|
155
|
+
"role": {
|
|
156
|
+
"enum": [
|
|
157
|
+
"organizer",
|
|
158
|
+
"maintainer",
|
|
159
|
+
"reviewer",
|
|
160
|
+
"external-reviewer"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"coi": {
|
|
164
|
+
"type": "array",
|
|
165
|
+
"items": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"evidence": {
|
|
172
|
+
"type": "array",
|
|
173
|
+
"minItems": 1,
|
|
174
|
+
"items": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"required": [
|
|
178
|
+
"id",
|
|
179
|
+
"result"
|
|
180
|
+
],
|
|
181
|
+
"properties": {
|
|
182
|
+
"id": {
|
|
183
|
+
"enum": [
|
|
184
|
+
"A",
|
|
185
|
+
"B",
|
|
186
|
+
"C",
|
|
187
|
+
"D",
|
|
188
|
+
"E"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"result": {
|
|
192
|
+
"enum": [
|
|
193
|
+
"PASS",
|
|
194
|
+
"FAIL",
|
|
195
|
+
"WARN",
|
|
196
|
+
"NOT-RUN"
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"url": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
},
|
|
202
|
+
"sha256": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
205
|
+
},
|
|
206
|
+
"note": {
|
|
207
|
+
"type": "string"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"anyOf": [
|
|
211
|
+
{
|
|
212
|
+
"required": [
|
|
213
|
+
"url"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"required": [
|
|
218
|
+
"sha256"
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"selfAssessed": {
|
|
225
|
+
"type": "boolean"
|
|
226
|
+
},
|
|
227
|
+
"disclaimer": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"minLength": 12
|
|
230
|
+
},
|
|
231
|
+
"notClaimed": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string"
|
|
235
|
+
},
|
|
236
|
+
"uniqueItems": true
|
|
237
|
+
},
|
|
238
|
+
"verifyUrl": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"pattern": "^https://"
|
|
241
|
+
},
|
|
242
|
+
"supersedes": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"pattern": "^DSH-ATT-[0-9]{4}-[0-9]{3}$"
|
|
245
|
+
},
|
|
246
|
+
"claimLevel": {
|
|
247
|
+
"enum": [
|
|
248
|
+
"self-reported",
|
|
249
|
+
"verified",
|
|
250
|
+
"peer-reviewed"
|
|
251
|
+
],
|
|
252
|
+
"description": "self-reported when the assessor is the author; verified only with an independent reviewer; peer-reviewed with a panel."
|
|
253
|
+
},
|
|
254
|
+
"history": {
|
|
255
|
+
"type": "array",
|
|
256
|
+
"items": {
|
|
257
|
+
"type": "object",
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"required": [
|
|
260
|
+
"status",
|
|
261
|
+
"at"
|
|
262
|
+
],
|
|
263
|
+
"properties": {
|
|
264
|
+
"status": {
|
|
265
|
+
"enum": [
|
|
266
|
+
"draft",
|
|
267
|
+
"active",
|
|
268
|
+
"suspended",
|
|
269
|
+
"withdrawn",
|
|
270
|
+
"expired"
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
"at": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"format": "date"
|
|
276
|
+
},
|
|
277
|
+
"reason": {
|
|
278
|
+
"type": "string"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/PerryLink/dsh-standards/spec/schemas/evidence.schema.json",
|
|
4
|
+
"title": "DSH evidence record",
|
|
5
|
+
"description": "One record per subject-level-method run. The status enum is validated per level by the consumer: measured only for boost, manual only for flow.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema",
|
|
10
|
+
"subject",
|
|
11
|
+
"level",
|
|
12
|
+
"status",
|
|
13
|
+
"scope",
|
|
14
|
+
"method",
|
|
15
|
+
"evidence",
|
|
16
|
+
"validity"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schema": {
|
|
20
|
+
"const": "dsh-levels/1"
|
|
21
|
+
},
|
|
22
|
+
"subject": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"repo"
|
|
27
|
+
],
|
|
28
|
+
"properties": {
|
|
29
|
+
"repo": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1
|
|
32
|
+
},
|
|
33
|
+
"version": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"commit": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"pattern": "^[0-9a-f]{7,40}$"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"level": {
|
|
43
|
+
"enum": [
|
|
44
|
+
"entry",
|
|
45
|
+
"flow",
|
|
46
|
+
"boost"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"status": {
|
|
50
|
+
"enum": [
|
|
51
|
+
"recognized",
|
|
52
|
+
"static",
|
|
53
|
+
"runtime",
|
|
54
|
+
"blocked",
|
|
55
|
+
"failed",
|
|
56
|
+
"not-run",
|
|
57
|
+
"stale",
|
|
58
|
+
"manual",
|
|
59
|
+
"measured",
|
|
60
|
+
"not-measured",
|
|
61
|
+
"not-applicable",
|
|
62
|
+
"withdrawn"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"scope": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": [
|
|
69
|
+
"dsh",
|
|
70
|
+
"cordis"
|
|
71
|
+
],
|
|
72
|
+
"properties": {
|
|
73
|
+
"dsh": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1
|
|
76
|
+
},
|
|
77
|
+
"cordis": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1
|
|
80
|
+
},
|
|
81
|
+
"platform": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"pluginVersion": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"method": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"tool",
|
|
94
|
+
"version"
|
|
95
|
+
],
|
|
96
|
+
"properties": {
|
|
97
|
+
"tool": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 1
|
|
100
|
+
},
|
|
101
|
+
"version": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"minLength": 1
|
|
104
|
+
},
|
|
105
|
+
"command": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"runId": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"evidence": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"minItems": 1,
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": [
|
|
120
|
+
"id",
|
|
121
|
+
"result"
|
|
122
|
+
],
|
|
123
|
+
"properties": {
|
|
124
|
+
"id": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"minLength": 1
|
|
127
|
+
},
|
|
128
|
+
"result": {
|
|
129
|
+
"enum": [
|
|
130
|
+
"PASS",
|
|
131
|
+
"FAIL",
|
|
132
|
+
"WARN",
|
|
133
|
+
"NOT-RUN",
|
|
134
|
+
"BLOCKED",
|
|
135
|
+
"ERROR"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"artifact": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"url": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"sha256": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"anyOf": [
|
|
150
|
+
{
|
|
151
|
+
"required": [
|
|
152
|
+
"artifact"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"required": [
|
|
157
|
+
"url"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"required": [
|
|
162
|
+
"sha256"
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"producer": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"properties": {
|
|
172
|
+
"tool": {
|
|
173
|
+
"type": "string"
|
|
174
|
+
},
|
|
175
|
+
"version": {
|
|
176
|
+
"type": "string"
|
|
177
|
+
},
|
|
178
|
+
"runId": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"validity": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"additionalProperties": false,
|
|
186
|
+
"required": [
|
|
187
|
+
"generatedAt",
|
|
188
|
+
"expiresAt",
|
|
189
|
+
"rule"
|
|
190
|
+
],
|
|
191
|
+
"properties": {
|
|
192
|
+
"generatedAt": {
|
|
193
|
+
"type": "string",
|
|
194
|
+
"format": "date"
|
|
195
|
+
},
|
|
196
|
+
"expiresAt": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"format": "date"
|
|
199
|
+
},
|
|
200
|
+
"rule": {
|
|
201
|
+
"enum": [
|
|
202
|
+
"entry<=90d",
|
|
203
|
+
"flow<=180d",
|
|
204
|
+
"boost<=365d",
|
|
205
|
+
"certificate<=365d"
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"stale": {
|
|
211
|
+
"type": "boolean"
|
|
212
|
+
},
|
|
213
|
+
"notClaimed": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"uniqueItems": true
|
|
219
|
+
},
|
|
220
|
+
"claimLevel": {
|
|
221
|
+
"enum": [
|
|
222
|
+
"observation",
|
|
223
|
+
"reference",
|
|
224
|
+
"advice"
|
|
225
|
+
],
|
|
226
|
+
"description": "Sentence type, not strength. Market renders reference; developer renders advice."
|
|
227
|
+
},
|
|
228
|
+
"audience": {
|
|
229
|
+
"type": "array",
|
|
230
|
+
"items": {
|
|
231
|
+
"enum": [
|
|
232
|
+
"official",
|
|
233
|
+
"market",
|
|
234
|
+
"developer"
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"uniqueItems": true
|
|
238
|
+
},
|
|
239
|
+
"render": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"additionalProperties": false,
|
|
242
|
+
"properties": {
|
|
243
|
+
"template": {
|
|
244
|
+
"type": "string"
|
|
245
|
+
},
|
|
246
|
+
"recordHash": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
249
|
+
},
|
|
250
|
+
"renderer": {
|
|
251
|
+
"type": "string"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"allOf": [
|
|
257
|
+
{
|
|
258
|
+
"if": {
|
|
259
|
+
"properties": {
|
|
260
|
+
"level": {
|
|
261
|
+
"const": "entry"
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"then": {
|
|
266
|
+
"properties": {
|
|
267
|
+
"status": {
|
|
268
|
+
"enum": [
|
|
269
|
+
"recognized",
|
|
270
|
+
"static",
|
|
271
|
+
"runtime",
|
|
272
|
+
"blocked",
|
|
273
|
+
"failed",
|
|
274
|
+
"not-run",
|
|
275
|
+
"stale",
|
|
276
|
+
"withdrawn",
|
|
277
|
+
"not-applicable"
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"if": {
|
|
285
|
+
"properties": {
|
|
286
|
+
"level": {
|
|
287
|
+
"const": "flow"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"then": {
|
|
292
|
+
"properties": {
|
|
293
|
+
"status": {
|
|
294
|
+
"enum": [
|
|
295
|
+
"manual",
|
|
296
|
+
"runtime",
|
|
297
|
+
"failed",
|
|
298
|
+
"not-run",
|
|
299
|
+
"stale",
|
|
300
|
+
"withdrawn",
|
|
301
|
+
"not-applicable"
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"if": {
|
|
309
|
+
"properties": {
|
|
310
|
+
"level": {
|
|
311
|
+
"const": "boost"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"then": {
|
|
316
|
+
"properties": {
|
|
317
|
+
"status": {
|
|
318
|
+
"enum": [
|
|
319
|
+
"measured",
|
|
320
|
+
"not-measured",
|
|
321
|
+
"failed",
|
|
322
|
+
"stale",
|
|
323
|
+
"withdrawn",
|
|
324
|
+
"not-applicable"
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/PerryLink/dsh-standards/spec/schemas/report.schema.json",
|
|
4
|
+
"title": "DSH test report",
|
|
5
|
+
"description": "A test report (inspection) is not an attestation. It has no grade and no level. Attestation is a separate document that may cite a report ID.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schema", "reportId", "subject", "method", "environment", "checks", "limitations", "issuedAt"],
|
|
9
|
+
"not": { "anyOf": [{ "required": ["grade"] }, { "required": ["level"] }] },
|
|
10
|
+
"properties": {
|
|
11
|
+
"schema": { "const": "dsh-report/1" },
|
|
12
|
+
"reportId": { "type": "string", "pattern": "^DSH-RPT-[0-9]{4}-[0-9]{3}$" },
|
|
13
|
+
"subject": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["repo"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"repo": { "type": "string" },
|
|
19
|
+
"version": { "type": "string" },
|
|
20
|
+
"commit": { "type": "string", "pattern": "^[0-9a-f]{7,40}$" }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"method": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"required": ["tool", "version"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"tool": { "type": "string" },
|
|
29
|
+
"version": { "type": "string" },
|
|
30
|
+
"command": { "type": "string" },
|
|
31
|
+
"sample": { "type": "string" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"environment": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["os", "node"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"os": { "type": "string" },
|
|
40
|
+
"node": { "type": "string" },
|
|
41
|
+
"dsh": { "type": "string" },
|
|
42
|
+
"cordis": { "type": "string" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"checks": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"minItems": 1,
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": ["id", "result"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"id": { "type": "string" },
|
|
54
|
+
"result": { "enum": ["PASS", "FAIL", "WARN", "NOT-RUN", "BLOCKED", "ERROR"] },
|
|
55
|
+
"reason": { "type": "string" },
|
|
56
|
+
"artifact": { "type": "string" }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"limitations": { "type": "array", "minItems": 1, "items": { "type": "string" } },
|
|
61
|
+
"issuedAt": { "type": "string", "format": "date" },
|
|
62
|
+
"issuedBy": { "type": "string" }
|
|
63
|
+
}
|
|
64
|
+
}
|