-
Notifications
You must be signed in to change notification settings - Fork 27
/
OpossumInputFileSchema.json
250 lines (250 loc) · 9.02 KB
/
OpossumInputFileSchema.json
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
{
"id": "#OpossumInputFileSchema",
"title": "Opossum input schema",
"description": "Input files consist of a file tree, signals with attribution information for parts of the tree, and metadata.",
"type": "object",
"required": [
"resources",
"metadata",
"externalAttributions",
"resourcesToAttributions"
],
"additionalProperties": false,
"properties": {
"resources": {
"id": "#ResourcesSchema",
"type": "object",
"description": "A file tree stored recursively. Folders are objects with their child filenames as fields, files are the number `1`.",
"additionalProperties": {
"oneOf": [
{
"$ref": "#ResourcesSchema"
},
{
"type": "number",
"minimum": 1,
"maximum": 1
}
]
}
},
"metadata": {
"type": "object",
"description": "The entire metadata can be viewed by the user in the `File` menu, and can contain more entries than specified here.",
"properties": {
"projectId": {
"type": "string",
"description": "An ID for the compliance scan, to be copied into the output file."
},
"fileCreationDate": {
"type": "string",
"description": "Only for documentation, arbitrary format."
},
"projectTitle": {
"type": "string",
"description": "To be shown as application title when the file is opened."
}
},
"required": ["projectId"],
"additionalProperties": true
},
"externalAttributions": {
"type": "object",
"description": "Signals containing attribution information about a file or folder. Each signal gets a UUID as attribution ID.",
"additionalProperties": {
"type": "object",
"properties": {
"source": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Where the information came from (e.g. a tool like ScanCode)"
},
"documentConfidence": {
"type": "number",
"description": "How much the information is trusted (0: bad, 100: good)",
"minimum": 0,
"maximum": 100
},
"additionalName": {
"type": "string",
"description": "Original source for suggested signals (e.g. a tool like ScanCode)"
}
},
"required": ["name", "documentConfidence"],
"additionalProperties": false
},
"packageName": {
"type": "string",
"description": "Name of the package (part of a package URL)"
},
"packageVersion": {
"type": "string",
"description": "Version of the package (part of a package URL)"
},
"packageNamespace": {
"type": "string",
"description": "Namespace of the pacakge, e.g. Github user (part of a package URL)"
},
"packageType": {
"type": "string",
"description": "Protocol of the package, e.g. npm, maven (part of a package URL)"
},
"packagePURLAppendix": {
"type": "string",
"description": "Qualifiers and subpaths of a package URL"
},
"url": {
"type": "string",
"description": "URL for the source website of the package"
},
"licenseName": {
"type": "string",
"description": "Name of the license, ideally SPDX identifier but can also contain arbitrary names"
},
"licenseText": {
"type": "string",
"description": "Text of the license"
},
"attributionConfidence": {
"type": "number",
"description": "How much the information is trusted (0: bad, 100: good)",
"minimum": 0,
"maximum": 100
},
"comment": {
"type": "string",
"description": "Additional human-readable comments about the attribution that don't fit into other fields"
},
"criticality": {
"type": "string",
"description": "Indication on how critical a signal is. Possible values are \"high\" and \"medium\"."
},
"copyright": {
"type": "string",
"description": "Copyright of the package"
},
"firstParty": {
"type": "boolean",
"description": "Indicates that something is first-party code."
},
"preSelected": {
"type": "boolean",
"description": "Pre-selected attributions are directly converted from signals into selected attributions when the input file is opened."
},
"excludeFromNotice": {
"type": "boolean",
"description": "Indicates that an attribution should not be included in a notice file."
},
"followUp": {
"type": "string",
"enum": ["FOLLOW_UP"],
"description": "Indicates that an attribution is problematic and needs to be followed up."
},
"originId": {
"type": "string",
"description": "Deprecated - originIds should be used instead. Can be set to track a signal from the tooling that generated the input file. Will be copied into the output when the signal is converted into an attribution.",
"deprecated": true
},
"originIds": {
"type": "array",
"description": "Like originId but considers that a signal can have more than a single origin.",
"items": {
"type": "string"
}
},
"preferred": {
"type": "boolean",
"description": "Indicates that the attribution has been marked as preferred by a user."
},
"preferredOverOriginIds": {
"type": "array",
"description": "OriginIds of all attributions this one is preferred over.",
"items": {
"type": "string"
}
},
"wasPreferred": {
"type": "boolean",
"description": "Indicates that the attribution had previously been marked as preferred."
}
},
"required": ["source"],
"additionalProperties": false
}
},
"resourcesToAttributions": {
"type": "object",
"description": "Map from a path in the resource tree (e.g. `/folder/subfolder/`, `/folder/file`, note the mandatory slashes at the beginning and end) to a list of attribution IDs.",
"additionalProperties": {
"type": "array",
"description": "List of attribution IDs",
"items": {
"type": "string"
}
}
},
"frequentLicenses": {
"type": "array",
"description": "A list of frequent licenses that can be selected in a dropdown when the user enters a license name.",
"items": {
"type": "object",
"properties": {
"fullName": {
"type": "string",
"description": "Human-readable name of the license, currently unused"
},
"shortName": {
"type": "string",
"description": "Typically the SPDX identifier, to be shown in the dropdown"
},
"defaultText": {
"type": "string",
"description": "Text of the license"
}
},
"required": ["fullName", "shortName", "defaultText"]
}
},
"attributionBreakpoints": {
"type": "array",
"description": "A folder paths where attribution inference stops, e.g. node_modules.",
"items": {
"type": "string"
}
},
"filesWithChildren": {
"type": "array",
"description": "A list of folders that are treated as files. This can be used to attach another file tree to files like `package.json`, usually also setting an attribution breakpoint.",
"items": {
"type": "string"
}
},
"baseUrlsForSources": {
"type": "object",
"description": "Map from paths to the respective base url. The base url should contain a {path} placeholder. E.g. https://github.com/opossum-tool/opossumUI/blob/main/{path}. The base url might be null to indicate a missing link.",
"additionalProperties": true
},
"externalAttributionSources": {
"type": "object",
"description": "A mapping of attribution sources to prettified names and priority, which is used for ordering in the PackagePanel. The lower the number the further up the source appears in the PackagePanel.",
"additionalProperties": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"priority": {
"type": "integer"
},
"isRelevantForPreferred": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": ["name", "priority"]
}
}
}
}