airbyte-faros-destination 0.9.56 → 0.9.58
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 +7 -0
- package/lib/converters/jira/faros_boards.d.ts +7 -0
- package/lib/converters/jira/faros_boards.js +33 -0
- package/lib/converters/jira/faros_boards.js.map +1 -0
- package/lib/converters/jira/faros_projects.d.ts +7 -0
- package/lib/converters/jira/faros_projects.js +29 -0
- package/lib/converters/jira/faros_projects.js.map +1 -0
- package/lib/converters/vanta/types.d.ts +20 -16
- package/lib/converters/vanta/types.js.map +1 -1
- package/lib/converters/vanta/utils.d.ts +1 -0
- package/lib/converters/vanta/utils.js +5 -1
- package/lib/converters/vanta/utils.js.map +1 -1
- package/lib/converters/vanta/vulnerabilities.d.ts +39 -9
- package/lib/converters/vanta/vulnerabilities.js +311 -103
- package/lib/converters/vanta/vulnerabilities.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/resources/cicdArtifactQueryByCommitSha.gql +2 -2
- package/resources/cicdArtifactQueryByRepoName.gql +3 -4
- package/resources/cicdArtifactVulnerabilityQuery.gql +13 -0
- package/resources/source-specific-configs/vanta.json +17 -0
- package/resources/vcsRepositoryQuery.gql +2 -2
- package/resources/vcsRepositoryVulnerabilityQuery.gql +13 -0
package/README.md
CHANGED
|
@@ -168,6 +168,13 @@ Example `catalog.json`
|
|
|
168
168
|
}
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
+
To view debug logs from airbyte, set the following environment variable:
|
|
172
|
+
|
|
173
|
+
```shell
|
|
174
|
+
export LOG_LEVEL="debug";
|
|
175
|
+
./bin/main write --config config.json --catalog catalog.json;
|
|
176
|
+
```
|
|
177
|
+
|
|
171
178
|
**Tip**: you can even pipe data directly from your custom source into your custom destination without Airbyte server while prefixing your streams (as expected by Faros Destination):
|
|
172
179
|
|
|
173
180
|
```shell
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
|
|
3
|
+
import { JiraConverter } from './common';
|
|
4
|
+
export declare class FarosBoards extends JiraConverter {
|
|
5
|
+
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
6
|
+
convert(record: AirbyteRecord, ctx: StreamContext): Promise<ReadonlyArray<DestinationRecord>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FarosBoards = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
class FarosBoards extends common_1.JiraConverter {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.destinationModels = [
|
|
9
|
+
'tms_TaskBoard',
|
|
10
|
+
'tms_TaskBoardProjectRelationship',
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
async convert(record, ctx) {
|
|
14
|
+
const board = record.record.data;
|
|
15
|
+
const uid = board.uid;
|
|
16
|
+
const source = this.streamName.source;
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
model: 'tms_TaskBoard',
|
|
20
|
+
record: { uid, name: board.name, source },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
model: 'tms_TaskBoardProjectRelationship',
|
|
24
|
+
record: {
|
|
25
|
+
board: { uid, source },
|
|
26
|
+
project: { uid: board.projectKey, source },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.FarosBoards = FarosBoards;
|
|
33
|
+
//# sourceMappingURL=faros_boards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faros_boards.js","sourceRoot":"","sources":["../../../src/converters/jira/faros_boards.ts"],"names":[],"mappings":";;;AAGA,qCAAuC;AAEvC,MAAa,WAAY,SAAQ,sBAAa;IAA9C;;QACW,sBAAiB,GAAoC;YAC5D,eAAe;YACf,kCAAkC;SACnC,CAAC;IAuBJ,CAAC;IArBC,KAAK,CAAC,OAAO,CACX,MAAqB,EACrB,GAAkB;QAElB,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACjC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACtB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACtC,OAAO;YACL;gBACE,KAAK,EAAE,eAAe;gBACtB,MAAM,EAAE,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAC;aACxC;YACD;gBACE,KAAK,EAAE,kCAAkC;gBACzC,MAAM,EAAE;oBACN,KAAK,EAAE,EAAC,GAAG,EAAE,MAAM,EAAC;oBACpB,OAAO,EAAE,EAAC,GAAG,EAAE,KAAK,CAAC,UAAU,EAAE,MAAM,EAAC;iBACzC;aACF;SACF,CAAC;IACJ,CAAC;CACF;AA3BD,kCA2BC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
|
|
3
|
+
import { JiraConverter } from './common';
|
|
4
|
+
export declare class FarosProjects extends JiraConverter {
|
|
5
|
+
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
6
|
+
convert(record: AirbyteRecord, ctx: StreamContext): Promise<ReadonlyArray<DestinationRecord>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FarosProjects = void 0;
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
|
+
const common_1 = require("./common");
|
|
6
|
+
class FarosProjects extends common_1.JiraConverter {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.destinationModels = ['tms_Project'];
|
|
10
|
+
}
|
|
11
|
+
async convert(record, ctx) {
|
|
12
|
+
const project = record.record.data;
|
|
13
|
+
const source = this.streamName.source;
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
model: 'tms_Project',
|
|
17
|
+
record: {
|
|
18
|
+
uid: project.key,
|
|
19
|
+
name: project.name,
|
|
20
|
+
description: faros_js_client_1.Utils.cleanAndTruncate(project.description, this.truncateLimit(ctx)),
|
|
21
|
+
sourceSystemId: project.id,
|
|
22
|
+
source,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.FarosProjects = FarosProjects;
|
|
29
|
+
//# sourceMappingURL=faros_projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faros_projects.js","sourceRoot":"","sources":["../../../src/converters/jira/faros_projects.ts"],"names":[],"mappings":";;;AACA,qDAAsC;AAGtC,qCAAuC;AAEvC,MAAa,aAAc,SAAQ,sBAAa;IAAhD;;QACW,sBAAiB,GAAoC,CAAC,aAAa,CAAC,CAAC;IAwBhF,CAAC;IAtBC,KAAK,CAAC,OAAO,CACX,MAAqB,EACrB,GAAkB;QAElB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACtC,OAAO;YACL;gBACE,KAAK,EAAE,aAAa;gBACpB,MAAM,EAAE;oBACN,GAAG,EAAE,OAAO,CAAC,GAAG;oBAChB,IAAI,EAAE,OAAO,CAAC,IAAI;oBAClB,WAAW,EAAE,uBAAK,CAAC,gBAAgB,CACjC,OAAO,CAAC,WAAW,EACnB,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CACxB;oBACD,cAAc,EAAE,OAAO,CAAC,EAAE;oBAC1B,MAAM;iBACP;aACF;SACF,CAAC;IACJ,CAAC;CACF;AAzBD,sCAyBC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
type OptString = string | null | undefined;
|
|
2
|
+
type OptBool = boolean | null | undefined;
|
|
3
|
+
type OptNumber = number | null | undefined;
|
|
2
4
|
export interface BaseVulnerabilityType {
|
|
3
5
|
uid: OptString;
|
|
4
6
|
displayName: OptString;
|
|
5
7
|
createdAt: OptString;
|
|
6
8
|
externalURL: OptString;
|
|
7
|
-
severity: OptString;
|
|
9
|
+
severity: OptString | OptNumber;
|
|
8
10
|
}
|
|
9
11
|
export type ExtendedVulnerabilityType = BaseVulnerabilityType & {
|
|
10
12
|
description?: OptString;
|
|
@@ -17,13 +19,13 @@ export interface GithubSecurityAdvisory {
|
|
|
17
19
|
ghsaId: OptString;
|
|
18
20
|
}
|
|
19
21
|
export interface GithubVulnerabilityData {
|
|
20
|
-
|
|
22
|
+
uid: OptString;
|
|
21
23
|
displayName: OptString;
|
|
24
|
+
createdAt: OptString;
|
|
22
25
|
externalURL: OptString;
|
|
26
|
+
severity: OptNumber;
|
|
23
27
|
repositoryName: OptString;
|
|
24
|
-
severity: OptString;
|
|
25
28
|
slaDeadline: OptString;
|
|
26
|
-
uid: OptString;
|
|
27
29
|
vantaDescription: OptString;
|
|
28
30
|
securityAdvisory: GithubSecurityAdvisory;
|
|
29
31
|
}
|
|
@@ -33,17 +35,16 @@ export interface AWSFindings {
|
|
|
33
35
|
name: OptString;
|
|
34
36
|
}
|
|
35
37
|
export interface AWSVulnerabilityData {
|
|
38
|
+
uid: OptString;
|
|
39
|
+
displayName: OptString;
|
|
36
40
|
createdAt: OptString;
|
|
41
|
+
externalURL: OptString;
|
|
42
|
+
severity: OptNumber;
|
|
37
43
|
packageName: OptString;
|
|
38
44
|
packageVersion: OptString;
|
|
39
|
-
externalURL: OptString;
|
|
40
|
-
scanType: OptString;
|
|
41
|
-
severity: OptString;
|
|
42
45
|
slaDeadline: OptString;
|
|
43
|
-
uid: OptString;
|
|
44
46
|
repositoryName: OptString;
|
|
45
47
|
repositoryArn: OptString;
|
|
46
|
-
displayName: OptString;
|
|
47
48
|
findings: AWSFindings[];
|
|
48
49
|
}
|
|
49
50
|
export interface AWSV2Ignored {
|
|
@@ -55,19 +56,16 @@ export interface AWSV2Asset {
|
|
|
55
56
|
displayName: OptString;
|
|
56
57
|
}
|
|
57
58
|
export interface AWSV2VulnerabilityData {
|
|
59
|
+
uid: OptString;
|
|
60
|
+
displayName: OptString;
|
|
58
61
|
createdAt: OptString;
|
|
59
62
|
externalURL: OptString;
|
|
63
|
+
severity: OptString;
|
|
60
64
|
packageName: OptString;
|
|
61
65
|
packageIdentifier: OptString;
|
|
62
|
-
scanType: OptString;
|
|
63
|
-
scannerScore: OptString;
|
|
64
|
-
severity: OptString;
|
|
65
|
-
uid: OptString;
|
|
66
66
|
description: OptString;
|
|
67
|
-
displayName: OptString;
|
|
68
67
|
name: OptString;
|
|
69
|
-
isFixable:
|
|
70
|
-
remediation: OptString;
|
|
68
|
+
isFixable: OptBool;
|
|
71
69
|
remediateBy: OptString;
|
|
72
70
|
asset: AWSV2Asset;
|
|
73
71
|
ignored: AWSV2Ignored;
|
|
@@ -95,4 +93,10 @@ export interface CicdArtifactKey {
|
|
|
95
93
|
uid: string;
|
|
96
94
|
repository: CicdRepoKey;
|
|
97
95
|
}
|
|
96
|
+
export type VulnerabilityInfo = {
|
|
97
|
+
id: string;
|
|
98
|
+
resolvedAt: OptString;
|
|
99
|
+
vulnerabilityUid: OptString;
|
|
100
|
+
};
|
|
101
|
+
export type FarosObjectKey = VcsOrgKey | VcsRepoKey | CicdOrgKey | CicdRepoKey | CicdArtifactKey;
|
|
98
102
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/converters/vanta/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/converters/vanta/types.ts"],"names":[],"mappings":";;;AAqFa,QAAA,eAAe,GAAa,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getQueryFromName = void 0;
|
|
6
|
+
exports.looksLikeGithubCommitSha = exports.getQueryFromName = void 0;
|
|
7
7
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
// Function to find a specific parent directory
|
|
@@ -34,4 +34,8 @@ function getQueryFromName(name) {
|
|
|
34
34
|
return fs_extra_1.default.readFileSync(`${gql_dir}/${fn}`, 'utf8');
|
|
35
35
|
}
|
|
36
36
|
exports.getQueryFromName = getQueryFromName;
|
|
37
|
+
function looksLikeGithubCommitSha(sha) {
|
|
38
|
+
return /^[a-f0-9]{40}$/i.test(sha);
|
|
39
|
+
}
|
|
40
|
+
exports.looksLikeGithubCommitSha = looksLikeGithubCommitSha;
|
|
37
41
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/converters/vanta/utils.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AAExB,+CAA+C;AAC/C,SAAS,mBAAmB,CAC1B,UAAkB,EAClB,aAAqB;IAErB,IAAI,WAAW,GAAG,UAAU,CAAC;IAC7B,OAAO,WAAW,KAAK,GAAG,EAAE,CAAC;QAC3B,IAAI,cAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,aAAa,EAAE,CAAC;YACjD,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,MAAM,OAAO,GAAG,SAAS,CAAC;IAC1B,sDAAsD;IACtD,MAAM,aAAa,GAAG,mBAAmB,CACvC,OAAO,EACP,2BAA2B,CAC5B,CAAC;IACF,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAEtD,MAAM,EAAE,GAAG,GAAG,IAAI,MAAM,CAAC;IACzB,6BAA6B;IAC7B,IAAI,CAAC,kBAAE,CAAC,UAAU,CAAC,GAAG,OAAO,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,SAAS,EAAE,iBAAiB,OAAO,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,iEAAiE;IACjE,OAAO,kBAAE,CAAC,YAAY,CAAC,GAAG,OAAO,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC;AApBD,4CAoBC"}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/converters/vanta/utils.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,gDAAwB;AAExB,+CAA+C;AAC/C,SAAS,mBAAmB,CAC1B,UAAkB,EAClB,aAAqB;IAErB,IAAI,WAAW,GAAG,UAAU,CAAC;IAC7B,OAAO,WAAW,KAAK,GAAG,EAAE,CAAC;QAC3B,IAAI,cAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,aAAa,EAAE,CAAC;YACjD,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,MAAM,OAAO,GAAG,SAAS,CAAC;IAC1B,sDAAsD;IACtD,MAAM,aAAa,GAAG,mBAAmB,CACvC,OAAO,EACP,2BAA2B,CAC5B,CAAC;IACF,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;IAED,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAEtD,MAAM,EAAE,GAAG,GAAG,IAAI,MAAM,CAAC;IACzB,6BAA6B;IAC7B,IAAI,CAAC,kBAAE,CAAC,UAAU,CAAC,GAAG,OAAO,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,SAAS,EAAE,iBAAiB,OAAO,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,iEAAiE;IACjE,OAAO,kBAAE,CAAC,YAAY,CAAC,GAAG,OAAO,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC;AApBD,4CAoBC;AAED,SAAgB,wBAAwB,CAAC,GAAW;IAClD,OAAO,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AAFD,4DAEC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { FarosClient } from 'faros-js-client';
|
|
2
3
|
import { Converter, DestinationModel, DestinationRecord, StreamContext } from '../converter';
|
|
3
|
-
import { AWSV2VulnerabilityData, AWSVulnerabilityData, CicdArtifactKey, ExtendedVulnerabilityType, GithubVulnerabilityData, VcsRepoKey } from './types';
|
|
4
|
-
export declare function looksLikeGithubCommitSha(sha: string): boolean;
|
|
4
|
+
import { AWSV2VulnerabilityData, AWSVulnerabilityData, CicdArtifactKey, ExtendedVulnerabilityType, FarosObjectKey, GithubVulnerabilityData, VcsRepoKey, VulnerabilityInfo } from './types';
|
|
5
5
|
export declare abstract class Vulnerabilities extends Converter {
|
|
6
6
|
source: string;
|
|
7
7
|
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
@@ -20,24 +20,54 @@ export declare abstract class Vulnerabilities extends Converter {
|
|
|
20
20
|
vcsRepositoryQuery: string;
|
|
21
21
|
cicdArtifactQueryByCommitSha: string;
|
|
22
22
|
cicdArtifactQueryByRepoName: string;
|
|
23
|
+
vcsRepositoryVulnerabilityQuery: string;
|
|
24
|
+
cicdArtifactVulnerabilityQuery: string;
|
|
25
|
+
vulnerabilitiesWithMissingRepositoryNames: Set<string>;
|
|
26
|
+
vulnerabilitiesWithMissingCICDArtifacts: Set<string>;
|
|
27
|
+
noResponseFromVcsRepositoryQuery: Set<string>;
|
|
28
|
+
noResponseFromCicdArtifactQuery: Set<string>;
|
|
29
|
+
emptyResultsFromVcsRepositoryQuery: Set<string>;
|
|
30
|
+
emptyResultsFromCicdArtifactQuery: Set<string>;
|
|
31
|
+
noResponseAWSArtifactFromName: Set<string>;
|
|
32
|
+
emptyResultsAWSArtifactFromName: Set<string>;
|
|
33
|
+
nUpdatedVcsVulns: number;
|
|
34
|
+
nUpdatedCicdVulns: number;
|
|
35
|
+
missedRepositoryNames: Set<string>;
|
|
36
|
+
nFarosRequests: number;
|
|
37
|
+
skipRepoNames: Set<string>;
|
|
38
|
+
nRecordsProcessed: number;
|
|
39
|
+
maxNRecords: number | null;
|
|
40
|
+
filterLastNDays: number | null;
|
|
23
41
|
/** All Vanta records should have id property */
|
|
24
42
|
id(record: AirbyteRecord): any;
|
|
43
|
+
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
25
44
|
addUIDToMapping(name: string, uid: string, mapping: Record<string, string[]>): void;
|
|
26
45
|
getVulnRecordsFromGit(data: GithubVulnerabilityData[]): DestinationRecord[];
|
|
27
46
|
getVulnRecordsFromAws(data: AWSVulnerabilityData[]): DestinationRecord[];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
47
|
+
runFunctionInBatches(names: string[], fc: FarosClient, ctx: StreamContext, batchSize: number, func: (names: string[], fc: FarosClient, ctx: StreamContext) => Promise<FarosObjectKey[]>): Promise<FarosObjectKey[]>;
|
|
48
|
+
getVCSRepositoriesFromNames(vcsRepoNames: string[], fc: FarosClient, ctx: StreamContext): Promise<VcsRepoKey[]>;
|
|
49
|
+
getCICDArtifactsFromCommitShas(commitShas: string[], fc: FarosClient, ctx: StreamContext): Promise<CicdArtifactKey[]>;
|
|
50
|
+
getVCSRepositoriesFromNamesBatches(vcsRepoNames: string[], fc: FarosClient, ctx: StreamContext, batchSize: number): Promise<VcsRepoKey[]>;
|
|
51
|
+
getCICDArtifactFromCommitShaBatches(allCommitShas: Set<string>, fc: FarosClient, ctx: StreamContext): Promise<CicdArtifactKey[]>;
|
|
52
|
+
getAWSCicdArtifactsFromRepoNamesByBatches(allRepoNames: string[], fc: FarosClient, ctx: StreamContext): Promise<CicdArtifactKey[]>;
|
|
53
|
+
getAWSCicdArtifactsFromNames(repoNames: string[], fc: FarosClient, ctx: StreamContext): Promise<CicdArtifactKey[]>;
|
|
54
|
+
getVCSMappingsFromGit(gitRepoNamesToUIDs: Record<string, string[]>, fc: FarosClient, ctx: StreamContext): Promise<DestinationRecord[]>;
|
|
32
55
|
getAWSV2VulnStatusDetail(vuln: AWSV2VulnerabilityData): string;
|
|
33
56
|
getAWSV2VulnStatusCategory(vuln: AWSV2VulnerabilityData): string;
|
|
34
|
-
getCICDMappingsFromAWS(ctx: StreamContext): Promise<DestinationRecord[]>;
|
|
35
|
-
|
|
57
|
+
getCICDMappingsFromAWS(fc: FarosClient, ctx: StreamContext): Promise<DestinationRecord[]>;
|
|
58
|
+
getCommitShasFromAWSV2Vulns(vulns: AWSV2VulnerabilityData[], ctx: StreamContext): [Set<string>, Record<string, AWSV2VulnerabilityData>];
|
|
59
|
+
getCICDMappingsFromAWSV2(aws_vulns: AWSV2VulnerabilityData[], fc: FarosClient, ctx: StreamContext): Promise<DestinationRecord[]>;
|
|
36
60
|
getUidFromAWSV2Vuln(vuln: AWSV2VulnerabilityData): string;
|
|
37
61
|
getVulnRecordsFromAwsV2(data: AWSV2VulnerabilityData[]): DestinationRecord[];
|
|
38
62
|
combineAwsVulns(aws_v1_vulns: DestinationRecord[], aws_v2_vulns: DestinationRecord[], ctx: StreamContext): DestinationRecord[];
|
|
39
63
|
getSecVulnerabilityRecordFromData(data: ExtendedVulnerabilityType): DestinationRecord;
|
|
40
|
-
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
41
64
|
printReport(ctx: StreamContext): void;
|
|
65
|
+
getTotalNumberOfRecords(): number;
|
|
66
|
+
getPaginatedQueryResults(ctx: any, query: string, key: string): Promise<any>;
|
|
67
|
+
getAllUnresolvedObjectVulnerabilities(ctx: StreamContext, query: string, key: string): Promise<VulnerabilityInfo[]>;
|
|
68
|
+
updateVulnsInBatches(ctx: StreamContext, ids: string[], resolvedAt: string, mutationName: string, updateName: string, updatesPerRequest: number): Promise<void>;
|
|
69
|
+
updateVCSVulnsToResolved(ctx: StreamContext): Promise<number>;
|
|
70
|
+
updateCICDVulnsToResolved(ctx: StreamContext): Promise<number>;
|
|
71
|
+
updateExistingVulnerabilities(ctx: StreamContext): Promise<void>;
|
|
42
72
|
onProcessingComplete(ctx: StreamContext): Promise<ReadonlyArray<DestinationRecord>>;
|
|
43
73
|
}
|