aquasecurity / aquasecurity/cloudsploit

Configuration value "project" not set properly when using the configuration method 'OPTION 2' for Google

Open
#269 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.8k
Forks
751
Avg merge
11d 9h
Merged PRs (30d)
3

Description

When passing in Google configuration information via 'OPTION 1', we manually set `"project": "your-project-name",`.

When using 'OPTION 3', `project` is set properly using either the environment variable:
`project: process.env.GOOGLE_PROJECT_ID,`
... or via the file pulled from `process.env.GOOGLE_APPLICATION_CREDENTIALS`:
`GoogleConfig.project = GoogleConfig.project_id;`

But when using 'OPTION 2' with a .json file downloaded from the Google control panel after creating the service account, `project_id` exists in the json but not `project`, so `GoogleConfig.project` never gets set.

This causes all the checks to appear as "UNKNOWN".

A workaround is to add the `project` item in the .json file, setting it to match the `project_id` node.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the configuration handling for Google 'OPTION 2' and compare how the downloaded service-account JSON maps project_id to project. Verify the fix with the existing Google checks or configuration tests, and consider it done when valid OPTION 2 credentials set project and checks no longer appear as UNKNOWN.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, javascript
Domain
cloud, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.