Skip to main content

No project description provided

Project description

Carve Systems GCP Assessment Tooling (Name TBD)

Installation

This tool requires Python 3.8 or newer.

Additionally, the gcloud CLI is required for authentication against Google user accounts.

Usage

Prerequisites

To use this tool against a Google Cloud environment, you must be have a user account with the Security Reviewer role granted across all relevant projects. The use of a service account with these permissions is recommended if possible; regular user accounts are subject to stricter rate-limiting by Google.

Currently, gcptool authenticates using Google Application Default Credentials. If you are using a regular user account for testing, the gcloud auth application-default login command will properly configure credentials for you. In the case of a service account, setting the GOOGLE_APPLICATION_CREDENTIALS environment variable to a path containing a service account keypair will be required.

You can verify access is working correctly using two commands within the tool; gcptool list-projects will print a list of projects you can currently access, and gcptool check <PROJECT-NAME> will verify your account has the necessary set of permissions to perform all scans.

Running Tests

Once you've verified access, the gcptool scan command can be used to perform testing. To run a basic scan, the command can be used as follows:

gcptool scan PROJECT-NAME,PROJECT-NAME-2 path/to/report/findings/folder

This will produce several outputs:

  • A JSON inventory of Google Cloud Resources in gcptool_cache.json in the current directory (NOTE: this file should be handled with care, as it may contain sensitive information)
  • CDPS-format Markdown findings ready for editing and use in a report (Note that some of these are guidance to possible points of interest for manual testing)
  • gcptool.log log file with more detailed information

gcptool will use the generated cache file when possible to avoid making extraneous API requests; the --cache-only option can be used to exit with an error if any scan would required fresh data from the API. This is convenient, for example, to run new scans against already-collected data.

Other useful arguments are:

  • --service: only run scans for a specific GCP service. For example, --scan compute will only run Compute Engine tests.
  • --scan: only run a specific scan. One particularly useful use for this argument is --scan inventory, which will gather data or a complete cache file but will not run any analysis. (gcptool list-scans provides a helpful list of scans and services)

Development

Development dependencies

Code formatting is handled using the pre-commit tool. Please install and configure it before making any commits!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcptool-0.0.1.tar.gz (301.7 kB view details)

Uploaded Source

Built Distribution

gcptool-0.0.1-py3-none-any.whl (335.1 kB view details)

Uploaded Python 3

File details

Details for the file gcptool-0.0.1.tar.gz.

File metadata

  • Download URL: gcptool-0.0.1.tar.gz
  • Upload date:
  • Size: 301.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.1

File hashes

Hashes for gcptool-0.0.1.tar.gz
Algorithm Hash digest
SHA256 666af0a083e5b996b98a9cb0c9891a1e02ef19214f153e8b0e75ac1096566728
MD5 2650c5cd3adfc9bccb558cb714b17f11
BLAKE2b-256 ab9255275a0fb0aafea44efb1730846fd22e6d07a6364ac8c46505bdbb45c182

See more details on using hashes here.

File details

Details for the file gcptool-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gcptool-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 335.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.1

File hashes

Hashes for gcptool-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7246217e833a1034bacd7c3c568c2b2af0e5ee890367680c46e20feb351becd1
MD5 be34ea97d8fe5b9d58bc533916c708ba
BLAKE2b-256 174891ecc7de6d822261953a2e82137cf030c2b52e1f7344a302ab3f2128481e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page