@enwithai/product-check 0.2.0 → 0.3.0

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 (63) hide show
  1. package/ATTRIBUTION.md +4 -4
  2. package/CHANGELOG.md +28 -0
  3. package/README.md +29 -16
  4. package/SECURITY.md +5 -1
  5. package/dashboard/assurance.css +71 -0
  6. package/dashboard/assurance.js +21 -0
  7. package/dist/assurance/adapters.d.ts +32 -0
  8. package/dist/assurance/adapters.js +76 -0
  9. package/dist/assurance/approvals.d.ts +34 -0
  10. package/dist/assurance/approvals.js +133 -0
  11. package/dist/assurance/cli.d.ts +13 -0
  12. package/dist/assurance/cli.js +863 -0
  13. package/dist/assurance/dashboard.d.ts +18 -0
  14. package/dist/assurance/dashboard.js +267 -0
  15. package/dist/assurance/diff.d.ts +20 -0
  16. package/dist/assurance/diff.js +99 -0
  17. package/dist/assurance/evidence-log.d.ts +20 -0
  18. package/dist/assurance/evidence-log.js +100 -0
  19. package/dist/assurance/fix-packets.d.ts +12 -0
  20. package/dist/assurance/fix-packets.js +178 -0
  21. package/dist/assurance/gate.d.ts +37 -0
  22. package/dist/assurance/gate.js +324 -0
  23. package/dist/assurance/lanes.d.ts +61 -0
  24. package/dist/assurance/lanes.js +380 -0
  25. package/dist/assurance/policy.d.ts +10 -0
  26. package/dist/assurance/policy.js +85 -0
  27. package/dist/assurance/proof.d.ts +35 -0
  28. package/dist/assurance/proof.js +146 -0
  29. package/dist/assurance/register.d.ts +41 -0
  30. package/dist/assurance/register.js +480 -0
  31. package/dist/assurance/render-md.d.ts +17 -0
  32. package/dist/assurance/render-md.js +212 -0
  33. package/dist/assurance/repo-state.d.ts +15 -0
  34. package/dist/assurance/repo-state.js +79 -0
  35. package/dist/assurance/review.d.ts +52 -0
  36. package/dist/assurance/review.js +408 -0
  37. package/dist/assurance/risk.d.ts +21 -0
  38. package/dist/assurance/risk.js +184 -0
  39. package/dist/assurance/types.d.ts +573 -0
  40. package/dist/assurance/types.js +6 -0
  41. package/dist/assurance/util.d.ts +24 -0
  42. package/dist/assurance/util.js +89 -0
  43. package/dist/assurance/verification.d.ts +30 -0
  44. package/dist/assurance/verification.js +212 -0
  45. package/dist/assurance/verify.d.ts +26 -0
  46. package/dist/assurance/verify.js +304 -0
  47. package/dist/cli/run.js +8 -1
  48. package/dist/exec/process.d.ts +27 -0
  49. package/dist/exec/process.js +175 -0
  50. package/dist/reporting/markdown.d.ts +1 -0
  51. package/dist/reporting/markdown.js +1 -1
  52. package/dist/schema/registry.js +9 -0
  53. package/package.json +1 -1
  54. package/schemas/approval.schema.json +98 -0
  55. package/schemas/assurance-common.schema.json +291 -0
  56. package/schemas/assurance-policy.schema.json +185 -0
  57. package/schemas/change-review.schema.json +711 -0
  58. package/schemas/closure-register.schema.json +499 -0
  59. package/schemas/evidence-record.schema.json +94 -0
  60. package/schemas/fix-packet.schema.json +272 -0
  61. package/schemas/release-gate.schema.json +308 -0
  62. package/schemas/reviewer-findings.schema.json +49 -0
  63. package/schemas/verification-run.schema.json +199 -0
@@ -0,0 +1,185 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/enwithai/product-check/schemas/assurance-policy.schema.json",
4
+ "title": "Product Check assurance policy",
5
+ "description": "Operator-owned policy: required checks (argv, no shell), approvers with Ed25519 public keys, risk routing, review convergence, release and execution settings. Never read implicitly from the scanned repository.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "schema_version",
10
+ "kind",
11
+ "policy_id",
12
+ "required_checks",
13
+ "approvers",
14
+ "risk",
15
+ "review",
16
+ "release",
17
+ "exec"
18
+ ],
19
+ "properties": {
20
+ "schema_version": {
21
+ "$ref": "assurance-common.schema.json#/$defs/schema_version"
22
+ },
23
+ "kind": {
24
+ "const": "assurance-policy"
25
+ },
26
+ "policy_id": {
27
+ "type": "string",
28
+ "minLength": 1
29
+ },
30
+ "required_checks": {
31
+ "type": "array",
32
+ "items": {
33
+ "$ref": "assurance-common.schema.json#/$defs/command_spec"
34
+ }
35
+ },
36
+ "approvers": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["id", "type", "roles", "public_key"],
42
+ "properties": {
43
+ "id": {
44
+ "type": "string",
45
+ "minLength": 1
46
+ },
47
+ "type": {
48
+ "enum": ["human", "bot"]
49
+ },
50
+ "roles": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ "public_key": {
57
+ "type": "string",
58
+ "pattern": "BEGIN PUBLIC KEY"
59
+ }
60
+ }
61
+ }
62
+ },
63
+ "risk": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": [
67
+ "protected_paths",
68
+ "high_risk_paths",
69
+ "low_risk_paths",
70
+ "trusted_authors",
71
+ "allow_low_risk_waiver",
72
+ "approvals"
73
+ ],
74
+ "properties": {
75
+ "protected_paths": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": ["pattern", "owners"],
81
+ "properties": {
82
+ "pattern": {
83
+ "type": "string",
84
+ "minLength": 1
85
+ },
86
+ "owners": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "string"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "high_risk_paths": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "string"
99
+ }
100
+ },
101
+ "low_risk_paths": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "string"
105
+ }
106
+ },
107
+ "trusted_authors": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "allow_low_risk_waiver": {
114
+ "type": "boolean"
115
+ },
116
+ "approvals": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": ["LOW", "MEDIUM", "HIGH"],
120
+ "properties": {
121
+ "LOW": {
122
+ "type": "integer",
123
+ "minimum": 0
124
+ },
125
+ "MEDIUM": {
126
+ "type": "integer",
127
+ "minimum": 1
128
+ },
129
+ "HIGH": {
130
+ "type": "integer",
131
+ "minimum": 1
132
+ }
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "review": {
138
+ "type": "object",
139
+ "additionalProperties": false,
140
+ "required": ["max_cycles", "fail_closed_unverified_p0"],
141
+ "properties": {
142
+ "max_cycles": {
143
+ "type": "integer",
144
+ "minimum": 1,
145
+ "maximum": 20
146
+ },
147
+ "fail_closed_unverified_p0": {
148
+ "type": "boolean"
149
+ }
150
+ }
151
+ },
152
+ "release": {
153
+ "type": "object",
154
+ "additionalProperties": false,
155
+ "required": ["rollback_plan", "staged_rollout"],
156
+ "properties": {
157
+ "rollback_plan": {
158
+ "type": ["string", "null"]
159
+ },
160
+ "staged_rollout": {
161
+ "type": ["string", "null"]
162
+ }
163
+ }
164
+ },
165
+ "exec": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "required": ["env_allowlist", "max_output_bytes"],
169
+ "properties": {
170
+ "env_allowlist": {
171
+ "type": "array",
172
+ "items": {
173
+ "type": "string",
174
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
175
+ }
176
+ },
177
+ "max_output_bytes": {
178
+ "type": "integer",
179
+ "minimum": 1024,
180
+ "maximum": 268435456
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }