@critiq/cli 0.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/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@critiq/cli",
3
+ "version": "0.0.1",
4
+ "private": false,
5
+ "description": "Critiq CLI for deterministic repository checks, rule validation, and fixture-driven rule tests.",
6
+ "license": "Apache-2.0",
7
+ "type": "commonjs",
8
+ "bin": {
9
+ "critiq": "./main.js"
10
+ },
11
+ "main": "./main.js",
12
+ "types": "./main.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./main.d.ts",
16
+ "default": "./main.js"
17
+ }
18
+ },
19
+ "engines": {
20
+ "node": ">=20.0.0"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "files": [
26
+ "LICENSE",
27
+ "README.md",
28
+ "main.d.ts",
29
+ "main.js",
30
+ "schema"
31
+ ],
32
+ "dependencies": {
33
+ "@typescript-eslint/typescript-estree": "^8.58.0",
34
+ "minimatch": "^10.2.5",
35
+ "tslib": "^2.3.0",
36
+ "typescript": "~5.9.2",
37
+ "yaml": "^2.8.3",
38
+ "zod": "^3.25.76"
39
+ }
40
+ }
@@ -0,0 +1,296 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "FindingV0",
4
+ "type": "object",
5
+ "properties": {
6
+ "schemaVersion": {
7
+ "type": "string",
8
+ "const": "finding/v0"
9
+ },
10
+ "findingId": {
11
+ "type": "string",
12
+ "format": "uuid"
13
+ },
14
+ "rule": {
15
+ "type": "object",
16
+ "properties": {
17
+ "id": {
18
+ "type": "string",
19
+ "minLength": 1
20
+ },
21
+ "name": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "version": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ }
29
+ },
30
+ "required": [
31
+ "id"
32
+ ],
33
+ "additionalProperties": false
34
+ },
35
+ "title": {
36
+ "type": "string",
37
+ "minLength": 1
38
+ },
39
+ "summary": {
40
+ "type": "string",
41
+ "minLength": 1
42
+ },
43
+ "category": {
44
+ "type": "string",
45
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)*$"
46
+ },
47
+ "severity": {
48
+ "type": "string",
49
+ "enum": [
50
+ "low",
51
+ "medium",
52
+ "high",
53
+ "critical"
54
+ ]
55
+ },
56
+ "confidence": {
57
+ "anyOf": [
58
+ {
59
+ "type": "string",
60
+ "enum": [
61
+ "low",
62
+ "medium",
63
+ "high"
64
+ ]
65
+ },
66
+ {
67
+ "type": "number",
68
+ "minimum": 0,
69
+ "maximum": 1
70
+ }
71
+ ]
72
+ },
73
+ "tags": {
74
+ "type": "array",
75
+ "items": {
76
+ "type": "string",
77
+ "minLength": 1
78
+ }
79
+ },
80
+ "locations": {
81
+ "type": "object",
82
+ "properties": {
83
+ "primary": {
84
+ "type": "object",
85
+ "properties": {
86
+ "path": {
87
+ "type": "string",
88
+ "minLength": 1
89
+ },
90
+ "startLine": {
91
+ "type": "integer",
92
+ "exclusiveMinimum": 0
93
+ },
94
+ "startColumn": {
95
+ "type": "integer",
96
+ "exclusiveMinimum": 0
97
+ },
98
+ "endLine": {
99
+ "type": "integer",
100
+ "exclusiveMinimum": 0
101
+ },
102
+ "endColumn": {
103
+ "type": "integer",
104
+ "exclusiveMinimum": 0
105
+ }
106
+ },
107
+ "required": [
108
+ "path",
109
+ "startLine",
110
+ "startColumn",
111
+ "endLine",
112
+ "endColumn"
113
+ ],
114
+ "additionalProperties": false
115
+ },
116
+ "related": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "path": {
122
+ "type": "string",
123
+ "minLength": 1
124
+ },
125
+ "startLine": {
126
+ "type": "integer",
127
+ "exclusiveMinimum": 0
128
+ },
129
+ "startColumn": {
130
+ "type": "integer",
131
+ "exclusiveMinimum": 0
132
+ },
133
+ "endLine": {
134
+ "type": "integer",
135
+ "exclusiveMinimum": 0
136
+ },
137
+ "endColumn": {
138
+ "type": "integer",
139
+ "exclusiveMinimum": 0
140
+ }
141
+ },
142
+ "required": [
143
+ "path",
144
+ "startLine",
145
+ "startColumn",
146
+ "endLine",
147
+ "endColumn"
148
+ ],
149
+ "additionalProperties": false
150
+ }
151
+ }
152
+ },
153
+ "required": [
154
+ "primary"
155
+ ],
156
+ "additionalProperties": false
157
+ },
158
+ "evidence": {
159
+ "type": "array",
160
+ "items": {
161
+ "type": "object",
162
+ "properties": {
163
+ "kind": {
164
+ "type": "string",
165
+ "minLength": 1
166
+ },
167
+ "label": {
168
+ "type": "string",
169
+ "minLength": 1
170
+ },
171
+ "path": {
172
+ "type": "string",
173
+ "minLength": 1
174
+ },
175
+ "excerpt": {
176
+ "type": "string",
177
+ "minLength": 1
178
+ },
179
+ "range": {
180
+ "type": "object",
181
+ "properties": {
182
+ "startLine": {
183
+ "type": "integer",
184
+ "exclusiveMinimum": 0
185
+ },
186
+ "startColumn": {
187
+ "type": "integer",
188
+ "exclusiveMinimum": 0
189
+ },
190
+ "endLine": {
191
+ "type": "integer",
192
+ "exclusiveMinimum": 0
193
+ },
194
+ "endColumn": {
195
+ "type": "integer",
196
+ "exclusiveMinimum": 0
197
+ }
198
+ },
199
+ "required": [
200
+ "startLine",
201
+ "startColumn",
202
+ "endLine",
203
+ "endColumn"
204
+ ],
205
+ "additionalProperties": false
206
+ }
207
+ },
208
+ "required": [
209
+ "kind",
210
+ "label",
211
+ "path",
212
+ "excerpt",
213
+ "range"
214
+ ],
215
+ "additionalProperties": false
216
+ },
217
+ "minItems": 1
218
+ },
219
+ "remediation": {
220
+ "type": "object",
221
+ "properties": {
222
+ "summary": {
223
+ "type": "string",
224
+ "minLength": 1
225
+ }
226
+ },
227
+ "required": [
228
+ "summary"
229
+ ],
230
+ "additionalProperties": false
231
+ },
232
+ "fingerprints": {
233
+ "type": "object",
234
+ "properties": {
235
+ "primary": {
236
+ "type": "string",
237
+ "pattern": "^sha256:.+$"
238
+ },
239
+ "logical": {
240
+ "type": "string",
241
+ "pattern": "^sha256:.+$"
242
+ }
243
+ },
244
+ "required": [
245
+ "primary"
246
+ ],
247
+ "additionalProperties": false
248
+ },
249
+ "provenance": {
250
+ "type": "object",
251
+ "properties": {
252
+ "engineKind": {
253
+ "type": "string",
254
+ "minLength": 1
255
+ },
256
+ "engineVersion": {
257
+ "type": "string",
258
+ "minLength": 1
259
+ },
260
+ "rulePack": {
261
+ "type": "string",
262
+ "minLength": 1
263
+ },
264
+ "generatedAt": {
265
+ "type": "string",
266
+ "format": "date-time"
267
+ }
268
+ },
269
+ "required": [
270
+ "engineKind",
271
+ "engineVersion",
272
+ "generatedAt"
273
+ ],
274
+ "additionalProperties": false
275
+ },
276
+ "attributes": {
277
+ "type": "object",
278
+ "additionalProperties": {}
279
+ }
280
+ },
281
+ "required": [
282
+ "schemaVersion",
283
+ "findingId",
284
+ "rule",
285
+ "title",
286
+ "summary",
287
+ "category",
288
+ "severity",
289
+ "confidence",
290
+ "locations",
291
+ "evidence",
292
+ "fingerprints",
293
+ "provenance"
294
+ ],
295
+ "additionalProperties": false
296
+ }