@portll/cobolwork 0.5.0 → 0.7.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.
- package/README.md +89 -26
- package/STABILITY.md +76 -0
- package/bin/cobolwork.mjs +56 -14
- package/lib/baseline.mjs +9 -0
- package/lib/bms.mjs +21 -7
- package/lib/build.mjs +133 -53
- package/lib/capabilities.mjs +13 -11
- package/lib/cics-commands.mjs +501 -9
- package/lib/compliance.mjs +11 -0
- package/lib/consequence.mjs +17 -0
- package/lib/control-reuse.mjs +113 -0
- package/lib/control-workers.mjs +161 -0
- package/lib/control.mjs +77 -4
- package/lib/dataflow.mjs +402 -152
- package/lib/db2/cursor.mjs +15 -0
- package/lib/db2/read.mjs +170 -0
- package/lib/db2/rules.mjs +77 -0
- package/lib/db2/stmt/alter.mjs +473 -0
- package/lib/db2/stmt/grant.mjs +125 -0
- package/lib/db2/stmt/index.mjs +141 -0
- package/lib/db2/stmt/misc.mjs +325 -0
- package/lib/db2/stmt/routine.mjs +564 -0
- package/lib/db2/stmt/storage.mjs +146 -0
- package/lib/db2/stmt/table.mjs +540 -0
- package/lib/db2/stmt/view.mjs +146 -0
- package/lib/diff.mjs +17 -5
- package/lib/equivalence.mjs +44 -5
- package/lib/evidence/cli.mjs +26 -7
- package/lib/evidence/record.mjs +16 -6
- package/lib/evidence/seal.mjs +17 -0
- package/lib/evidence/store.mjs +44 -15
- package/lib/evidence/timestamp.mjs +83 -0
- package/lib/evidence/verify.mjs +120 -42
- package/lib/exec-reading.mjs +51 -0
- package/lib/execution.mjs +3 -2
- package/lib/explain.mjs +2 -0
- package/lib/exploitability.mjs +11 -2
- package/lib/hlasm/asm/data.mjs +128 -0
- package/lib/hlasm/asm/listing.mjs +43 -0
- package/lib/hlasm/asm/output.mjs +45 -0
- package/lib/hlasm/asm/sections.mjs +161 -0
- package/lib/hlasm/asm/symbols.mjs +78 -0
- package/lib/hlasm/exec.mjs +27 -0
- package/lib/hlasm/expr.mjs +167 -0
- package/lib/hlasm/instr.mjs +73 -0
- package/lib/hlasm/locate.mjs +333 -0
- package/lib/hlasm/macro/authorization.mjs +146 -0
- package/lib/hlasm/macro/datasets.mjs +107 -0
- package/lib/hlasm/macro/io.mjs +162 -0
- package/lib/hlasm/macro/le.mjs +53 -0
- package/lib/hlasm/macro/linkage.mjs +143 -0
- package/lib/hlasm/macro/operator.mjs +77 -0
- package/lib/hlasm/macro/program.mjs +184 -0
- package/lib/hlasm/macro/recovery.mjs +85 -0
- package/lib/hlasm/macro/storage.mjs +167 -0
- package/lib/hlasm/macro/structured.mjs +131 -0
- package/lib/hlasm/model.mjs +97 -0
- package/lib/hlasm/mvs38.mjs +47 -0
- package/lib/hlasm/operands.mjs +59 -0
- package/lib/hlasm/optable.mjs +61 -0
- package/lib/hlasm/read.mjs +130 -0
- package/lib/hlasm.mjs +44 -7
- package/lib/ims/dli.mjs +37 -0
- package/lib/ims/macro/dbd.mjs +299 -0
- package/lib/ims/macro/psb.mjs +286 -0
- package/lib/ims/model.mjs +149 -0
- package/lib/ims/operands.mjs +23 -0
- package/lib/ims/read.mjs +37 -0
- package/lib/ims/rules.mjs +135 -0
- package/lib/inventory.mjs +10 -7
- package/lib/ironwork-ids.mjs +24 -0
- package/lib/ironwork.mjs +20 -13
- package/lib/kernel/pds-archive.mjs +256 -0
- package/lib/kernel/registry.mjs +32 -23
- package/lib/kernel/shared-pass.mjs +163 -0
- package/lib/kernel/source-tree.mjs +104 -36
- package/lib/kernel/version-key.mjs +17 -0
- package/lib/layout.mjs +26 -31
- package/lib/options.mjs +26 -4
- package/lib/parser.mjs +136 -17
- package/lib/pli/cursor.mjs +15 -0
- package/lib/pli/expr.mjs +101 -0
- package/lib/pli/include.mjs +82 -0
- package/lib/pli/layout.mjs +125 -0
- package/lib/pli/lex.mjs +198 -0
- package/lib/pli/program.mjs +280 -0
- package/lib/pli/rules/based.mjs +95 -0
- package/lib/pli/rules/conditions.mjs +68 -0
- package/lib/pli/rules/entry.mjs +130 -0
- package/lib/pli/rules/index.mjs +24 -0
- package/lib/pli/rules/preprocessor.mjs +55 -0
- package/lib/pli/statements.mjs +130 -0
- package/lib/pli/stmt/alloc.mjs +45 -0
- package/lib/pli/stmt/assignment.mjs +56 -0
- package/lib/pli/stmt/call.mjs +104 -0
- package/lib/pli/stmt/conditions.mjs +94 -0
- package/lib/pli/stmt/control.mjs +219 -0
- package/lib/pli/stmt/declare.mjs +149 -0
- package/lib/pli/stmt/exec.mjs +55 -0
- package/lib/pli/stmt/io.mjs +239 -0
- package/lib/pli/stmt/misc.mjs +4 -0
- package/lib/pli/stmt/preprocessor.mjs +242 -0
- package/lib/pli/stmt/procedure.mjs +258 -0
- package/lib/pli/stmt/stream.mjs +283 -0
- package/lib/pli/storage.mjs +129 -0
- package/lib/policy.mjs +6 -0
- package/lib/precompile-check.mjs +124 -0
- package/lib/precompile-cics.mjs +8 -4
- package/lib/reach.mjs +11 -2
- package/lib/revision.json +1 -1
- package/lib/sarif.mjs +44 -3
- package/lib/scan.mjs +28 -12
- package/lib/sets/abend.mjs +82 -8
- package/lib/sets/build.mjs +43 -37
- package/lib/sets/cics.mjs +20 -38
- package/lib/sets/compile.mjs +46 -18
- package/lib/sets/copybook.mjs +5 -3
- package/lib/sets/crypto.mjs +5 -3
- package/lib/sets/ddl.mjs +36 -0
- package/lib/sets/flow.mjs +32 -8
- package/lib/sets/hidden.mjs +5 -3
- package/lib/sets/hlasm.mjs +124 -8
- package/lib/sets/ims.mjs +139 -0
- package/lib/sets/log.mjs +11 -9
- package/lib/sets/opaque.mjs +27 -7
- package/lib/sets/pli.mjs +40 -0
- package/lib/sets/priv.mjs +5 -3
- package/lib/sets/recon.mjs +5 -3
- package/lib/sets/secrets.mjs +112 -0
- package/lib/sets/semantics.mjs +8 -3
- package/lib/sets/web.mjs +39 -23
- package/lib/site.mjs +10 -0
- package/lib/sources.mjs +80 -20
- package/lib/statement-cursor.mjs +67 -0
- package/lib/verify.mjs +3 -2
- package/lib/version.mjs +6 -0
- package/package.json +3 -2
- package/rules/compliance-cobit2019.json +520 -5
- package/rules/compliance-dora.json +509 -5
- package/rules/compliance-ffiec.json +505 -1
- package/rules/compliance-nist80053.json +557 -1
- package/rules/gitleaks-mainframe.toml +46 -15
- package/rules/hlasm-instructions.json +2396 -0
- package/rules/hlasm-optables.json +8024 -0
- package/schema/cobolwork-baseline.schema.json +36 -0
- package/schema/cobolwork-build-provenance.schema.json +187 -0
- package/schema/cobolwork-build.schema.json +382 -0
- package/schema/cobolwork-capabilities.schema.json +239 -0
- package/schema/cobolwork-diff.schema.json +217 -0
- package/schema/cobolwork-evidence.schema.json +161 -0
- package/schema/cobolwork-execution.schema.json +53 -0
- package/schema/cobolwork-explain.schema.json +360 -0
- package/schema/cobolwork-finding.schema.json +465 -0
- package/schema/cobolwork-flow.schema.json +465 -0
- package/schema/cobolwork-gate.schema.json +211 -0
- package/schema/cobolwork-inventory.schema.json +206 -0
- package/schema/cobolwork-parse.schema.json +105 -0
- package/schema/cobolwork-reach.schema.json +74 -0
- package/schema/cobolwork-report.schema.json +559 -0
- package/schema/cobolwork-witness.schema.json +107 -0
- package/schema/cobolwork.baseline.schema.json +101 -0
- package/schema/cobolwork.policy.schema.json +7 -0
- package/schema/cobolwork.site.schema.json +116 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/Portll/cobolwork/schema/cobolwork-explain.schema.json",
|
|
4
|
+
"title": "cobolwork explain",
|
|
5
|
+
"description": "One finding with the source behind it, for a person or a model to act on. It carries source text, which a report never does. A later minor release may add keys; a reader ignores keys it does not know.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"tool",
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"carriesSource",
|
|
11
|
+
"note",
|
|
12
|
+
"fingerprint",
|
|
13
|
+
"shared",
|
|
14
|
+
"finding",
|
|
15
|
+
"hops",
|
|
16
|
+
"sink",
|
|
17
|
+
"guard",
|
|
18
|
+
"related",
|
|
19
|
+
"declarations",
|
|
20
|
+
"verify",
|
|
21
|
+
"unread"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"tool": {
|
|
25
|
+
"const": "cobolwork-explain"
|
|
26
|
+
},
|
|
27
|
+
"schemaVersion": {
|
|
28
|
+
"const": 1
|
|
29
|
+
},
|
|
30
|
+
"carriesSource": {
|
|
31
|
+
"const": true
|
|
32
|
+
},
|
|
33
|
+
"note": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"fingerprint": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"pattern": "^[0-9a-f]{32}$"
|
|
39
|
+
},
|
|
40
|
+
"shared": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"description": "How many findings share the fingerprint."
|
|
44
|
+
},
|
|
45
|
+
"suppressed": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"description": "The baseline entry that suppresses the finding."
|
|
48
|
+
},
|
|
49
|
+
"finding": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": [
|
|
52
|
+
"rule",
|
|
53
|
+
"sev",
|
|
54
|
+
"evidence",
|
|
55
|
+
"path",
|
|
56
|
+
"line",
|
|
57
|
+
"detail"
|
|
58
|
+
],
|
|
59
|
+
"properties": {
|
|
60
|
+
"rule": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"sev": {
|
|
64
|
+
"enum": [
|
|
65
|
+
"info",
|
|
66
|
+
"low",
|
|
67
|
+
"med",
|
|
68
|
+
"high",
|
|
69
|
+
"crit"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"guardedFrom": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"cwe": {
|
|
76
|
+
"type": [
|
|
77
|
+
"string",
|
|
78
|
+
"null"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"evidence": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
"claim": {
|
|
85
|
+
"type": [
|
|
86
|
+
"string",
|
|
87
|
+
"null"
|
|
88
|
+
],
|
|
89
|
+
"description": "What the evidence kind establishes."
|
|
90
|
+
},
|
|
91
|
+
"whoActs": {
|
|
92
|
+
"type": [
|
|
93
|
+
"string",
|
|
94
|
+
"null"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"impact": {
|
|
98
|
+
"type": [
|
|
99
|
+
"string",
|
|
100
|
+
"null"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"remedy": {
|
|
104
|
+
"type": [
|
|
105
|
+
"string",
|
|
106
|
+
"null"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"program": {
|
|
110
|
+
"type": [
|
|
111
|
+
"string",
|
|
112
|
+
"null"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"path": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"line": {
|
|
119
|
+
"type": [
|
|
120
|
+
"integer",
|
|
121
|
+
"null"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"crossProgram": {
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
},
|
|
127
|
+
"detail": {
|
|
128
|
+
"type": "string"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"hops": {
|
|
133
|
+
"type": "array",
|
|
134
|
+
"description": "Each step of the route from source to sink.",
|
|
135
|
+
"items": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"n": {
|
|
139
|
+
"type": "integer",
|
|
140
|
+
"minimum": 0
|
|
141
|
+
},
|
|
142
|
+
"program": {
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
"item": {
|
|
146
|
+
"type": "string"
|
|
147
|
+
},
|
|
148
|
+
"file": {
|
|
149
|
+
"type": "string"
|
|
150
|
+
},
|
|
151
|
+
"via": {
|
|
152
|
+
"type": "string"
|
|
153
|
+
},
|
|
154
|
+
"path": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"line": {
|
|
158
|
+
"type": [
|
|
159
|
+
"integer",
|
|
160
|
+
"null"
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"code": {
|
|
164
|
+
"type": "string"
|
|
165
|
+
},
|
|
166
|
+
"why": {
|
|
167
|
+
"type": "string"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"sink": {
|
|
173
|
+
"$ref": "#/$defs/location"
|
|
174
|
+
},
|
|
175
|
+
"guard": {
|
|
176
|
+
"type": [
|
|
177
|
+
"object",
|
|
178
|
+
"null"
|
|
179
|
+
],
|
|
180
|
+
"description": "The check that guards the route, where the finding names one."
|
|
181
|
+
},
|
|
182
|
+
"related": {
|
|
183
|
+
"type": "array",
|
|
184
|
+
"items": {
|
|
185
|
+
"$ref": "#/$defs/location"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"declarations": {
|
|
189
|
+
"type": "array",
|
|
190
|
+
"description": "The data items on the route, as declared.",
|
|
191
|
+
"items": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"properties": {
|
|
194
|
+
"program": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
"item": {
|
|
198
|
+
"type": "string"
|
|
199
|
+
},
|
|
200
|
+
"level": {
|
|
201
|
+
"type": "integer"
|
|
202
|
+
},
|
|
203
|
+
"picture": {
|
|
204
|
+
"type": [
|
|
205
|
+
"string",
|
|
206
|
+
"null"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
"usage": {
|
|
210
|
+
"type": [
|
|
211
|
+
"string",
|
|
212
|
+
"null"
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"size": {
|
|
216
|
+
"type": [
|
|
217
|
+
"integer",
|
|
218
|
+
"null"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"offset": {
|
|
222
|
+
"type": [
|
|
223
|
+
"integer",
|
|
224
|
+
"null"
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
"section": {
|
|
228
|
+
"type": [
|
|
229
|
+
"string",
|
|
230
|
+
"null"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"occurs": {
|
|
234
|
+
"type": [
|
|
235
|
+
"integer",
|
|
236
|
+
"null"
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
"redefines": {
|
|
240
|
+
"type": [
|
|
241
|
+
"string",
|
|
242
|
+
"null"
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
"path": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"line": {
|
|
249
|
+
"type": [
|
|
250
|
+
"integer",
|
|
251
|
+
"null"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"verify": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"description": "How to reproduce the finding in a test region the estate owns.",
|
|
260
|
+
"required": [
|
|
261
|
+
"where",
|
|
262
|
+
"start",
|
|
263
|
+
"tool",
|
|
264
|
+
"enter",
|
|
265
|
+
"value",
|
|
266
|
+
"observe",
|
|
267
|
+
"run",
|
|
268
|
+
"record"
|
|
269
|
+
],
|
|
270
|
+
"properties": {
|
|
271
|
+
"where": {
|
|
272
|
+
"type": "string"
|
|
273
|
+
},
|
|
274
|
+
"start": {
|
|
275
|
+
"type": "string"
|
|
276
|
+
},
|
|
277
|
+
"tool": {
|
|
278
|
+
"type": "string"
|
|
279
|
+
},
|
|
280
|
+
"enter": {
|
|
281
|
+
"type": "string"
|
|
282
|
+
},
|
|
283
|
+
"value": {
|
|
284
|
+
"type": [
|
|
285
|
+
"string",
|
|
286
|
+
"null"
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
"observe": {
|
|
290
|
+
"type": "string"
|
|
291
|
+
},
|
|
292
|
+
"run": {
|
|
293
|
+
"type": [
|
|
294
|
+
"string",
|
|
295
|
+
"null"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"stopBefore": {
|
|
299
|
+
"type": "string"
|
|
300
|
+
},
|
|
301
|
+
"check": {
|
|
302
|
+
"type": "string"
|
|
303
|
+
},
|
|
304
|
+
"record": {
|
|
305
|
+
"type": "string"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"unread": {
|
|
310
|
+
"type": "array",
|
|
311
|
+
"description": "Files the packet names and could not quote.",
|
|
312
|
+
"items": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"required": [
|
|
315
|
+
"path",
|
|
316
|
+
"why"
|
|
317
|
+
],
|
|
318
|
+
"properties": {
|
|
319
|
+
"path": {
|
|
320
|
+
"type": "string"
|
|
321
|
+
},
|
|
322
|
+
"why": {
|
|
323
|
+
"type": "string"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"$defs": {
|
|
330
|
+
"location": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"required": [
|
|
333
|
+
"path",
|
|
334
|
+
"line"
|
|
335
|
+
],
|
|
336
|
+
"properties": {
|
|
337
|
+
"path": {
|
|
338
|
+
"type": "string"
|
|
339
|
+
},
|
|
340
|
+
"line": {
|
|
341
|
+
"type": [
|
|
342
|
+
"integer",
|
|
343
|
+
"null"
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
"detail": {
|
|
347
|
+
"type": "string"
|
|
348
|
+
},
|
|
349
|
+
"code": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"description": "The source line, read from the tree."
|
|
352
|
+
},
|
|
353
|
+
"why": {
|
|
354
|
+
"type": "string",
|
|
355
|
+
"description": "Why the line could not be quoted."
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|