@jupiterone/integration-sdk-cli 11.7.1 → 12.0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupiterone/integration-sdk-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "The SDK for developing JupiterOne integrations",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@jupiterone/data-model": "^0.54.0",
|
|
28
|
-
"@jupiterone/integration-sdk-core": "^
|
|
29
|
-
"@jupiterone/integration-sdk-runtime": "^
|
|
28
|
+
"@jupiterone/integration-sdk-core": "^12.0.0",
|
|
29
|
+
"@jupiterone/integration-sdk-runtime": "^12.0.0",
|
|
30
30
|
"chalk": "^4",
|
|
31
31
|
"commander": "^9.4.0",
|
|
32
32
|
"fs-extra": "^10.1.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"url-exists": "^1.0.3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@jupiterone/integration-sdk-private-test-utils": "^
|
|
46
|
+
"@jupiterone/integration-sdk-private-test-utils": "^12.0.0",
|
|
47
47
|
"@pollyjs/adapter-node-http": "^6.0.5",
|
|
48
48
|
"@pollyjs/core": "^6.0.5",
|
|
49
49
|
"@pollyjs/persister-fs": "^6.0.5",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"neo-forgery": "^2.0.0",
|
|
57
57
|
"vis": "^4.21.0-EOL"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "d71c21bb480ffb35462525aef33a15f702ab5c25"
|
|
60
60
|
}
|
|
@@ -125,6 +125,9 @@ describe('collect', () => {
|
|
|
125
125
|
partialTypes: [],
|
|
126
126
|
encounteredTypes: ['test_account'],
|
|
127
127
|
status: StepResultStatus.CACHED,
|
|
128
|
+
startTime: expect.any(Number),
|
|
129
|
+
endTime: expect.any(Number),
|
|
130
|
+
duration: expect.any(Number),
|
|
128
131
|
},
|
|
129
132
|
{
|
|
130
133
|
id: 'fetch-groups',
|
|
@@ -134,6 +137,9 @@ describe('collect', () => {
|
|
|
134
137
|
partialTypes: [],
|
|
135
138
|
encounteredTypes: [],
|
|
136
139
|
status: StepResultStatus.SUCCESS,
|
|
140
|
+
startTime: expect.any(Number),
|
|
141
|
+
endTime: expect.any(Number),
|
|
142
|
+
duration: expect.any(Number),
|
|
137
143
|
},
|
|
138
144
|
{
|
|
139
145
|
id: 'fetch-users',
|
|
@@ -166,6 +172,9 @@ describe('collect', () => {
|
|
|
166
172
|
partialTypes: [],
|
|
167
173
|
encounteredTypes: [],
|
|
168
174
|
status: StepResultStatus.SUCCESS,
|
|
175
|
+
startTime: expect.any(Number),
|
|
176
|
+
endTime: expect.any(Number),
|
|
177
|
+
duration: expect.any(Number),
|
|
169
178
|
},
|
|
170
179
|
{
|
|
171
180
|
id: 'fetch-groups',
|
|
@@ -175,6 +184,9 @@ describe('collect', () => {
|
|
|
175
184
|
partialTypes: [],
|
|
176
185
|
encounteredTypes: [],
|
|
177
186
|
status: StepResultStatus.SUCCESS,
|
|
187
|
+
startTime: expect.any(Number),
|
|
188
|
+
endTime: expect.any(Number),
|
|
189
|
+
duration: expect.any(Number),
|
|
178
190
|
},
|
|
179
191
|
{
|
|
180
192
|
id: 'fetch-users',
|
|
@@ -183,6 +195,9 @@ describe('collect', () => {
|
|
|
183
195
|
partialTypes: [],
|
|
184
196
|
encounteredTypes: [],
|
|
185
197
|
status: StepResultStatus.SUCCESS,
|
|
198
|
+
startTime: expect.any(Number),
|
|
199
|
+
endTime: expect.any(Number),
|
|
200
|
+
duration: expect.any(Number),
|
|
186
201
|
},
|
|
187
202
|
],
|
|
188
203
|
metadata: {
|
|
@@ -212,6 +227,9 @@ describe('collect', () => {
|
|
|
212
227
|
partialTypes: [],
|
|
213
228
|
encounteredTypes: [],
|
|
214
229
|
status: StepResultStatus.FAILURE,
|
|
230
|
+
startTime: expect.any(Number),
|
|
231
|
+
endTime: expect.any(Number),
|
|
232
|
+
duration: expect.any(Number),
|
|
215
233
|
},
|
|
216
234
|
],
|
|
217
235
|
metadata: {
|
|
@@ -240,6 +258,9 @@ describe('collect', () => {
|
|
|
240
258
|
partialTypes: [],
|
|
241
259
|
encounteredTypes: ['my_user'],
|
|
242
260
|
status: StepResultStatus.SUCCESS,
|
|
261
|
+
startTime: expect.any(Number),
|
|
262
|
+
endTime: expect.any(Number),
|
|
263
|
+
duration: expect.any(Number),
|
|
243
264
|
},
|
|
244
265
|
],
|
|
245
266
|
metadata: {
|
|
@@ -288,6 +309,9 @@ describe('collect', () => {
|
|
|
288
309
|
partialTypes: [],
|
|
289
310
|
encounteredTypes: [],
|
|
290
311
|
status: StepResultStatus.SUCCESS,
|
|
312
|
+
startTime: expect.any(Number),
|
|
313
|
+
endTime: expect.any(Number),
|
|
314
|
+
duration: expect.any(Number),
|
|
291
315
|
},
|
|
292
316
|
],
|
|
293
317
|
metadata: {
|
|
@@ -319,6 +343,9 @@ describe('collect', () => {
|
|
|
319
343
|
partialTypes: [],
|
|
320
344
|
encounteredTypes: [],
|
|
321
345
|
status: StepResultStatus.SUCCESS,
|
|
346
|
+
startTime: expect.any(Number),
|
|
347
|
+
endTime: expect.any(Number),
|
|
348
|
+
duration: expect.any(Number),
|
|
322
349
|
},
|
|
323
350
|
{
|
|
324
351
|
id: 'fetch-groups',
|
|
@@ -336,6 +363,9 @@ describe('collect', () => {
|
|
|
336
363
|
partialTypes: [],
|
|
337
364
|
encounteredTypes: [],
|
|
338
365
|
status: StepResultStatus.SUCCESS,
|
|
366
|
+
startTime: expect.any(Number),
|
|
367
|
+
endTime: expect.any(Number),
|
|
368
|
+
duration: expect.any(Number),
|
|
339
369
|
},
|
|
340
370
|
],
|
|
341
371
|
metadata: {
|
|
@@ -369,6 +399,9 @@ describe('collect', () => {
|
|
|
369
399
|
partialTypes: [],
|
|
370
400
|
encounteredTypes: [],
|
|
371
401
|
status: StepResultStatus.SUCCESS,
|
|
402
|
+
startTime: expect.any(Number),
|
|
403
|
+
endTime: expect.any(Number),
|
|
404
|
+
duration: expect.any(Number),
|
|
372
405
|
},
|
|
373
406
|
{
|
|
374
407
|
id: 'fetch-groups',
|
|
@@ -386,6 +419,9 @@ describe('collect', () => {
|
|
|
386
419
|
partialTypes: [],
|
|
387
420
|
encounteredTypes: [],
|
|
388
421
|
status: StepResultStatus.SUCCESS,
|
|
422
|
+
startTime: expect.any(Number),
|
|
423
|
+
endTime: expect.any(Number),
|
|
424
|
+
duration: expect.any(Number),
|
|
389
425
|
},
|
|
390
426
|
],
|
|
391
427
|
metadata: {
|
|
@@ -416,6 +452,9 @@ describe('collect', () => {
|
|
|
416
452
|
partialTypes: [],
|
|
417
453
|
encounteredTypes: [],
|
|
418
454
|
status: StepResultStatus.SUCCESS,
|
|
455
|
+
startTime: expect.any(Number),
|
|
456
|
+
endTime: expect.any(Number),
|
|
457
|
+
duration: expect.any(Number),
|
|
419
458
|
},
|
|
420
459
|
{
|
|
421
460
|
id: 'fetch-groups',
|
|
@@ -425,6 +464,9 @@ describe('collect', () => {
|
|
|
425
464
|
partialTypes: [],
|
|
426
465
|
encounteredTypes: [],
|
|
427
466
|
status: StepResultStatus.SUCCESS,
|
|
467
|
+
startTime: expect.any(Number),
|
|
468
|
+
endTime: expect.any(Number),
|
|
469
|
+
duration: expect.any(Number),
|
|
428
470
|
},
|
|
429
471
|
{
|
|
430
472
|
id: 'fetch-users',
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
name: 'Peril'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
|
|
6
|
-
env:
|
|
7
|
-
TRANSPONDER_DOCKER_IMAGE: 081157560428.dkr.ecr.us-east-1.amazonaws.com/transponder:1
|
|
8
|
-
SECURITY_SCAN_IMAGE: ghcr.io/jupiterone/security-scan:latest
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
Peril:
|
|
12
|
-
name: Peril
|
|
13
|
-
permissions:
|
|
14
|
-
id-token: write
|
|
15
|
-
contents: read
|
|
16
|
-
packages: read
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
|
|
19
|
-
steps:
|
|
20
|
-
- name: Checkout
|
|
21
|
-
uses: actions/checkout@v3
|
|
22
|
-
|
|
23
|
-
- name: Setup Node
|
|
24
|
-
uses: actions/setup-node@v1
|
|
25
|
-
with:
|
|
26
|
-
node-version: 18.x
|
|
27
|
-
|
|
28
|
-
- name: Run build
|
|
29
|
-
run: yarn install
|
|
30
|
-
|
|
31
|
-
- name: Get Variables
|
|
32
|
-
id: get-vars
|
|
33
|
-
run: |
|
|
34
|
-
if [[ "${GITHUB_REF}" == 'ref/head/main' && "${GITHUB_EVENT_NAME}" == 'push' ]];
|
|
35
|
-
then
|
|
36
|
-
echo ::set-output name=aws-oidc-role::arn:aws:iam::081157560428:role/github-main-role
|
|
37
|
-
else
|
|
38
|
-
echo ::set-output name=aws-oidc-role::arn:aws:iam::081157560428:role/github-pull-request-role
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
- name: Configure aws credentials
|
|
42
|
-
uses: aws-actions/configure-aws-credentials@v1
|
|
43
|
-
with:
|
|
44
|
-
role-to-assume: $\{{ steps.get-vars.outputs.aws-oidc-role }}
|
|
45
|
-
role-session-name: pr-role-session
|
|
46
|
-
aws-region: us-east-1
|
|
47
|
-
|
|
48
|
-
- name: ECR login
|
|
49
|
-
uses: aws-actions/amazon-ecr-login@v1
|
|
50
|
-
id: amazon-ecr-login
|
|
51
|
-
|
|
52
|
-
- name: Login to GHCR
|
|
53
|
-
uses: docker/login-action@v2
|
|
54
|
-
with:
|
|
55
|
-
registry: ghcr.io
|
|
56
|
-
username: $\{{ github.actor }}
|
|
57
|
-
password: $\{{ secrets.PACKAGE_TOKEN }}
|
|
58
|
-
|
|
59
|
-
- name: Pull security-scan
|
|
60
|
-
run: |
|
|
61
|
-
docker pull $SECURITY_SCAN_IMAGE
|
|
62
|
-
|
|
63
|
-
- name: Run security-scan
|
|
64
|
-
run: |
|
|
65
|
-
docker run \
|
|
66
|
-
--user root \
|
|
67
|
-
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
68
|
-
-v `pwd`:`pwd` \
|
|
69
|
-
-e AWS_ACCESS_KEY_ID=$\{{ env.AWS_ACCESS_KEY_ID }} \
|
|
70
|
-
-e AWS_SECRET_ACCESS_KEY=$\{{ env.AWS_SECRET_ACCESS_KEY }} \
|
|
71
|
-
-e AWS_SESSION_TOKEN=$\{{ env.AWS_SESSION_TOKEN }} \
|
|
72
|
-
-e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \
|
|
73
|
-
-e GITHUB_REF_NAME=$GITHUB_REF_NAME \
|
|
74
|
-
-e GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER \
|
|
75
|
-
-e GITHUB_SERVER_URL=$GITHUB_SERVER_URL \
|
|
76
|
-
-e GITHUB_RUN_ID=$GITHUB_RUN_ID \
|
|
77
|
-
-e MODE=ci \
|
|
78
|
-
-w `pwd` $SECURITY_SCAN_IMAGE
|
|
79
|
-
|
|
80
|
-
- name: Pull transponder
|
|
81
|
-
run: |
|
|
82
|
-
docker pull $TRANSPONDER_DOCKER_IMAGE
|
|
83
|
-
|
|
84
|
-
- name: Run transponder
|
|
85
|
-
run: |
|
|
86
|
-
docker run --rm -v `pwd`:`pwd` -w `pwd` \
|
|
87
|
-
-e J1_API_KEY=$\{{ secrets.J1_API_KEY_TRANSPONDER }} \
|
|
88
|
-
-e J1_API_DOMAIN=$\{{ secrets.J1_API_DOMAIN_TRANSPONDER }} \
|
|
89
|
-
-e J1_ACCOUNT_ID=$\{{ secrets.J1_ACCOUNT_ID_TRANSPONDER }} \
|
|
90
|
-
$TRANSPONDER_DOCKER_IMAGE
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
name: 'Peril'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
|
|
6
|
-
env:
|
|
7
|
-
TRANSPONDER_DOCKER_IMAGE: 081157560428.dkr.ecr.us-east-1.amazonaws.com/transponder:1
|
|
8
|
-
SECURITY_SCAN_IMAGE: ghcr.io/jupiterone/security-scan:latest
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
Peril:
|
|
12
|
-
name: Peril
|
|
13
|
-
permissions:
|
|
14
|
-
id-token: write
|
|
15
|
-
contents: read
|
|
16
|
-
packages: read
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
|
|
19
|
-
steps:
|
|
20
|
-
- name: Checkout
|
|
21
|
-
uses: actions/checkout@v3
|
|
22
|
-
|
|
23
|
-
- name: Setup Node
|
|
24
|
-
uses: actions/setup-node@v1
|
|
25
|
-
with:
|
|
26
|
-
node-version: 18.x
|
|
27
|
-
|
|
28
|
-
- name: Run build
|
|
29
|
-
run: yarn install
|
|
30
|
-
|
|
31
|
-
- name: Get Variables
|
|
32
|
-
id: get-vars
|
|
33
|
-
run: |
|
|
34
|
-
if [[ "${GITHUB_REF}" == 'ref/head/main' && "${GITHUB_EVENT_NAME}" == 'push' ]];
|
|
35
|
-
then
|
|
36
|
-
echo ::set-output name=aws-oidc-role::arn:aws:iam::081157560428:role/github-main-role
|
|
37
|
-
else
|
|
38
|
-
echo ::set-output name=aws-oidc-role::arn:aws:iam::081157560428:role/github-pull-request-role
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
- name: Configure aws credentials
|
|
42
|
-
uses: aws-actions/configure-aws-credentials@v1
|
|
43
|
-
with:
|
|
44
|
-
role-to-assume: $\{{ steps.get-vars.outputs.aws-oidc-role }}
|
|
45
|
-
role-session-name: pr-role-session
|
|
46
|
-
aws-region: us-east-1
|
|
47
|
-
|
|
48
|
-
- name: ECR login
|
|
49
|
-
uses: aws-actions/amazon-ecr-login@v1
|
|
50
|
-
id: amazon-ecr-login
|
|
51
|
-
|
|
52
|
-
- name: Login to GHCR
|
|
53
|
-
uses: docker/login-action@v2
|
|
54
|
-
with:
|
|
55
|
-
registry: ghcr.io
|
|
56
|
-
username: $\{{ github.actor }}
|
|
57
|
-
password: $\{{ secrets.PACKAGE_TOKEN }}
|
|
58
|
-
|
|
59
|
-
- name: Pull security-scan
|
|
60
|
-
run: |
|
|
61
|
-
docker pull $SECURITY_SCAN_IMAGE
|
|
62
|
-
|
|
63
|
-
- name: Run security-scan
|
|
64
|
-
run: |
|
|
65
|
-
docker run \
|
|
66
|
-
--user root \
|
|
67
|
-
-v /var/run/docker.sock:/var/run/docker.sock \
|
|
68
|
-
-v `pwd`:`pwd` \
|
|
69
|
-
-e AWS_ACCESS_KEY_ID=$\{{ env.AWS_ACCESS_KEY_ID }} \
|
|
70
|
-
-e AWS_SECRET_ACCESS_KEY=$\{{ env.AWS_SECRET_ACCESS_KEY }} \
|
|
71
|
-
-e AWS_SESSION_TOKEN=$\{{ env.AWS_SESSION_TOKEN }} \
|
|
72
|
-
-e GITHUB_REPOSITORY=$GITHUB_REPOSITORY \
|
|
73
|
-
-e GITHUB_REF_NAME=$GITHUB_REF_NAME \
|
|
74
|
-
-e GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER \
|
|
75
|
-
-e GITHUB_SERVER_URL=$GITHUB_SERVER_URL \
|
|
76
|
-
-e GITHUB_RUN_ID=$GITHUB_RUN_ID \
|
|
77
|
-
-e MODE=ci \
|
|
78
|
-
-w `pwd` $SECURITY_SCAN_IMAGE
|
|
79
|
-
|
|
80
|
-
- name: Pull transponder
|
|
81
|
-
run: |
|
|
82
|
-
docker pull $TRANSPONDER_DOCKER_IMAGE
|
|
83
|
-
|
|
84
|
-
- name: Run transponder
|
|
85
|
-
run: |
|
|
86
|
-
docker run --rm -v `pwd`:`pwd` -w `pwd` \
|
|
87
|
-
-e J1_API_KEY=$\{{ secrets.J1_API_KEY_TRANSPONDER }} \
|
|
88
|
-
-e J1_API_DOMAIN=$\{{ secrets.J1_API_DOMAIN_TRANSPONDER }} \
|
|
89
|
-
-e J1_ACCOUNT_ID=$\{{ secrets.J1_ACCOUNT_ID_TRANSPONDER }} \
|
|
90
|
-
$TRANSPONDER_DOCKER_IMAGE
|