Skip to main content
Quarantined

This project has been quarantined by PyPI admins. It cannot be installed or modified until a security review is complete.

gcphelpit — free CLI to scan Google Cloud for security, IAM, cost & reliability

Python License: MIT Checks Mock-first

gcphelpit is a free, open-source command-line tool that scans a snapshot of your Google Cloud project and finds security, IAM, cost, and reliability issues — with a plain-English fix for each finding.

It is mock-first: it reads a JSON snapshot of your resources, so it runs — and is fully testable — with zero live cloud access or credentials. A live GCP adapter can be layered on later behind the same interface.

📦 Install from PyPI: pip install gcphelpit 🌐 Documentation & guides: https://eliyas-123.github.io/gcphelpit/ 📋 Check catalog: All 16 checks →

Who is this for

  • You want to audit a Google Cloud project without giving a tool live access — point it at an exported JSON snapshot instead.
  • You want security, IAM, cost, and reliability covered in one pass, not four separate tools.
  • You want each finding to come with a recommended fix in plain English, not just a rule ID.
  • You want to gate CI/CD on GCP misconfigurations with a simple exit code.

Install & run

pip install gcphelpit
gcphelpit scan

You'll get a colour-coded table of findings, each with the offending resource and a recommended fix.

From source (for development):

git clone https://github.com/EliyaS-123/gcphelpit-cli && cd gcphelpit-cli
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
gcphelpit scan

What it checks

gcphelpit checks lists all built-in checks. They span four categories, each finding paired with a plain-English fix:

Category Examples
security public buckets, world-open firewall ports, public/no-SSL Cloud SQL
iam primitive owner/editor roles, external members, user-managed SA keys
cost unattached disks, idle static IPs, stopped VMs, no budget alert
reliability no DB backups, single-zone prod DB, no deletion protection

Usage

gcphelpit scan                          # scan the bundled demo snapshot
gcphelpit scan -f my-project.json       # scan your own snapshot
gcphelpit scan --category security      # only security checks (repeatable)
gcphelpit scan --min-severity high      # only high/critical findings
gcphelpit scan --format json            # machine-readable output
gcphelpit scan --fail-on high           # exit non-zero for CI/CD gating
gcphelpit checks                        # list every check in the catalog

Exit codes: 0 clean, 1 findings at/above --fail-on, 2 usage/error.

CI/CD gating

Fail the build when a project snapshot has issues at or above a severity — for example in GitHub Actions:

# .github/workflows/gcp-audit.yml
name: GCP audit
on: [push, pull_request]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - run: pip install gcphelpit
      - run: gcphelpit scan -f snapshot.json --fail-on high

The snapshot

A snapshot is a plain JSON object describing what you collected from a project. Every top-level key is optional — checks simply skip data that isn't there:

{
  "project_id": "my-project",
  "buckets": [ { "name": "assets", "uniform_bucket_level_access": true, "iam_bindings": [] } ],
  "firewalls": [],
  "instances": [],
  "disks": [],
  "addresses": [],
  "service_accounts": [],
  "iam_policy": { "bindings": [] },
  "sql_instances": [],
  "budgets": []
}

See fixtures/insecure_project.json for a fully populated example (and clean_project.json for a passing one).

How it compares

gcphelpit's niche is being the scanner you can point at an exported snapshot with no credentials, covering all four categories at once with plain-English fixes. For broad multi-cloud security coverage, tools like Prowler are stronger. See the honest gcphelpit vs Prowler / ScoutSuite / gcp-auditor comparison.

Adding a check

Every check is one decorated function. Drop it in the right file under src/gcphelpit/checks/ and it auto-registers:

from ..catalog import check
from ..models import Category, Detail, ResourceRef, Severity

@check(id="SEC099", title="…", category=Category.SECURITY,
       severity=Severity.HIGH, references=["https://cloud.google.com/…"])
def my_check(snapshot):
    for bucket in snapshot.get("buckets", []):
        if bad(bucket):
            yield Detail(
                resource=ResourceRef("storage.bucket", bucket["name"]),
                message="What's wrong.",
                recommendation="How to fix it.",
            )

Development

pip install -e ".[dev]"
pytest

License

MIT

Download files

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

Source Distribution

gcphelpit-0.1.1.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcphelpit-0.1.1-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file gcphelpit-0.1.1.tar.gz.

File metadata

  • Download URL: gcphelpit-0.1.1.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for gcphelpit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c37fd22b3d696faf77abf353a02be13ce62f2c0ab122fb621b637e4a19d25913
MD5 2792600f69b3a79e0c1a4e3bd47b189a
BLAKE2b-256 40ebceb3495fc9a32ff095c4e42104100b1da316773cd0bebe4c2c1e3b09ce6d

See more details on using hashes here.

File details

Details for the file gcphelpit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gcphelpit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for gcphelpit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e56a3c3dbd65e59a0cbd59c158eeffcd14c2b16ef54bb96cf229fc258b81679
MD5 06458631c1985d0ae280004bf07b5129
BLAKE2b-256 accbe60b073857ee434d181b36234beb6dabb108f3747cc8936d01052406dcd5

See more details on using hashes here.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page