provenant-cli 1.0.0

Fast Rust scanner for licenses, copyrights, package metadata, SBOMs, and provenance data.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
// SPDX-FileCopyrightText: Provenant contributors
// SPDX-License-Identifier: Apache-2.0

//! Field metadata for dependency, top-level dependency, and resolved-package surfaces.

use super::OutputFieldDoc;

pub(super) const DEPENDENCY_FIELDS: &[OutputFieldDoc] = &[
    OutputFieldDoc {
        json_name: "purl",
        rust_field: "purl",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Package URL for the dependency row.",
    },
    OutputFieldDoc {
        json_name: "extracted_requirement",
        rust_field: "extracted_requirement",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Raw requirement/version constraint text extracted from the manifest or lockfile.",
    },
    OutputFieldDoc {
        json_name: "scope",
        rust_field: "scope",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Datasource-specific dependency scope such as runtime/dev/test/build.",
    },
    OutputFieldDoc {
        json_name: "is_runtime",
        rust_field: "is_runtime",
        value_shape: "boolean | null",
        presence: "Always emitted.",
        meaning: "Normalized runtime intent signal when it can be derived honestly.",
    },
    OutputFieldDoc {
        json_name: "is_optional",
        rust_field: "is_optional",
        value_shape: "boolean | null",
        presence: "Always emitted.",
        meaning: "Normalized optional-dependency signal when it can be derived honestly.",
    },
    OutputFieldDoc {
        json_name: "is_pinned",
        rust_field: "is_pinned",
        value_shape: "boolean | null",
        presence: "Always emitted.",
        meaning: "Normalized version-pinning signal when it can be derived honestly.",
    },
    OutputFieldDoc {
        json_name: "is_direct",
        rust_field: "is_direct",
        value_shape: "boolean | null",
        presence: "Always emitted.",
        meaning: "Normalized direct-vs-transitive signal when it can be derived honestly.",
    },
    OutputFieldDoc {
        json_name: "resolved_package",
        rust_field: "resolved_package",
        value_shape: "object | null",
        presence: "Always emitted.",
        meaning: "Resolved package identity/details nested directly under the dependency row.",
    },
    OutputFieldDoc {
        json_name: "extra_data",
        rust_field: "extra_data",
        value_shape: "object",
        presence: "Always emitted.",
        meaning: "Datasource-specific dependency metadata preserved without promotion into core fields.",
    },
];

pub(super) const TOP_LEVEL_DEPENDENCY_FIELDS: &[OutputFieldDoc] = &[
    OutputFieldDoc {
        json_name: "purl",
        rust_field: "purl",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Package URL for the top-level dependency row.",
    },
    OutputFieldDoc {
        json_name: "extracted_requirement",
        rust_field: "extracted_requirement",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Raw requirement/version constraint text for the top-level dependency row.",
    },
    OutputFieldDoc {
        json_name: "scope",
        rust_field: "scope",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Datasource-specific dependency scope such as runtime/dev/test/build.",
    },
    OutputFieldDoc {
        json_name: "is_runtime",
        rust_field: "is_runtime",
        value_shape: "boolean | null",
        presence: "Always emitted.",
        meaning: "Normalized runtime intent signal when it can be derived honestly.",
    },
    OutputFieldDoc {
        json_name: "is_optional",
        rust_field: "is_optional",
        value_shape: "boolean | null",
        presence: "Always emitted.",
        meaning: "Normalized optional-dependency signal when it can be derived honestly.",
    },
    OutputFieldDoc {
        json_name: "is_pinned",
        rust_field: "is_pinned",
        value_shape: "boolean | null",
        presence: "Always emitted.",
        meaning: "Normalized version-pinning signal when it can be derived honestly.",
    },
    OutputFieldDoc {
        json_name: "is_direct",
        rust_field: "is_direct",
        value_shape: "boolean | null",
        presence: "Always emitted.",
        meaning: "Normalized direct-vs-transitive signal when it can be derived honestly.",
    },
    OutputFieldDoc {
        json_name: "resolved_package",
        rust_field: "resolved_package",
        value_shape: "object | null",
        presence: "Always emitted.",
        meaning: "Resolved package payload nested under the top-level dependency row.",
    },
    OutputFieldDoc {
        json_name: "extra_data",
        rust_field: "extra_data",
        value_shape: "object",
        presence: "Always emitted.",
        meaning: "Datasource-specific structured metadata preserved on the top-level dependency row.",
    },
    OutputFieldDoc {
        json_name: "dependency_uid",
        rust_field: "dependency_uid",
        value_shape: "string",
        presence: "Always emitted.",
        meaning: "Stable identifier for the top-level dependency row on the public contract.",
    },
    OutputFieldDoc {
        json_name: "for_package_uid",
        rust_field: "for_package_uid",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Package UID that owns this hoisted dependency row after assembly.",
    },
    OutputFieldDoc {
        json_name: "datafile_path",
        rust_field: "datafile_path",
        value_shape: "string",
        presence: "Always emitted.",
        meaning: "Manifest or metadata file path that contributed this top-level dependency row.",
    },
    OutputFieldDoc {
        json_name: "datasource_id",
        rust_field: "datasource_id",
        value_shape: "string",
        presence: "Always emitted.",
        meaning: "Datasource identifier for the parser/input surface that contributed this row.",
    },
    OutputFieldDoc {
        json_name: "namespace",
        rust_field: "namespace",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Owning namespace lane preserved on the hoisted dependency row for output compatibility.",
    },
];

pub(super) const RESOLVED_PACKAGE_FIELDS: &[OutputFieldDoc] = &[
    OutputFieldDoc {
        json_name: "type",
        rust_field: "package_type",
        value_shape: "string",
        presence: "Always emitted.",
        meaning: "Package ecosystem/type identifier on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "namespace",
        rust_field: "namespace",
        value_shape: "string",
        presence: "Always emitted.",
        meaning: "Resolved package namespace.",
    },
    OutputFieldDoc {
        json_name: "name",
        rust_field: "name",
        value_shape: "string",
        presence: "Always emitted.",
        meaning: "Resolved package name.",
    },
    OutputFieldDoc {
        json_name: "version",
        rust_field: "version",
        value_shape: "string",
        presence: "Always emitted.",
        meaning: "Resolved package version.",
    },
    OutputFieldDoc {
        json_name: "qualifiers",
        rust_field: "qualifiers",
        value_shape: "object",
        presence: "Always emitted.",
        meaning: "PURL-style qualifier key/value pairs on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "subpath",
        rust_field: "subpath",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package subpath, when available.",
    },
    OutputFieldDoc {
        json_name: "primary_language",
        rust_field: "primary_language",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Primary language associated with the resolved package.",
    },
    OutputFieldDoc {
        json_name: "description",
        rust_field: "description",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package description.",
    },
    OutputFieldDoc {
        json_name: "release_date",
        rust_field: "release_date",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package release date.",
    },
    OutputFieldDoc {
        json_name: "parties",
        rust_field: "parties",
        value_shape: "array<object>",
        presence: "Always emitted.",
        meaning: "Party records attached to the resolved package.",
    },
    OutputFieldDoc {
        json_name: "keywords",
        rust_field: "keywords",
        value_shape: "array<string>",
        presence: "Always emitted.",
        meaning: "Keywords attached to the resolved package.",
    },
    OutputFieldDoc {
        json_name: "homepage_url",
        rust_field: "homepage_url",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package homepage URL.",
    },
    OutputFieldDoc {
        json_name: "download_url",
        rust_field: "download_url",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package download URL.",
    },
    OutputFieldDoc {
        json_name: "size",
        rust_field: "size",
        value_shape: "integer | null",
        presence: "Always emitted.",
        meaning: "Resolved package size when known.",
    },
    OutputFieldDoc {
        json_name: "sha1",
        rust_field: "sha1",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package SHA-1 checksum when known.",
    },
    OutputFieldDoc {
        json_name: "md5",
        rust_field: "md5",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package MD5 checksum when known.",
    },
    OutputFieldDoc {
        json_name: "sha256",
        rust_field: "sha256",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package SHA-256 checksum when known.",
    },
    OutputFieldDoc {
        json_name: "sha512",
        rust_field: "sha512",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package SHA-512 checksum when known.",
    },
    OutputFieldDoc {
        json_name: "bug_tracking_url",
        rust_field: "bug_tracking_url",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package bug-tracker URL.",
    },
    OutputFieldDoc {
        json_name: "code_view_url",
        rust_field: "code_view_url",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package code-browsing URL.",
    },
    OutputFieldDoc {
        json_name: "vcs_url",
        rust_field: "vcs_url",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package VCS URL.",
    },
    OutputFieldDoc {
        json_name: "copyright",
        rust_field: "copyright",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package copyright string.",
    },
    OutputFieldDoc {
        json_name: "holder",
        rust_field: "holder",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package holder string.",
    },
    OutputFieldDoc {
        json_name: "declared_license_expression",
        rust_field: "declared_license_expression",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Primary declared license expression on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "declared_license_expression_spdx",
        rust_field: "declared_license_expression_spdx",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "SPDX-form primary declared license expression on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "license_detections",
        rust_field: "license_detections",
        value_shape: "array<object>",
        presence: "Always emitted.",
        meaning: "License detections attached to the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "other_license_expression",
        rust_field: "other_license_expression",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Auxiliary non-primary license expression lane on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "other_license_expression_spdx",
        rust_field: "other_license_expression_spdx",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "SPDX-form auxiliary non-primary license expression lane on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "other_license_detections",
        rust_field: "other_license_detections",
        value_shape: "array<object>",
        presence: "Always emitted.",
        meaning: "Auxiliary license detections attached to the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "extracted_license_statement",
        rust_field: "extracted_license_statement",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Raw extracted license statement on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "notice_text",
        rust_field: "notice_text",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Resolved package notice text.",
    },
    OutputFieldDoc {
        json_name: "source_packages",
        rust_field: "source_packages",
        value_shape: "array<string>",
        presence: "Always emitted.",
        meaning: "Referenced source-package identifiers associated with the resolved package.",
    },
    OutputFieldDoc {
        json_name: "file_references",
        rust_field: "file_references",
        value_shape: "array<object>",
        presence: "Always emitted.",
        meaning: "Referenced-file rows attached to the resolved package.",
    },
    OutputFieldDoc {
        json_name: "is_private",
        rust_field: "is_private",
        value_shape: "boolean",
        presence: "Always emitted.",
        meaning: "Private/public signal on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "is_virtual",
        rust_field: "is_virtual",
        value_shape: "boolean",
        presence: "Always emitted.",
        meaning: "Virtual/synthetic signal on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "extra_data",
        rust_field: "extra_data",
        value_shape: "object",
        presence: "Always emitted.",
        meaning: "Datasource-specific structured metadata preserved on the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "dependencies",
        rust_field: "dependencies",
        value_shape: "array<object>",
        presence: "Always emitted.",
        meaning: "Dependency rows nested under the resolved-package payload.",
    },
    OutputFieldDoc {
        json_name: "repository_homepage_url",
        rust_field: "repository_homepage_url",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Repository homepage URL for the resolved package.",
    },
    OutputFieldDoc {
        json_name: "repository_download_url",
        rust_field: "repository_download_url",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Repository download URL for the resolved package.",
    },
    OutputFieldDoc {
        json_name: "api_data_url",
        rust_field: "api_data_url",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "API data URL for the resolved package.",
    },
    OutputFieldDoc {
        json_name: "datasource_id",
        rust_field: "datasource_id",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Single datasource identifier associated with the resolved-package payload, when available.",
    },
    OutputFieldDoc {
        json_name: "purl",
        rust_field: "purl",
        value_shape: "string | null",
        presence: "Always emitted.",
        meaning: "Package URL for the resolved package.",
    },
];