GWS Security Auditor
Open-source Google Workspace security posture assessment tool
Audit your GWS tenant against CIS Benchmarks, CISA SCuBA Baselines, and industry best practices.
Description
GWS Security Auditor is a Python-based tool that automatically evaluates your Google Workspace configuration against four industry-standard security frameworks. It connects to your tenant and performs read-only API calls, collects configuration data, evaluates 227 security checks (including 24 critical-severity checks), and generates actionable reports in HTML, JSON, and CSV formats.
Key Features
- 227 security checks across 4 frameworks (CIS, CISA SCuBA, Google, Other)
- Critical severity system -- 24 checks flagged as critical with impact explanations
- Interactive setup wizard --
gws-auditor setupautomates GCP project, API enablement, and service account creation - Multi-credential profiles -- switch between tenants with
--profile - Customer ID auto-discovery -- no manual ID configuration needed
- CI/CD integration --
--fail-on-criticalexits with code 2 for pipeline gates - Standalone executables -- single-file binaries for Linux and Windows (no Python required)
- Interactive dashboard -- Plotly Dash web UI with dark mode, charts, and drill-down
- AI security analyst -- natural language queries via OpenAI, Anthropic, or AWS Bedrock
CLI
$ gws-auditor
╭──────────────── CRITICAL SECURITY FINDINGS (13) ────────────────╮
│ CIS-4.1.1.1 2SV not enforced for admins │
│ CIS-3.1.3.2.3 DMARC policy is weak (p=none) │
│ ADD-33 7 apps with dangerous OAuth scopes │
╰─────────── These findings require immediate attention ──────────╯
Audit Summary
┌─────────────────────┬───────┐
│ Total Checks │ 227 │
│ Passed │ 96 │
│ Failed │ 64 │
│ Critical Failures │ 13 │
│ Pass Rate │ 60.0% │
└─────────────────────┴───────┘
HTML Report
At a Glance
| Framework | Full Name | Checks |
|---|---|---|
| CIS | CIS Google Workspace Foundations Benchmark v1.3.0 | 84 |
| CISA | CISA SCuBA Baselines for Google Workspace | 97 |
| Google Security Checklist for Medium & Large Businesses | 21 | |
| OTHER | Additional best-practice checks | 25 |
| Total | 227 |
Installation
pip (Recommended)
# Core audit tool
pip install -e .
# With interactive dashboard
pip install -e ".[dashboard]"
# With AI analyst (choose one or all providers)
pip install -e ".[ai-anthropic]"
pip install -e ".[ai-openai]"
pip install -e ".[ai]" # all providers
# With standalone build support
pip install -e ".[build]"
# Everything
pip install -e ".[dashboard,ai,dev,build]"
Standalone Executable
Pre-built binaries are available on the Releases page -- no Python installation required.
# Linux
chmod +x gws-auditor-linux-amd64
./gws-auditor-linux-amd64 --credentials credentials.json --subject admin@company.com
# Windows
gws-auditor-windows-amd64.exe --credentials credentials.json --subject admin@company.com
To build from source:
pip install -e ".[build]"
python build.py # creates dist/gws-auditor
Requirements
- Python 3.9+ (not needed for standalone executable)
- Google Workspace Super Admin or delegated admin access
- Service Account with domain-wide delegation (recommended) or OAuth 2.0 credentials
Setup
Automated Setup (Recommended)
The setup wizard automates GCP project configuration, API enablement, service account creation, and config generation:
# Interactive wizard
gws-auditor setup
# With pre-set values
gws-auditor setup --project my-gcp-project --subject admin@company.com
# Use existing service account key
gws-auditor setup --existing-sa-key credentials.json --subject admin@company.com
The wizard handles 7 of 9 setup steps automatically. The only manual step is authorizing domain-wide delegation scopes in the Google Admin Console -- the wizard provides the Client ID, scope string, and a direct link.
Manual Setup
See docs/SETUP_GUIDE.md for step-by-step manual instructions covering:
- GCP Project -- create or select a project
- Enable APIs -- Admin SDK, Gmail, Drive, Calendar, Groups Settings, Cloud Identity, Chrome Policy, Chat, Alert Center, License Manager
- Service Account -- create with domain-wide delegation, download JSON key
- Domain-Wide Delegation -- authorize 21 read-only scopes in Admin Console
- Configuration -- create
config.yaml - Validation --
gws-auditor --validateto test connectivity
Configure
auth:
method: service_account
credentials_file: credentials.json
credentials_dir: credentials # folder for multi-credential profiles
subject: admin@company.com
customer_id: auto # auto-discover from API (or explicit ID)
profiles: # named credential profiles
production:
credentials_file: credentials/prod.json
subject: admin@company.com
staging:
credentials_file: credentials/staging.json
subject: admin@staging.company.com
checks:
levels: [L1, L2]
sources: [CIS, OTHER, GOOGLE, CISA]
sections: all
exclude: []
output:
directory: ./reports
formats: [html, json, csv]
options:
cache_data: true
cache_directory: ./cache
org_units: all
max_retries: 5
rate_limit_qps: 10
ai:
provider: anthropic # openai, anthropic, or bedrock
model: "" # blank = provider default
api_key: "" # prefer env: ANTHROPIC_API_KEY / OPENAI_API_KEY
Usage
Full Audit
gws-auditor # uses config.yaml
gws-auditor -v # verbose
gws-auditor -vv # debug logging
# Without config.yaml (minimum required arguments)
gws-auditor --credentials credentials.json --subject admin@company.com
Credential Profiles
gws-auditor --profile ? # list available profiles
gws-auditor --profile production # use named profile
CI/CD Pipeline
gws-auditor --fail-on-critical # exit code 2 if critical checks fail
Filter and Target
gws-auditor --check CIS-1.1.1 # single check
gws-auditor --level L1 # baseline checks only
gws-auditor --source CIS --source CISA # multiple frameworks
gws-auditor --section Gmail # specific section
gws-auditor --exclude CIS-1.1.3 # exclude checks
gws-auditor --cached ./cache/ # re-run on cached data
Validate Connectivity
gws-auditor --dry-run # quick auth test
gws-auditor --validate # detailed API probe
CLI Reference
gws-auditor [OPTIONS] [COMMAND]
Commands:
setup Interactive setup wizard
dashboard Launch web dashboard
analyst AI security analyst REPL
Options:
-c, --config PATH Configuration file (default: config.yaml)
--credentials PATH Credentials JSON file
--subject EMAIL Delegated admin email
--customer-id ID Customer ID (default: auto)
--profile NAME Use named credential profile (? to list)
--check ID Run single check
--level {L1,L2} Filter by level (repeatable)
--source {CIS,OTHER,GOOGLE,CISA} Filter by source (repeatable)
--section NAME Filter by section (repeatable)
--exclude ID Exclude check IDs (repeatable)
-o, --output-dir PATH Output directory
-f, --format {html,json,csv} Output format (repeatable)
--dry-run Validate auth only
--validate Detailed API/scope validation
--cached DIR Re-run on cached data
--list-checks List all checks
--fail-on-critical Exit code 2 on critical failures (CI/CD)
--resume Resume interrupted collection
--no-cloud-info Suppress Argus Cloud info message
--skip-update-check Skip version update check
--update Update to latest version and exit
-v, --verbose Increase verbosity
-q, --quiet Suppress output
Interactive Dashboard
pip install -e ".[dashboard]"
gws-auditor dashboard # http://127.0.0.1:8050
gws-auditor dashboard --port 9000 --host 0.0.0.0
Features: report selector, multi-filter dropdowns, metric cards, status donut chart, section bar charts, detailed findings table with search, compliance drill-down, dark/light mode toggle, CSV/HTML export.
AI Security Analyst
pip install -e ".[ai-anthropic]"
export ANTHROPIC_API_KEY="sk-ant-..."
gws-auditor analyst --provider anthropic
# Or with OpenAI
pip install -e ".[ai-openai]"
export OPENAI_API_KEY="sk-..."
gws-auditor analyst --provider openai
Query audit findings in natural language, get remediation plans, compare reports, and analyze compliance posture. Also available as a chat page in the dashboard.
Critical Checks
24 checks are tagged as CRITICAL -- failures represent severe security risks requiring immediate attention:
| Domain | Examples | Risk |
|---|---|---|
| Authentication | MFA not enforced, weak MFA methods, no session limits | Credential theft, account takeover |
| Missing SPF/DKIM/DMARC, auto-forwarding enabled | Domain impersonation, data exfiltration | |
| Data Protection | Public file publishing, 'anyone with link' sharing | Data breach, unauthorized access |
| Infrastructure | Dangerous OAuth apps, unrestricted third-party access | Silent data exfiltration, configuration tampering |
Each critical check includes a critical_reason explaining the business impact. The CLI shows a red banner for critical failures. Reports include severity and reason in JSON/CSV output.
Posture Score
Every audit produces a posture score (0-100) that weights findings by severity. Critical failures are squared, so they dominate the score:
| Grade | Score | Meaning |
|---|---|---|
| A | 90-100 | Excellent — minimal risk |
| B | 80-89 | Good — minor gaps |
| C | 70-79 | Fair — moderate risk |
| D | 50-69 | Poor — significant gaps |
| F | 0-49 | Critical — immediate action needed |
See the Posture Score wiki page for the full formula, examples, and improvement guidance.
Development
git clone <repo-url>
cd gws-security-auditor
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dashboard,ai,dev]"
pytest # 1162 tests
Building Standalone Executable
pip install -e ".[build]"
python build.py # dist/gws-auditor (~90 MB)
python build.py --onedir # faster startup
python build.py --clean # clean rebuild
Push a tag v* to trigger the GitHub Actions workflow that builds Linux + Windows executables and attaches them to the release.
Argus Cloud
Open source for individuals. Cloud-hosted for teams.
GWS Security Auditor is and will always be free and open source. For teams that need automation, collaboration, and compliance history, Argus Cloud extends the auditor with managed infrastructure:
| Open Source (Free) | Argus Cloud (from €12.50/mo) | |
|---|---|---|
| 227 security checks, 4 frameworks | ✓ | ✓ |
| HTML, JSON, CSV reports | ✓ | ✓ |
| Interactive dashboard | ✓ | ✓ |
| AI Analyst | BYO API key | Included |
| Automated daily/weekly scans | — | ✓ |
| Hosted dashboard with trends | — | ✓ |
| 12-month compliance history | — | ✓ |
| Regression alerts (Slack, email) | — | ✓ |
| Multi-tenant & team access | — | ✓ |
| JIRA, webhooks, RBAC | — | ✓ |
| Priority support | Community |
Sign up for free trial | Pricing
Acknowledgements
Inspired by Prowler, ScubaGoggles, and GAM.
License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
Metadata
Release files for gws-security-auditor 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gws_security_auditor-1.5.0.tar.gz | 329.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gws_security_auditor-1.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 691.2 kB
Release files / gws_security_auditor-1.5.0.tar.gz
| Download URL | gws_security_auditor-1.5.0.tar.gz |
|---|---|
| Size | 329.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1128552208fd176db90a28db2b6f4575dd973a06ccfb12e29ad3c881112d5c6
|
|
BLAKE2b-256 checksum How to use checksums |
66fd981725cd335218dd7b9caf1a84d17defd331ebe58b422c3177617e81571a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / gws_security_auditor-1.5.0-py3-none-any.whl
| Download URL | gws_security_auditor-1.5.0-py3-none-any.whl |
|---|---|
| Size | 362.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10e53adef3c88da8d432aa736469d9df85fad1df99ebe5985d7fbbca09d985c3
|
|
BLAKE2b-256 checksum How to use checksums |
5aba46fc0aeb6661ed89dcafcab7e7ac7aa3a392cbdc8d9b17bb8422327a9558
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logSecurity for gws-security-auditor 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for gws_security_auditor-1.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.