@portll/cobolwork 0.6.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.
Files changed (140) hide show
  1. package/README.md +49 -18
  2. package/STABILITY.md +76 -0
  3. package/bin/cobolwork.mjs +30 -7
  4. package/lib/bms.mjs +21 -7
  5. package/lib/build.mjs +108 -53
  6. package/lib/capabilities.mjs +9 -10
  7. package/lib/cics-commands.mjs +501 -9
  8. package/lib/compliance.mjs +11 -0
  9. package/lib/consequence.mjs +13 -0
  10. package/lib/control-workers.mjs +161 -0
  11. package/lib/control.mjs +52 -3
  12. package/lib/dataflow.mjs +176 -125
  13. package/lib/db2/cursor.mjs +15 -0
  14. package/lib/db2/read.mjs +170 -0
  15. package/lib/db2/rules.mjs +77 -0
  16. package/lib/db2/stmt/alter.mjs +473 -0
  17. package/lib/db2/stmt/grant.mjs +125 -0
  18. package/lib/db2/stmt/index.mjs +141 -0
  19. package/lib/db2/stmt/misc.mjs +325 -0
  20. package/lib/db2/stmt/routine.mjs +564 -0
  21. package/lib/db2/stmt/storage.mjs +146 -0
  22. package/lib/db2/stmt/table.mjs +540 -0
  23. package/lib/db2/stmt/view.mjs +146 -0
  24. package/lib/diff.mjs +17 -5
  25. package/lib/evidence/cli.mjs +14 -3
  26. package/lib/evidence/record.mjs +1 -1
  27. package/lib/evidence/store.mjs +44 -31
  28. package/lib/exec-reading.mjs +51 -0
  29. package/lib/execution.mjs +3 -2
  30. package/lib/explain.mjs +2 -0
  31. package/lib/exploitability.mjs +11 -2
  32. package/lib/hlasm/asm/data.mjs +13 -1
  33. package/lib/hlasm/asm/sections.mjs +3 -1
  34. package/lib/hlasm/instr.mjs +25 -0
  35. package/lib/hlasm/macro/authorization.mjs +24 -4
  36. package/lib/hlasm/macro/datasets.mjs +30 -17
  37. package/lib/hlasm/macro/io.mjs +68 -45
  38. package/lib/hlasm/macro/le.mjs +2 -2
  39. package/lib/hlasm/macro/operator.mjs +32 -21
  40. package/lib/hlasm/macro/program.mjs +126 -84
  41. package/lib/hlasm/macro/recovery.mjs +10 -5
  42. package/lib/hlasm/macro/storage.mjs +64 -14
  43. package/lib/hlasm/macro/structured.mjs +1 -1
  44. package/lib/hlasm/model.mjs +35 -10
  45. package/lib/hlasm/mvs38.mjs +47 -0
  46. package/lib/hlasm/operands.mjs +10 -0
  47. package/lib/hlasm/optable.mjs +61 -0
  48. package/lib/hlasm/read.mjs +22 -8
  49. package/lib/hlasm.mjs +44 -7
  50. package/lib/ims/dli.mjs +37 -0
  51. package/lib/ims/macro/dbd.mjs +299 -0
  52. package/lib/ims/macro/psb.mjs +286 -0
  53. package/lib/ims/model.mjs +149 -0
  54. package/lib/ims/operands.mjs +23 -0
  55. package/lib/ims/read.mjs +37 -0
  56. package/lib/ims/rules.mjs +135 -0
  57. package/lib/ironwork.mjs +17 -13
  58. package/lib/kernel/pds-archive.mjs +256 -0
  59. package/lib/kernel/registry.mjs +14 -8
  60. package/lib/kernel/shared-pass.mjs +34 -9
  61. package/lib/kernel/source-tree.mjs +104 -36
  62. package/lib/kernel/version-key.mjs +17 -0
  63. package/lib/layout.mjs +26 -31
  64. package/lib/parser.mjs +136 -17
  65. package/lib/pli/cursor.mjs +15 -0
  66. package/lib/pli/expr.mjs +101 -0
  67. package/lib/pli/include.mjs +82 -0
  68. package/lib/pli/layout.mjs +125 -0
  69. package/lib/pli/lex.mjs +198 -0
  70. package/lib/pli/program.mjs +280 -0
  71. package/lib/pli/rules/based.mjs +95 -0
  72. package/lib/pli/rules/conditions.mjs +68 -0
  73. package/lib/pli/rules/entry.mjs +130 -0
  74. package/lib/pli/rules/index.mjs +24 -0
  75. package/lib/pli/rules/preprocessor.mjs +55 -0
  76. package/lib/pli/statements.mjs +130 -0
  77. package/lib/pli/stmt/alloc.mjs +45 -0
  78. package/lib/pli/stmt/assignment.mjs +56 -0
  79. package/lib/pli/stmt/call.mjs +104 -0
  80. package/lib/pli/stmt/conditions.mjs +94 -0
  81. package/lib/pli/stmt/control.mjs +219 -0
  82. package/lib/pli/stmt/declare.mjs +149 -0
  83. package/lib/pli/stmt/exec.mjs +55 -0
  84. package/lib/pli/stmt/io.mjs +239 -0
  85. package/lib/pli/stmt/misc.mjs +4 -0
  86. package/lib/pli/stmt/preprocessor.mjs +242 -0
  87. package/lib/pli/stmt/procedure.mjs +258 -0
  88. package/lib/pli/stmt/stream.mjs +283 -0
  89. package/lib/pli/storage.mjs +129 -0
  90. package/lib/precompile-check.mjs +124 -0
  91. package/lib/precompile-cics.mjs +7 -3
  92. package/lib/reach.mjs +11 -2
  93. package/lib/revision.json +1 -1
  94. package/lib/sarif.mjs +41 -3
  95. package/lib/scan.mjs +7 -1
  96. package/lib/sets/abend.mjs +16 -6
  97. package/lib/sets/cics.mjs +15 -35
  98. package/lib/sets/compile.mjs +41 -15
  99. package/lib/sets/crypto.mjs +5 -3
  100. package/lib/sets/ddl.mjs +36 -0
  101. package/lib/sets/flow.mjs +18 -1
  102. package/lib/sets/hidden.mjs +5 -3
  103. package/lib/sets/hlasm.mjs +72 -12
  104. package/lib/sets/ims.mjs +139 -0
  105. package/lib/sets/log.mjs +6 -6
  106. package/lib/sets/opaque.mjs +27 -7
  107. package/lib/sets/pli.mjs +40 -0
  108. package/lib/sets/recon.mjs +5 -3
  109. package/lib/sets/secrets.mjs +5 -3
  110. package/lib/sets/semantics.mjs +3 -0
  111. package/lib/sets/web.mjs +36 -22
  112. package/lib/site.mjs +10 -0
  113. package/lib/sources.mjs +80 -20
  114. package/lib/statement-cursor.mjs +67 -0
  115. package/lib/verify.mjs +3 -2
  116. package/lib/version.mjs +6 -0
  117. package/package.json +3 -2
  118. package/rules/compliance-cobit2019.json +432 -1
  119. package/rules/compliance-dora.json +414 -1
  120. package/rules/compliance-ffiec.json +414 -1
  121. package/rules/compliance-nist80053.json +466 -1
  122. package/rules/hlasm-optables.json +8024 -0
  123. package/schema/cobolwork-baseline.schema.json +36 -0
  124. package/schema/cobolwork-build-provenance.schema.json +187 -0
  125. package/schema/cobolwork-build.schema.json +382 -0
  126. package/schema/cobolwork-capabilities.schema.json +239 -0
  127. package/schema/cobolwork-diff.schema.json +217 -0
  128. package/schema/cobolwork-evidence.schema.json +161 -0
  129. package/schema/cobolwork-execution.schema.json +53 -0
  130. package/schema/cobolwork-explain.schema.json +360 -0
  131. package/schema/cobolwork-finding.schema.json +465 -0
  132. package/schema/cobolwork-flow.schema.json +465 -0
  133. package/schema/cobolwork-gate.schema.json +211 -0
  134. package/schema/cobolwork-inventory.schema.json +206 -0
  135. package/schema/cobolwork-parse.schema.json +105 -0
  136. package/schema/cobolwork-reach.schema.json +74 -0
  137. package/schema/cobolwork-report.schema.json +559 -0
  138. package/schema/cobolwork-witness.schema.json +107 -0
  139. package/schema/cobolwork.baseline.schema.json +101 -0
  140. 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
+ }