Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #410 from JupiterOne/INT-2391-image-key
Browse files Browse the repository at this point in the history
INT-2391 - Fix placeholder deleted image key ingestion
  • Loading branch information
austinkelleher authored Jan 22, 2022
2 parents 1bef7f3 + a175ec6 commit 7eb5469
Show file tree
Hide file tree
Showing 10 changed files with 209 additions and 91 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- New properties added to entities:

| Entity | Properties |
| ---------------------------- | ---------- |
| `google_iam_service_account` | `active` |

### Changed

- Updated `@jupiterone/integration-sdk-*` packages

### Fixed

- Properly assign `_key` value to placeholder deleted `google_compute_image`
entities

## 2.6.1 - 2021-12-14

### Fixed
Expand Down
23 changes: 23 additions & 0 deletions jupiterone/questions/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,29 @@ questions:
tags:
- google-cloud
- storage

- id: integration-question-google-iam-inactive-service-account
title: Which Google Cloud service accounts are inactive?
description:
Finds all Google Cloud service accounts that are inactive
queries:
- query: |
FIND google_iam_service_account WITH active = false
tags:
- google-cloud
- iam

- id: integration-question-google-iam-active-service-account
title: Which Google Cloud service accounts are active?
description:
Finds all Google Cloud service accounts that are active
queries:
- query: |
FIND google_iam_service_account WITH active = true
tags:
- google-cloud
- iam

################################################################################
# End generic non-compliance questions
################################################################################
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"jupiterone-organization-setup": "yarn ts-node ./scripts/organizationSetupCli.ts"
},
"peerDependencies": {
"@jupiterone/integration-sdk-core": "^7.2.0"
"@jupiterone/integration-sdk-core": "^8.2.0"
},
"devDependencies": {
"@jupiterone/integration-sdk-core": "^7.2.0",
"@jupiterone/integration-sdk-dev-tools": "^7.2.0",
"@jupiterone/integration-sdk-testing": "^7.2.0",
"@jupiterone/integration-sdk-core": "^8.2.0",
"@jupiterone/integration-sdk-dev-tools": "^8.2.0",
"@jupiterone/integration-sdk-testing": "^8.2.0",
"@types/bunyan": "^1.8.6",
"@types/bunyan-format": "^0.2.3",
"@types/node-fetch": "^2.5.10",
Expand Down
6 changes: 6 additions & 0 deletions src/steps/api-gateway/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "JupiterOne Integration Development GKE Service Account",
Expand Down Expand Up @@ -112,6 +113,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "App Engine default service account",
Expand Down Expand Up @@ -201,6 +203,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "Compute Engine default service account",
Expand Down Expand Up @@ -291,6 +294,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "Service account for local Google Cloud integration development for Creativice team",
"displayName": "j1-gc-integration-dev-v2-cr",
Expand Down Expand Up @@ -409,6 +413,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "Used to provision Terraform locally for integration development",
"displayName": "j1-gc-integration-dev-v2-tf",
Expand Down Expand Up @@ -527,6 +532,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "Service account for local Google Cloud integration development",
"displayName": "j1-gc-integration-dev-v2",
Expand Down
5 changes: 5 additions & 0 deletions src/steps/compute/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15615,6 +15615,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "Service account for a test Google Cloud Function",
Expand Down Expand Up @@ -15704,6 +15705,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "Compute Engine default service account",
Expand Down Expand Up @@ -15794,6 +15796,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "Service account for local Terraform development",
"displayName": "j1-gc-integration-dev-sa-tf",
Expand Down Expand Up @@ -15912,6 +15915,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "Service account for local integration development runner",
"displayName": "j1-gc-integration-dev-v3",
Expand Down Expand Up @@ -16225,6 +16229,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "App Engine default service account",
Expand Down
2 changes: 1 addition & 1 deletion src/steps/compute/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function createComputeImageEntity({
assign: {
_class: ENTITY_CLASS_COMPUTE_IMAGE,
_type: ENTITY_TYPE_COMPUTE_IMAGE,
_key: data.selfLink as string,
_key: (data.selfLink || data.id) as string,
id: data.id as string,
name: data.name,
displayName: data.name as string,
Expand Down
2 changes: 2 additions & 0 deletions src/steps/iam/__snapshots__/converters.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "J1 Google Cloud integration execution",
"displayName": "projects/j1-gc-integration-dev-v2/serviceAccounts/j1-gc-integration-dev-v2-sa@j1-gc-integration-dev-v2.iam.gserviceaccount.com",
Expand Down Expand Up @@ -121,6 +122,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": false,
"createdOn": undefined,
"description": "J1 Google Cloud integration execution",
"displayName": "projects/j1-gc-integration-dev-v2/serviceAccounts/j1-gc-integration-dev-v2-sa@j1-gc-integration-dev-v2.iam.gserviceaccount.com",
Expand Down
7 changes: 7 additions & 0 deletions src/steps/iam/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "Service account for a test Google Cloud Function",
Expand Down Expand Up @@ -552,6 +553,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "Compute Engine default service account",
Expand Down Expand Up @@ -642,6 +644,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "Service account for local Terraform development",
"displayName": "j1-gc-integration-dev-sa-tf",
Expand Down Expand Up @@ -788,6 +791,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "Service account for local integration development runner",
"displayName": "j1-gc-integration-dev-v3",
Expand Down Expand Up @@ -1158,6 +1162,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "Demo",
"displayName": "demo-j1-sa",
Expand Down Expand Up @@ -1247,6 +1252,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": undefined,
"displayName": "App Engine default service account",
Expand Down Expand Up @@ -1336,6 +1342,7 @@ Object {
},
],
"_type": "google_iam_service_account",
"active": true,
"createdOn": undefined,
"description": "J1 Google Cloud integration execution",
"displayName": "projects/j1-gc-integration-dev-v3/serviceAccounts/j1-gc-integration-dev-sa@j1-gc-integration-dev-v3.iam.gserviceaccount.com",
Expand Down
1 change: 1 addition & 0 deletions src/steps/iam/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function createIamServiceAccountEntity(
username: data.email,
email: data.email,
enabled: data.disabled !== true,
active: data.disabled !== true,
description: data.description,
etag: data.etag,
webLink: getServiceAccountWebLink({
Expand Down
Loading

0 comments on commit 7eb5469

Please sign in to comment.