@fabasoad/sarif-to-slack 1.3.0 → 1.3.2
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/.gitattributes +1 -0
- package/.github/workflows/release.yml +3 -3
- package/.github/workflows/send-sarif-to-slack.yml +15 -12
- package/.pre-commit-config.yaml +2 -1
- package/.tool-versions +1 -1
- package/README.md +47 -12
- package/biome.json +5 -52
- package/dist/Logger.js +51 -22
- package/dist/SarifToSlackClient.d.ts +12 -10
- package/dist/SarifToSlackClient.d.ts.map +1 -1
- package/dist/SarifToSlackClient.js +28 -15
- package/dist/index.cjs +612 -244
- package/dist/index.d.ts +1 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -8
- package/dist/model/Finding.js +4 -3
- package/dist/model/SlackMessage.d.ts +0 -16
- package/dist/model/SlackMessage.d.ts.map +1 -1
- package/dist/model/color/ColorIdentification.js +50 -46
- package/dist/model/color/ColorOptions.d.ts +1 -1
- package/dist/model/color/ColorOptions.d.ts.map +1 -1
- package/dist/representations/CompactGroupByRepresentation.js +2 -2
- package/dist/representations/Representation.js +6 -2
- package/dist/representations/RepresentationFactory.js +19 -1
- package/dist/representations/TableGroupByRunPerLevelRepresentation.d.ts +6 -0
- package/dist/representations/TableGroupByRunPerLevelRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupByRunPerLevelRepresentation.js +8 -0
- package/dist/representations/TableGroupByRunPerSeverityRepresentation.d.ts +6 -0
- package/dist/representations/TableGroupByRunPerSeverityRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupByRunPerSeverityRepresentation.js +8 -0
- package/dist/representations/TableGroupByRunRepresentation.d.ts +7 -0
- package/dist/representations/TableGroupByRunRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupByRunRepresentation.js +7 -0
- package/dist/representations/TableGroupBySarifPerLevelRepresentation.d.ts +6 -0
- package/dist/representations/TableGroupBySarifPerLevelRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupBySarifPerLevelRepresentation.js +8 -0
- package/dist/representations/TableGroupBySarifPerSeverityRepresentation.d.ts +6 -0
- package/dist/representations/TableGroupBySarifPerSeverityRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupBySarifPerSeverityRepresentation.js +8 -0
- package/dist/representations/TableGroupBySarifRepresentation.d.ts +9 -0
- package/dist/representations/TableGroupBySarifRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupBySarifRepresentation.js +15 -0
- package/dist/representations/TableGroupByToolNamePerLevelRepresentation.d.ts +6 -0
- package/dist/representations/TableGroupByToolNamePerLevelRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupByToolNamePerLevelRepresentation.js +8 -0
- package/dist/representations/TableGroupByToolNamePerSeverityRepresentation.d.ts +6 -0
- package/dist/representations/TableGroupByToolNamePerSeverityRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupByToolNamePerSeverityRepresentation.js +8 -0
- package/dist/representations/TableGroupByToolNameRepresentation.d.ts +7 -0
- package/dist/representations/TableGroupByToolNameRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupByToolNameRepresentation.js +7 -0
- package/dist/representations/TableGroupRepresentation.d.ts +16 -0
- package/dist/representations/TableGroupRepresentation.d.ts.map +1 -0
- package/dist/representations/TableGroupRepresentation.js +62 -0
- package/dist/representations/table/Cell.d.ts +10 -0
- package/dist/representations/table/Cell.d.ts.map +1 -0
- package/dist/representations/table/Cell.js +23 -0
- package/dist/representations/table/Column.d.ts +11 -0
- package/dist/representations/table/Column.d.ts.map +1 -0
- package/dist/representations/table/Column.js +31 -0
- package/dist/representations/table/Row.d.ts +15 -0
- package/dist/representations/table/Row.d.ts.map +1 -0
- package/dist/representations/table/Row.js +45 -0
- package/dist/representations/table/Table.d.ts +14 -0
- package/dist/representations/table/Table.d.ts.map +1 -0
- package/dist/representations/table/Table.js +66 -0
- package/dist/sarif-to-slack.d.ts +98 -88
- package/dist/system.d.ts +2 -0
- package/dist/system.d.ts.map +1 -0
- package/dist/system.js +24 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types.d.ts +90 -56
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +89 -42
- package/dist/utils/FileUtils.js +23 -21
- package/dist/utils/StringUtils.d.ts +2 -0
- package/dist/utils/StringUtils.d.ts.map +1 -0
- package/dist/utils/StringUtils.js +5 -0
- package/etc/sarif-to-slack.api.md +8 -36
- package/package.json +11 -11
- package/src/Logger.ts +64 -26
- package/src/SarifToSlackClient.ts +42 -29
- package/src/index.ts +0 -9
- package/src/model/Finding.ts +14 -13
- package/src/model/FindingArray.ts +1 -1
- package/src/model/SlackMessage.ts +5 -5
- package/src/model/color/ColorIdentification.ts +66 -50
- package/src/model/color/ColorOptions.ts +1 -1
- package/src/processors/CodeQLProcessor.ts +1 -1
- package/src/representations/CompactGroupByRepresentation.ts +2 -2
- package/src/representations/CompactGroupByRunRepresentation.ts +2 -2
- package/src/representations/CompactGroupBySarifRepresentation.ts +2 -2
- package/src/representations/CompactGroupByToolNameRepresentation.ts +2 -2
- package/src/representations/CompactTotalRepresentation.ts +1 -1
- package/src/representations/Representation.ts +9 -4
- package/src/representations/RepresentationFactory.ts +26 -2
- package/src/representations/TableGroupByRunPerLevelRepresentation.ts +9 -0
- package/src/representations/TableGroupByRunPerSeverityRepresentation.ts +9 -0
- package/src/representations/TableGroupByRunRepresentation.ts +15 -0
- package/src/representations/TableGroupBySarifPerLevelRepresentation.ts +9 -0
- package/src/representations/TableGroupBySarifPerSeverityRepresentation.ts +9 -0
- package/src/representations/TableGroupBySarifRepresentation.ts +25 -0
- package/src/representations/TableGroupByToolNamePerLevelRepresentation.ts +10 -0
- package/src/representations/TableGroupByToolNamePerSeverityRepresentation.ts +10 -0
- package/src/representations/TableGroupByToolNameRepresentation.ts +15 -0
- package/src/representations/TableGroupRepresentation.ts +78 -0
- package/src/representations/table/Cell.ts +25 -0
- package/src/representations/table/Column.ts +39 -0
- package/src/representations/table/Row.ts +50 -0
- package/src/representations/table/Table.ts +93 -0
- package/src/system.ts +27 -0
- package/src/types.ts +98 -58
- package/src/utils/Comparators.ts +1 -1
- package/src/utils/FileUtils.ts +30 -27
- package/src/utils/StringUtils.ts +7 -0
- package/test-data/sarif/codeql-go.sarif +1 -1
- package/test-data/sarif/runs-1-extensions-1-results-0.sarif +2 -2
- package/test-data/sarif/snyk-hex.sarif +1 -1
- package/tests/integration/SendSarifToSlack.spec.ts +73 -83
- package/tests/representations/table/Table.spec.ts +174 -0
- package/dist/System.d.ts +0 -2
- package/dist/System.d.ts.map +0 -1
- package/dist/System.js +0 -15
- package/src/System.ts +0 -16
- /package/test-data/sarif/{tmp → multiple}/codeql-csharp.sarif +0 -0
- /package/test-data/sarif/{tmp → multiple}/grype-container.sarif +0 -0
- /package/test-data/sarif/{tmp → multiple}/runs-1-tools-1-results-0.sarif +0 -0
- /package/test-data/sarif/{tmp → multiple}/runs-2-tools-2.sarif +0 -0
package/dist/sarif-to-slack.d.ts
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* import {
|
|
11
11
|
* Color,
|
|
12
12
|
* FooterType,
|
|
13
|
-
* LogLevel,
|
|
14
13
|
* RepresentationType,
|
|
15
14
|
* SarifToSlackClient,
|
|
16
15
|
* SendIf
|
|
@@ -44,11 +43,6 @@
|
|
|
44
43
|
* recursive: true,
|
|
45
44
|
* extension: 'sarif',
|
|
46
45
|
* },
|
|
47
|
-
* log: {
|
|
48
|
-
* level: LogLevel.Info,
|
|
49
|
-
* template: '[{{logLevelName}}] [{{name}}] {{dateIsoStr}} ',
|
|
50
|
-
* colored: false,
|
|
51
|
-
* },
|
|
52
46
|
* header: {
|
|
53
47
|
* include: true,
|
|
54
48
|
* value: 'SARIF Analysis Results'
|
|
@@ -207,60 +201,6 @@ export declare type IncludeAwareWithValueOptions = IncludeAwareOptions & {
|
|
|
207
201
|
value?: string;
|
|
208
202
|
};
|
|
209
203
|
|
|
210
|
-
/**
|
|
211
|
-
* Enum representing log levels for the service.
|
|
212
|
-
* @public
|
|
213
|
-
*/
|
|
214
|
-
export declare enum LogLevel {
|
|
215
|
-
/**
|
|
216
|
-
* Represents the most verbose logging level, typically used for detailed
|
|
217
|
-
* debugging information.
|
|
218
|
-
*/
|
|
219
|
-
Silly = 0,
|
|
220
|
-
/**
|
|
221
|
-
* Represents a logging level for tracing the flow of the application.
|
|
222
|
-
*/
|
|
223
|
-
Trace = 1,
|
|
224
|
-
/**
|
|
225
|
-
* Represents a logging level for debugging information that is less verbose
|
|
226
|
-
* than silly.
|
|
227
|
-
*/
|
|
228
|
-
Debug = 2,
|
|
229
|
-
/**
|
|
230
|
-
* Represents a logging level for general informational messages that highlight
|
|
231
|
-
* the progress of the application.
|
|
232
|
-
*/
|
|
233
|
-
Info = 3,
|
|
234
|
-
/**
|
|
235
|
-
* Represents a logging level for potentially harmful situations that require
|
|
236
|
-
* attention.
|
|
237
|
-
*/
|
|
238
|
-
Warning = 4,
|
|
239
|
-
/**
|
|
240
|
-
* Represents a logging level for error conditions that do not require immediate
|
|
241
|
-
* action but should be noted.
|
|
242
|
-
*/
|
|
243
|
-
Error = 5,
|
|
244
|
-
/**
|
|
245
|
-
* Represents a logging level for critical errors that require immediate attention
|
|
246
|
-
* and may cause the application to terminate.
|
|
247
|
-
*/
|
|
248
|
-
Fatal = 6
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Options for logging.
|
|
253
|
-
* @public
|
|
254
|
-
*/
|
|
255
|
-
export declare type LogOptions = {
|
|
256
|
-
level?: LogLevel;
|
|
257
|
-
/**
|
|
258
|
-
* More details here: https://github.com/fullstack-build/tslog?tab=readme-ov-file#pretty-templates-and-styles-color-settings
|
|
259
|
-
*/
|
|
260
|
-
template?: string;
|
|
261
|
-
colored?: boolean;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
204
|
/**
|
|
265
205
|
* This represents what type of message should be sent. There are various options
|
|
266
206
|
* to show information from SARIF in Slack message.
|
|
@@ -347,7 +287,93 @@ export declare enum RepresentationType {
|
|
|
347
287
|
* Critical: 1, High: 3, Medium: 2, Low: 20
|
|
348
288
|
* ```
|
|
349
289
|
*/
|
|
350
|
-
CompactTotalPerSeverity = 7
|
|
290
|
+
CompactTotalPerSeverity = 7,
|
|
291
|
+
/**
|
|
292
|
+
* Table information about findings grouped by Run with the level representation.
|
|
293
|
+
* @example
|
|
294
|
+
* ```text
|
|
295
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
296
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
297
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
298
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
299
|
+
* | 3 | 0 | 0 | 1 | 0 | 1 | 2 |
|
|
300
|
+
* | 4 | 0 | 0 | 5 | 5 | 0 | 10 |
|
|
301
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
302
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 52 |
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
305
|
+
TableGroupByRunPerLevel = 8,
|
|
306
|
+
/**
|
|
307
|
+
* Table information about findings grouped by Run with the severity representation.
|
|
308
|
+
* @example
|
|
309
|
+
* ```text
|
|
310
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
311
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
312
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
313
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
314
|
+
* | 3 | 0 | 0 | 1 | 0 | 1 | 0 | 2 |
|
|
315
|
+
* | 4 | 0 | 0 | 5 | 5 | 0 | 0 | 10 |
|
|
316
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
317
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 0 | 52 |
|
|
318
|
+
* ```
|
|
319
|
+
*/
|
|
320
|
+
TableGroupByRunPerSeverity = 9,
|
|
321
|
+
/**
|
|
322
|
+
* Table information about findings grouped by tool name with the level representation.
|
|
323
|
+
* @example
|
|
324
|
+
* ```text
|
|
325
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
326
|
+
* | ------ | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
327
|
+
* | CodeQL | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
328
|
+
* | grype | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
329
|
+
* | Trivy | 0 | 0 | 1 | 0 | 1 | 2 |
|
|
330
|
+
* | WizCLI | 0 | 0 | 5 | 5 | 0 | 10 |
|
|
331
|
+
* | ------ | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
332
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 52 |
|
|
333
|
+
* ```
|
|
334
|
+
*/
|
|
335
|
+
TableGroupByToolNamePerLevel = 10,
|
|
336
|
+
/**
|
|
337
|
+
* Table information about findings grouped by tool name with the severity representation.
|
|
338
|
+
* @example
|
|
339
|
+
* ```text
|
|
340
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
341
|
+
* | ------ | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
342
|
+
* | CodeQL | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
343
|
+
* | grype | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
344
|
+
* | Trivy | 0 | 0 | 1 | 0 | 1 | 0 | 2 |
|
|
345
|
+
* | WizCLI | 0 | 0 | 5 | 5 | 0 | 0 | 10 |
|
|
346
|
+
* | ------ | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
347
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 0 | 52 |
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
TableGroupByToolNamePerSeverity = 11,
|
|
351
|
+
/**
|
|
352
|
+
* Table information about findings grouped by SARIF file with the level representation.
|
|
353
|
+
* @example
|
|
354
|
+
* ```text
|
|
355
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
356
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
357
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
358
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
359
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
360
|
+
* | Total | 0 | 0 | 9 | 21 | 10 | 40 |
|
|
361
|
+
* ```
|
|
362
|
+
*/
|
|
363
|
+
TableGroupBySarifPerLevel = 12,
|
|
364
|
+
/**
|
|
365
|
+
* Table information about findings grouped by SARIF file with the severity representation.
|
|
366
|
+
* @example
|
|
367
|
+
* ```text
|
|
368
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
369
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
370
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
371
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
372
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
373
|
+
* | Total | 0 | 0 | 9 | 21 | 10 | 0 | 40 |
|
|
374
|
+
* ```
|
|
375
|
+
*/
|
|
376
|
+
TableGroupBySarifPerSeverity = 13
|
|
351
377
|
}
|
|
352
378
|
|
|
353
379
|
/**
|
|
@@ -372,22 +398,24 @@ export declare type SarifOptions = {
|
|
|
372
398
|
* @public
|
|
373
399
|
*/
|
|
374
400
|
export declare class SarifToSlackClient {
|
|
401
|
+
private readonly _logger;
|
|
375
402
|
private _message?;
|
|
376
403
|
private _sarifModel?;
|
|
377
404
|
private _sendIf;
|
|
378
405
|
private constructor();
|
|
379
406
|
private static createRunIdGenerator;
|
|
380
|
-
static create(opts: SarifToSlackClientOptions): Promise<SarifToSlackClient>;
|
|
381
|
-
private static buildModel;
|
|
382
407
|
/**
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
* @param
|
|
386
|
-
* @param opts - An instance of {@link SarifToSlackClientOptions}
|
|
387
|
-
*
|
|
388
|
-
*
|
|
408
|
+
* Creates an instance of {@link SarifToSlackClient} class. It already has all
|
|
409
|
+
* properties and fields initialized.
|
|
410
|
+
* @param webhookUrl - Slack webhook URL.
|
|
411
|
+
* @param opts - An instance of {@link SarifToSlackClientOptions} type.
|
|
412
|
+
*
|
|
413
|
+
* @see SarifToSlackClientOptions
|
|
414
|
+
*
|
|
415
|
+
* @public
|
|
389
416
|
*/
|
|
390
|
-
|
|
417
|
+
static create(webhookUrl: string, opts: SarifToSlackClientOptions): Promise<SarifToSlackClient>;
|
|
418
|
+
private static buildModel;
|
|
391
419
|
/**
|
|
392
420
|
* Sends a Slack message.
|
|
393
421
|
* @returns A promise that resolves when the message has been sent.
|
|
@@ -403,12 +431,10 @@ export declare class SarifToSlackClient {
|
|
|
403
431
|
* @public
|
|
404
432
|
*/
|
|
405
433
|
export declare type SarifToSlackClientOptions = {
|
|
406
|
-
webhookUrl: string;
|
|
407
434
|
sarif: SarifOptions;
|
|
408
435
|
username?: string;
|
|
409
436
|
iconUrl?: string;
|
|
410
437
|
color?: ColorOptions;
|
|
411
|
-
log?: LogOptions;
|
|
412
438
|
header?: IncludeAwareWithValueOptions;
|
|
413
439
|
footer?: FooterOptions;
|
|
414
440
|
actor?: IncludeAwareWithValueOptions;
|
|
@@ -533,20 +559,4 @@ export declare enum SendIf {
|
|
|
533
559
|
Never = 23
|
|
534
560
|
}
|
|
535
561
|
|
|
536
|
-
/**
|
|
537
|
-
* Interface for a Slack message that can be sent.
|
|
538
|
-
* @public
|
|
539
|
-
*/
|
|
540
|
-
export declare interface SlackMessage {
|
|
541
|
-
/**
|
|
542
|
-
* Sends the Slack message.
|
|
543
|
-
* @returns A promise that resolves to the response from the Slack webhook.
|
|
544
|
-
*/
|
|
545
|
-
send: () => Promise<string>;
|
|
546
|
-
withActor(actor?: string): void;
|
|
547
|
-
withFooter(text?: string, type?: FooterType): void;
|
|
548
|
-
withHeader(header?: string): void;
|
|
549
|
-
withRun(): void;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
562
|
export { }
|
package/dist/system.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../src/system.ts"],"names":[],"mappings":""}
|
package/dist/system.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import Logger from './Logger';
|
|
3
|
+
import { version, sha, buildAt } from './metadata.json';
|
|
4
|
+
/**
|
|
5
|
+
* Prints metadata information into the logs, such as library version, SHA and
|
|
6
|
+
* build time.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export function logMetadata() {
|
|
10
|
+
const logger = new Logger(logMetadata.name);
|
|
11
|
+
logger.info(`version: ${version}`);
|
|
12
|
+
logger.info(`sha: ${sha}`);
|
|
13
|
+
logger.info(`built at: ${buildAt}`);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Checks if it is running in GitHub Actions with debug mode enabled.
|
|
17
|
+
* @returns false if ACTIONS_STEP_DEBUG env var is falsy, otherwise returns true.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export function isDebug() {
|
|
21
|
+
const parseResult = z.stringbool().safeParse(process.env.ACTIONS_STEP_DEBUG);
|
|
22
|
+
return parseResult.success && parseResult.data;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3lzdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3N5c3RlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsQ0FBQyxFQUEyQixNQUFNLEtBQUssQ0FBQztBQUNqRCxPQUFPLE1BQU0sTUFBTSxVQUFVLENBQUM7QUFDOUIsT0FBTyxFQUFFLE9BQU8sRUFBRSxHQUFHLEVBQUUsT0FBTyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFeEQ7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxXQUFXO0lBQ3pCLE1BQU0sTUFBTSxHQUFHLElBQUksTUFBTSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUM1QyxNQUFNLENBQUMsSUFBSSxDQUFDLFlBQVksT0FBTyxFQUFFLENBQUMsQ0FBQztJQUNuQyxNQUFNLENBQUMsSUFBSSxDQUFDLFFBQVEsR0FBRyxFQUFFLENBQUMsQ0FBQztJQUMzQixNQUFNLENBQUMsSUFBSSxDQUFDLGFBQWEsT0FBTyxFQUFFLENBQUMsQ0FBQztBQUN0QyxDQUFDO0FBRUQ7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxPQUFPO0lBQ3JCLE1BQU0sV0FBVyxHQUFnQyxDQUFDLENBQUMsVUFBVSxFQUFFLENBQUMsU0FBUyxDQUN2RSxPQUFPLENBQUMsR0FBRyxDQUFDLGtCQUFrQixDQUMvQixDQUFDO0lBQ0YsT0FBTyxXQUFXLENBQUMsT0FBTyxJQUFJLFdBQVcsQ0FBQyxJQUFJLENBQUM7QUFDakQsQ0FBQyJ9
|
package/dist/tsdoc-metadata.json
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,45 +1,5 @@
|
|
|
1
|
-
import { ColorOptions } from './model/color/ColorOptions';
|
|
2
|
-
import { SendIf } from './model/SendIf';
|
|
3
|
-
/**
|
|
4
|
-
* Enum representing log levels for the service.
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export declare enum LogLevel {
|
|
8
|
-
/**
|
|
9
|
-
* Represents the most verbose logging level, typically used for detailed
|
|
10
|
-
* debugging information.
|
|
11
|
-
*/
|
|
12
|
-
Silly = 0,
|
|
13
|
-
/**
|
|
14
|
-
* Represents a logging level for tracing the flow of the application.
|
|
15
|
-
*/
|
|
16
|
-
Trace = 1,
|
|
17
|
-
/**
|
|
18
|
-
* Represents a logging level for debugging information that is less verbose
|
|
19
|
-
* than silly.
|
|
20
|
-
*/
|
|
21
|
-
Debug = 2,
|
|
22
|
-
/**
|
|
23
|
-
* Represents a logging level for general informational messages that highlight
|
|
24
|
-
* the progress of the application.
|
|
25
|
-
*/
|
|
26
|
-
Info = 3,
|
|
27
|
-
/**
|
|
28
|
-
* Represents a logging level for potentially harmful situations that require
|
|
29
|
-
* attention.
|
|
30
|
-
*/
|
|
31
|
-
Warning = 4,
|
|
32
|
-
/**
|
|
33
|
-
* Represents a logging level for error conditions that do not require immediate
|
|
34
|
-
* action but should be noted.
|
|
35
|
-
*/
|
|
36
|
-
Error = 5,
|
|
37
|
-
/**
|
|
38
|
-
* Represents a logging level for critical errors that require immediate attention
|
|
39
|
-
* and may cause the application to terminate.
|
|
40
|
-
*/
|
|
41
|
-
Fatal = 6
|
|
42
|
-
}
|
|
1
|
+
import type { ColorOptions } from './model/color/ColorOptions';
|
|
2
|
+
import type { SendIf } from './model/SendIf';
|
|
43
3
|
/**
|
|
44
4
|
* Type representing properties that indicate whether to include certain information
|
|
45
5
|
* in the Slack message.
|
|
@@ -165,20 +125,94 @@ export declare enum RepresentationType {
|
|
|
165
125
|
* Critical: 1, High: 3, Medium: 2, Low: 20
|
|
166
126
|
* ```
|
|
167
127
|
*/
|
|
168
|
-
CompactTotalPerSeverity = 7
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Options for logging.
|
|
172
|
-
* @public
|
|
173
|
-
*/
|
|
174
|
-
export type LogOptions = {
|
|
175
|
-
level?: LogLevel;
|
|
128
|
+
CompactTotalPerSeverity = 7,
|
|
176
129
|
/**
|
|
177
|
-
*
|
|
130
|
+
* Table information about findings grouped by Run with the level representation.
|
|
131
|
+
* @example
|
|
132
|
+
* ```text
|
|
133
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
134
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
135
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
136
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
137
|
+
* | 3 | 0 | 0 | 1 | 0 | 1 | 2 |
|
|
138
|
+
* | 4 | 0 | 0 | 5 | 5 | 0 | 10 |
|
|
139
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
140
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 52 |
|
|
141
|
+
* ```
|
|
178
142
|
*/
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
143
|
+
TableGroupByRunPerLevel = 8,
|
|
144
|
+
/**
|
|
145
|
+
* Table information about findings grouped by Run with the severity representation.
|
|
146
|
+
* @example
|
|
147
|
+
* ```text
|
|
148
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
149
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
150
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
151
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
152
|
+
* | 3 | 0 | 0 | 1 | 0 | 1 | 0 | 2 |
|
|
153
|
+
* | 4 | 0 | 0 | 5 | 5 | 0 | 0 | 10 |
|
|
154
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
155
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 0 | 52 |
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
TableGroupByRunPerSeverity = 9,
|
|
159
|
+
/**
|
|
160
|
+
* Table information about findings grouped by tool name with the level representation.
|
|
161
|
+
* @example
|
|
162
|
+
* ```text
|
|
163
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
164
|
+
* | ------ | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
165
|
+
* | CodeQL | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
166
|
+
* | grype | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
167
|
+
* | Trivy | 0 | 0 | 1 | 0 | 1 | 2 |
|
|
168
|
+
* | WizCLI | 0 | 0 | 5 | 5 | 0 | 10 |
|
|
169
|
+
* | ------ | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
170
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 52 |
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
TableGroupByToolNamePerLevel = 10,
|
|
174
|
+
/**
|
|
175
|
+
* Table information about findings grouped by tool name with the severity representation.
|
|
176
|
+
* @example
|
|
177
|
+
* ```text
|
|
178
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
179
|
+
* | ------ | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
180
|
+
* | CodeQL | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
181
|
+
* | grype | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
182
|
+
* | Trivy | 0 | 0 | 1 | 0 | 1 | 0 | 2 |
|
|
183
|
+
* | WizCLI | 0 | 0 | 5 | 5 | 0 | 0 | 10 |
|
|
184
|
+
* | ------ | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
185
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 0 | 52 |
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
TableGroupByToolNamePerSeverity = 11,
|
|
189
|
+
/**
|
|
190
|
+
* Table information about findings grouped by SARIF file with the level representation.
|
|
191
|
+
* @example
|
|
192
|
+
* ```text
|
|
193
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
194
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
195
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
196
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
197
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
198
|
+
* | Total | 0 | 0 | 9 | 21 | 10 | 40 |
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
TableGroupBySarifPerLevel = 12,
|
|
202
|
+
/**
|
|
203
|
+
* Table information about findings grouped by SARIF file with the severity representation.
|
|
204
|
+
* @example
|
|
205
|
+
* ```text
|
|
206
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
207
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
208
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
209
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
210
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
211
|
+
* | Total | 0 | 0 | 9 | 21 | 10 | 0 | 40 |
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
TableGroupBySarifPerSeverity = 13
|
|
215
|
+
}
|
|
182
216
|
/**
|
|
183
217
|
* SARIF file extension.
|
|
184
218
|
* @public
|
|
@@ -199,12 +233,10 @@ export type SarifOptions = {
|
|
|
199
233
|
* @public
|
|
200
234
|
*/
|
|
201
235
|
export type SarifToSlackClientOptions = {
|
|
202
|
-
webhookUrl: string;
|
|
203
236
|
sarif: SarifOptions;
|
|
204
237
|
username?: string;
|
|
205
238
|
iconUrl?: string;
|
|
206
239
|
color?: ColorOptions;
|
|
207
|
-
log?: LogOptions;
|
|
208
240
|
header?: IncludeAwareWithValueOptions;
|
|
209
241
|
footer?: FooterOptions;
|
|
210
242
|
actor?: IncludeAwareWithValueOptions;
|
|
@@ -212,4 +244,6 @@ export type SarifToSlackClientOptions = {
|
|
|
212
244
|
representation?: RepresentationType;
|
|
213
245
|
sendIf?: SendIf;
|
|
214
246
|
};
|
|
247
|
+
export declare const SecuritySeverityValues: string[];
|
|
248
|
+
export declare const SecurityLevelValues: string[];
|
|
215
249
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5C;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,4BAA4B,GAAG,mBAAmB,GAAG;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED;;;GAGG;AACH,oBAAY,UAAU;IACpB;;OAEG;IACH,SAAS,eAAe;IACxB;;;OAGG;IACH,QAAQ,WAAW;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,4BAA4B,GAAG;IACzD,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB,CAAA;AAED;;;;GAIG;AACH,oBAAY,kBAAkB;IAC5B;;;;;;;;;OASG;IACH,yBAAyB,IAAI;IAC7B;;;;;;;;;OASG;IACH,4BAA4B,IAAI;IAChC;;;;;;;OAOG;IACH,8BAA8B,IAAI;IAClC;;;;;;;OAOG;IACH,iCAAiC,IAAI;IACrC;;;;;;;;;OASG;IACH,2BAA2B,IAAI;IAC/B;;;;;;;;;;OAUG;IACH,8BAA8B,IAAI;IAClC;;;;;;;OAOG;IACH,oBAAoB,IAAI;IACxB;;;;;;;OAOG;IACH,uBAAuB,IAAI;IAC3B;;;;;;;;;;;;;OAaG;IACH,uBAAuB,IAAI;IAC3B;;;;;;;;;;;;;OAaG;IACH,0BAA0B,IAAI;IAC9B;;;;;;;;;;;;;OAaG;IACH,4BAA4B,KAAK;IACjC;;;;;;;;;;;;;OAaG;IACH,+BAA+B,KAAK;IACpC;;;;;;;;;;;OAWG;IACH,yBAAyB,KAAK;IAC9B;;;;;;;;;;;OAWG;IACH,4BAA4B,KAAK;CAClC;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,CAAA;AAEjD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,4BAA4B,CAAC;IACtC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,4BAA4B,CAAC;IACrC,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA;AAkBD,eAAO,MAAM,sBAAsB,EAAE,MAAM,EAGxC,CAAA;AAiBH,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAGrC,CAAA"}
|
package/dist/types.js
CHANGED
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enum representing log levels for the service.
|
|
3
|
-
* @public
|
|
4
|
-
*/
|
|
5
|
-
export var LogLevel;
|
|
6
|
-
(function (LogLevel) {
|
|
7
|
-
/**
|
|
8
|
-
* Represents the most verbose logging level, typically used for detailed
|
|
9
|
-
* debugging information.
|
|
10
|
-
*/
|
|
11
|
-
LogLevel[LogLevel["Silly"] = 0] = "Silly";
|
|
12
|
-
/**
|
|
13
|
-
* Represents a logging level for tracing the flow of the application.
|
|
14
|
-
*/
|
|
15
|
-
LogLevel[LogLevel["Trace"] = 1] = "Trace";
|
|
16
|
-
/**
|
|
17
|
-
* Represents a logging level for debugging information that is less verbose
|
|
18
|
-
* than silly.
|
|
19
|
-
*/
|
|
20
|
-
LogLevel[LogLevel["Debug"] = 2] = "Debug";
|
|
21
|
-
/**
|
|
22
|
-
* Represents a logging level for general informational messages that highlight
|
|
23
|
-
* the progress of the application.
|
|
24
|
-
*/
|
|
25
|
-
LogLevel[LogLevel["Info"] = 3] = "Info";
|
|
26
|
-
/**
|
|
27
|
-
* Represents a logging level for potentially harmful situations that require
|
|
28
|
-
* attention.
|
|
29
|
-
*/
|
|
30
|
-
LogLevel[LogLevel["Warning"] = 4] = "Warning";
|
|
31
|
-
/**
|
|
32
|
-
* Represents a logging level for error conditions that do not require immediate
|
|
33
|
-
* action but should be noted.
|
|
34
|
-
*/
|
|
35
|
-
LogLevel[LogLevel["Error"] = 5] = "Error";
|
|
36
|
-
/**
|
|
37
|
-
* Represents a logging level for critical errors that require immediate attention
|
|
38
|
-
* and may cause the application to terminate.
|
|
39
|
-
*/
|
|
40
|
-
LogLevel[LogLevel["Fatal"] = 6] = "Fatal";
|
|
41
|
-
})(LogLevel || (LogLevel = {}));
|
|
42
1
|
/**
|
|
43
2
|
* Enum representing the type of footer in a Slack message.
|
|
44
3
|
* @public
|
|
@@ -143,6 +102,92 @@ export var RepresentationType;
|
|
|
143
102
|
* ```
|
|
144
103
|
*/
|
|
145
104
|
RepresentationType[RepresentationType["CompactTotalPerSeverity"] = 7] = "CompactTotalPerSeverity";
|
|
105
|
+
/**
|
|
106
|
+
* Table information about findings grouped by Run with the level representation.
|
|
107
|
+
* @example
|
|
108
|
+
* ```text
|
|
109
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
110
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
111
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
112
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
113
|
+
* | 3 | 0 | 0 | 1 | 0 | 1 | 2 |
|
|
114
|
+
* | 4 | 0 | 0 | 5 | 5 | 0 | 10 |
|
|
115
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
116
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 52 |
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
RepresentationType[RepresentationType["TableGroupByRunPerLevel"] = 8] = "TableGroupByRunPerLevel";
|
|
120
|
+
/**
|
|
121
|
+
* Table information about findings grouped by Run with the severity representation.
|
|
122
|
+
* @example
|
|
123
|
+
* ```text
|
|
124
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
125
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
126
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
127
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
128
|
+
* | 3 | 0 | 0 | 1 | 0 | 1 | 0 | 2 |
|
|
129
|
+
* | 4 | 0 | 0 | 5 | 5 | 0 | 0 | 10 |
|
|
130
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
131
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 0 | 52 |
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
RepresentationType[RepresentationType["TableGroupByRunPerSeverity"] = 9] = "TableGroupByRunPerSeverity";
|
|
135
|
+
/**
|
|
136
|
+
* Table information about findings grouped by tool name with the level representation.
|
|
137
|
+
* @example
|
|
138
|
+
* ```text
|
|
139
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
140
|
+
* | ------ | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
141
|
+
* | CodeQL | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
142
|
+
* | grype | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
143
|
+
* | Trivy | 0 | 0 | 1 | 0 | 1 | 2 |
|
|
144
|
+
* | WizCLI | 0 | 0 | 5 | 5 | 0 | 10 |
|
|
145
|
+
* | ------ | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
146
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 52 |
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
RepresentationType[RepresentationType["TableGroupByToolNamePerLevel"] = 10] = "TableGroupByToolNamePerLevel";
|
|
150
|
+
/**
|
|
151
|
+
* Table information about findings grouped by tool name with the severity representation.
|
|
152
|
+
* @example
|
|
153
|
+
* ```text
|
|
154
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
155
|
+
* | ------ | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
156
|
+
* | CodeQL | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
157
|
+
* | grype | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
158
|
+
* | Trivy | 0 | 0 | 1 | 0 | 1 | 0 | 2 |
|
|
159
|
+
* | WizCLI | 0 | 0 | 5 | 5 | 0 | 0 | 10 |
|
|
160
|
+
* | ------ | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
161
|
+
* | Total | 0 | 0 | 15 | 26 | 11 | 0 | 52 |
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
RepresentationType[RepresentationType["TableGroupByToolNamePerSeverity"] = 11] = "TableGroupByToolNamePerSeverity";
|
|
165
|
+
/**
|
|
166
|
+
* Table information about findings grouped by SARIF file with the level representation.
|
|
167
|
+
* @example
|
|
168
|
+
* ```text
|
|
169
|
+
* | | Unknown | None | Note | Warning | Error | Total |
|
|
170
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
171
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
|
|
172
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 39 |
|
|
173
|
+
* | ----- | ------- | ---- | ---- | ------- | ----- | ----- |
|
|
174
|
+
* | Total | 0 | 0 | 9 | 21 | 10 | 40 |
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
RepresentationType[RepresentationType["TableGroupBySarifPerLevel"] = 12] = "TableGroupBySarifPerLevel";
|
|
178
|
+
/**
|
|
179
|
+
* Table information about findings grouped by SARIF file with the severity representation.
|
|
180
|
+
* @example
|
|
181
|
+
* ```text
|
|
182
|
+
* | | Unknown | None | Low | Medium | High | Critical | Total |
|
|
183
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
184
|
+
* | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
|
|
185
|
+
* | 2 | 0 | 0 | 9 | 20 | 10 | 0 | 39 |
|
|
186
|
+
* | ----- | ------- | ---- | --- | ------ | ---- | -------- | ----- |
|
|
187
|
+
* | Total | 0 | 0 | 9 | 21 | 10 | 0 | 40 |
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
RepresentationType[RepresentationType["TableGroupBySarifPerSeverity"] = 13] = "TableGroupBySarifPerSeverity";
|
|
146
191
|
})(RepresentationType || (RepresentationType = {}));
|
|
147
192
|
/**
|
|
148
193
|
* Enum of security severity.
|
|
@@ -160,6 +205,7 @@ export var SecuritySeverity;
|
|
|
160
205
|
SecuritySeverity[SecuritySeverity["High"] = 4] = "High";
|
|
161
206
|
SecuritySeverity[SecuritySeverity["Critical"] = 5] = "Critical";
|
|
162
207
|
})(SecuritySeverity || (SecuritySeverity = {}));
|
|
208
|
+
export const SecuritySeverityValues = Object.values(SecuritySeverity).filter((v) => typeof v === 'string');
|
|
163
209
|
/**
|
|
164
210
|
* Enum of security level.
|
|
165
211
|
* @privateRemarks Order should remain unchanged. It is used in multiple places,
|
|
@@ -175,4 +221,5 @@ export var SecurityLevel;
|
|
|
175
221
|
SecurityLevel[SecurityLevel["Warning"] = 3] = "Warning";
|
|
176
222
|
SecurityLevel[SecurityLevel["Error"] = 4] = "Error";
|
|
177
223
|
})(SecurityLevel || (SecurityLevel = {}));
|
|
178
|
-
|
|
224
|
+
export const SecurityLevelValues = Object.values(SecurityLevel).filter((v) => typeof v === 'string');
|
|
225
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBdUJBOzs7R0FHRztBQUNILE1BQU0sQ0FBTixJQUFZLFVBVVg7QUFWRCxXQUFZLFVBQVU7SUFDcEI7O09BRUc7SUFDSCxzQ0FBd0IsQ0FBQTtJQUN4Qjs7O09BR0c7SUFDSCxpQ0FBbUIsQ0FBQTtBQUNyQixDQUFDLEVBVlcsVUFBVSxLQUFWLFVBQVUsUUFVckI7QUFXRDs7OztHQUlHO0FBQ0gsTUFBTSxDQUFOLElBQVksa0JBd0tYO0FBeEtELFdBQVksa0JBQWtCO0lBQzVCOzs7Ozs7Ozs7T0FTRztJQUNILHFHQUE2QixDQUFBO0lBQzdCOzs7Ozs7Ozs7T0FTRztJQUNILDJHQUFnQyxDQUFBO0lBQ2hDOzs7Ozs7O09BT0c7SUFDSCwrR0FBa0MsQ0FBQTtJQUNsQzs7Ozs7OztPQU9HO0lBQ0gscUhBQXFDLENBQUE7SUFDckM7Ozs7Ozs7OztPQVNHO0lBQ0gseUdBQStCLENBQUE7SUFDL0I7Ozs7Ozs7Ozs7T0FVRztJQUNILCtHQUFrQyxDQUFBO0lBQ2xDOzs7Ozs7O09BT0c7SUFDSCwyRkFBd0IsQ0FBQTtJQUN4Qjs7Ozs7OztPQU9HO0lBQ0gsaUdBQTJCLENBQUE7SUFDM0I7Ozs7Ozs7Ozs7Ozs7T0FhRztJQUNILGlHQUEyQixDQUFBO0lBQzNCOzs7Ozs7Ozs7Ozs7O09BYUc7SUFDSCx1R0FBOEIsQ0FBQTtJQUM5Qjs7Ozs7Ozs7Ozs7OztPQWFHO0lBQ0gsNEdBQWlDLENBQUE7SUFDakM7Ozs7Ozs7Ozs7Ozs7T0FhRztJQUNILGtIQUFvQyxDQUFBO0lBQ3BDOzs7Ozs7Ozs7OztPQVdHO0lBQ0gsc0dBQThCLENBQUE7SUFDOUI7Ozs7Ozs7Ozs7O09BV0c7SUFDSCw0R0FBaUMsQ0FBQTtBQUNuQyxDQUFDLEVBeEtXLGtCQUFrQixLQUFsQixrQkFBa0IsUUF3SzdCO0FBb0NEOzs7Ozs7R0FNRztBQUNILE1BQU0sQ0FBTixJQUFZLGdCQU9YO0FBUEQsV0FBWSxnQkFBZ0I7SUFDMUIsNkRBQVcsQ0FBQTtJQUNYLHVEQUFRLENBQUE7SUFDUixxREFBTyxDQUFBO0lBQ1AsMkRBQVUsQ0FBQTtJQUNWLHVEQUFRLENBQUE7SUFDUiwrREFBWSxDQUFBO0FBQ2QsQ0FBQyxFQVBXLGdCQUFnQixLQUFoQixnQkFBZ0IsUUFPM0I7QUFFRCxNQUFNLENBQUMsTUFBTSxzQkFBc0IsR0FDakMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLE1BQU0sQ0FDcEMsQ0FBQyxDQUE0QixFQUFlLEVBQUUsQ0FBQyxPQUFPLENBQUMsS0FBSyxRQUFRLENBQ3JFLENBQUE7QUFFSDs7Ozs7O0dBTUc7QUFDSCxNQUFNLENBQU4sSUFBWSxhQU1YO0FBTkQsV0FBWSxhQUFhO0lBQ3ZCLHVEQUFXLENBQUE7SUFDWCxpREFBUSxDQUFBO0lBQ1IsaURBQVEsQ0FBQTtJQUNSLHVEQUFXLENBQUE7SUFDWCxtREFBUyxDQUFBO0FBQ1gsQ0FBQyxFQU5XLGFBQWEsS0FBYixhQUFhLFFBTXhCO0FBRUQsTUFBTSxDQUFDLE1BQU0sbUJBQW1CLEdBQzlCLE1BQU0sQ0FBQyxNQUFNLENBQUMsYUFBYSxDQUFDLENBQUMsTUFBTSxDQUNqQyxDQUFDLENBQXlCLEVBQWUsRUFBRSxDQUFDLE9BQU8sQ0FBQyxLQUFLLFFBQVEsQ0FDbEUsQ0FBQSJ9
|