Skip to content

Commit 5e100c6

Browse files
authored
Merge pull request #20 from oswin-mako/fix/gcp-scan-reporting
feat: add GCP compliance scanning Thanks @oswin-mako — three bugs cleanly addressed in a6fe068, 142 GCP tests pass alongside the full suite (314/314), and you turned this around same-day after the review. Merging.
2 parents 903fb25 + adafa55 commit 5e100c6

27 files changed

Lines changed: 11845 additions & 75 deletions

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to Shasta are documented here. Format follows
44
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project
55
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## Unreleased
8+
9+
### Added
10+
- Add GCP compliance scanning coverage across IAM, networking, storage,
11+
encryption, logging, compute, and Cloud Run, including CIS GCP mappings,
12+
Google provider Terraform remediation templates, GCP dependencies, and
13+
GCP smoke/functional tests.
14+
15+
### Fixed
16+
- Surface GCP domain, project, IAM, and GCS per-resource API failures as
17+
`NOT_ASSESSED` findings instead of silently dropping checks or reporting
18+
false `PASS` results.
19+
- Use Cloud Resource Manager's `projects/NUMBER` resource name when recording
20+
GCP project numbers.
21+
- Render GCP provider labels and CIS GCP controls in Markdown, HTML,
22+
consolidated reports, and dashboard finding details.
23+
724
## [1.9.0] — 2026-05-05 — Voice console (opt-in)
825

926
### Added

README.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
**Multi-Cloud Compliance Automation, Claude-Native**
66

77
AI-native compliance toolkit — SOC 2, ISO 27001, HIPAA, ISO 42001, and EU AI Act
8-
across AWS and Azure. Through conversation, not dashboards — including an opt-in
9-
**voice console** (`python -m shasta.voice`) that lets you talk to your compliance
10-
posture hands-free. From the team at [Transilience.ai](https://www.transilience.ai).
8+
across AWS, Azure, and GCP. Through conversation, not dashboards — including an
9+
opt-in **voice console** (`python -m shasta.voice`) that lets you talk to your
10+
compliance posture hands-free. From the team at [Transilience.ai](https://www.transilience.ai).
1111

1212
[![Built by Transilience](https://img.shields.io/badge/Built%20by-Transilience.ai-4A90D9)](https://www.transilience.ai)
1313
[![CI](https://github.com/transilienceai/shasta/actions/workflows/integrity.yml/badge.svg)](https://github.com/transilienceai/shasta/actions/workflows/integrity.yml)
@@ -24,7 +24,7 @@ posture hands-free. From the team at [Transilience.ai](https://www.transilience.
2424

2525
> 📹 **See it in action:** [60-second walkthrough of the voice console](./docs/media/shasta-voice-demo.mp4) — talk to your compliance posture, drill into findings, manage the risk register hands-free. Also attached as a release asset on the [v1.9.0 GitHub Release](https://github.com/transilienceai/shasta/releases/tag/v1.9.0).
2626
27-
Shasta scans your cloud infrastructure for SOC 2, ISO 27001, HIPAA, ISO 42001, EU AI Act, OWASP LLM Top 10 and more. It covers 13 compliance frameworks, 221 automated checks, and 199 security questionnaire answers — with a web dashboard, an opt-in voice console, 112 Terraform remediation templates, and auditor-grade evidence. Application source-code AI scanning lives in the separate [Whitney](https://github.com/transilienceai/whitney) project (`pip install whitney`). Built for founders running <50 employee companies who need compliance without the $30K/year Vanta bill.
27+
Shasta scans your cloud infrastructure for SOC 2, ISO 27001, HIPAA, ISO 42001, EU AI Act, OWASP LLM Top 10 and more. It covers 13 compliance frameworks, 267 automated checks, and 199 security questionnaire answers — with a web dashboard, an opt-in voice console, 132 Terraform remediation templates, and auditor-grade evidence. Application source-code AI scanning lives in the separate [Whitney](https://github.com/transilienceai/whitney) project (`pip install whitney`). Built for founders running <50 employee companies who need compliance without the $30K/year Vanta bill.
2828

2929
> **Three load-bearing artifacts at the repo root, in order of what to read:**
3030
> [`README.md`](./README.md) (this file — what it does) →
@@ -56,7 +56,7 @@ For application source-code AI security scanning — prompt injection detection,
5656

5757
## Platform Capabilities
5858

59-
### 1. Multi-Cloud Security Scanning (5 Domains, 174+ Checks)
59+
### 1. Multi-Cloud Security Scanning (5 Domains, 267+ Checks)
6060

6161
#### AWS Checks (40+)
6262

@@ -184,7 +184,7 @@ Attack surface analysis that produces auditor-grade pen test evidence:
184184
### 11. Risk Register (SOC 2 CC3.1)
185185

186186
Automated risk management workflow required for SOC 2 Risk Assessment:
187-
- **Auto-seeds from scan findings** — failing checks automatically create risk items with pre-mapped likelihood, impact, and treatment plans (34 check-to-risk mappings across AWS + Azure)
187+
- **Auto-seeds from scan findings** — failing checks automatically create risk items with pre-mapped likelihood, impact, and treatment plans (34 check-to-risk mappings across AWS, Azure, and GCP)
188188
- **Risk scoring** — 3x3 likelihood/impact matrix (1-9 score, low/medium/high levels)
189189
- **Treatment tracking** — mitigate, accept, transfer, or avoid with documented plans
190190
- **Status workflow** — open → in_progress → accepted/resolved
@@ -254,7 +254,8 @@ git clone https://github.com/kkmookhey/shasta.git
254254
cd shasta
255255
pip install -e ".[dev]" # Core + dev tools
256256
pip install -e ".[azure]" # Add Azure support (optional)
257-
pip install -e ".[dev,azure]" # Everything
257+
pip install -e ".[gcp]" # Add GCP support (optional)
258+
pip install -e ".[dev,azure,gcp]" # Everything
258259

259260
# 2a. Configure AWS (read-only access)
260261
aws configure --profile shasta
@@ -264,10 +265,15 @@ aws configure --profile shasta
264265
az login
265266
az account show # Note your subscription_id and tenant_id
266267

268+
# 2c. Configure GCP (read access via Application Default Credentials)
269+
gcloud auth application-default login
270+
gcloud config set project YOUR_PROJECT_ID
271+
267272
# 3. Open Claude Code and run
268273
/connect-aws # Validate AWS credentials, discover services
269274
/connect-azure # Validate Azure credentials, discover services
270-
/scan # Full SOC 2 compliance scan (AWS, Azure, or both)
275+
/connect-gcp # Validate GCP credentials, discover project and services
276+
/scan # Full SOC 2 compliance scan (AWS, Azure, GCP, or any combination)
271277
/gap-analysis # Interactive gap analysis with AI guidance
272278
/report # Generate PDF/HTML/MD reports
273279
/remediate # Get Terraform fixes for findings
@@ -302,7 +308,8 @@ Skills are the building blocks Claude uses behind the scenes. You can invoke the
302308
|-------|-------------|--------|
303309
| `/connect-aws` | Validate AWS credentials, discover account topology and services | Account info, service list |
304310
| `/connect-azure` | Validate Azure credentials, discover subscription and services | Subscription info, service list |
305-
| `/scan` | Run all compliance checks across AWS and/or Azure (IAM, network, storage, encryption, monitoring) | Findings with AI explanations |
311+
| `/connect-gcp` | Validate GCP credentials, discover project and enabled services | Project info, service list |
312+
| `/scan` | Run all compliance checks across AWS, Azure, and/or GCP (IAM, network, storage, encryption, monitoring) | Findings with AI explanations |
306313
| `/gap-analysis` | Interactive SOC 2 gap analysis with control-by-control walkthrough | Gap analysis report |
307314
| `/report` | Generate compliance reports in all formats | MD, HTML, PDF files |
308315
| `/remediate` | Interactive remediation with Terraform code and step-by-step instructions | Terraform bundle + guidance |
@@ -330,14 +337,14 @@ For a **<50 employee startup** pursuing compliance:
330337

331338
| Category | Coverage | Method |
332339
|----------|----------|--------|
333-
| Technical cloud controls | ~90% | 190+ automated checks across AWS and Azure (full CIS AWS v3.0 + CIS Azure v3.0 coverage, including EC2/EKS/ECS hardening, KMS posture, CIS 4.x CloudWatch alarms, CloudFront, Redshift, ElastiCache, Neptune, Lambda Function URL auth, S3 Object Ownership, AWS Backup cross-region copy + access policy) |
340+
| Technical cloud controls | ~90% | 267+ automated checks across AWS, Azure, and GCP (full CIS AWS v3.0 + CIS Azure v3.0 coverage plus CIS GCP mappings, including EC2/EKS/ECS hardening, KMS posture, CIS 4.x CloudWatch alarms, CloudFront, Redshift, ElastiCache, Neptune, Lambda Function URL auth, S3 Object Ownership, AWS Backup cross-region copy + access policy) |
334341
| Policy/process controls | ~80% | 8 generated policy documents |
335342
| Continuous monitoring | ~90% | 12 Config Rules + 6 EventBridge rules + GuardDuty + Inspector + Azure Defender (per-plan) + Azure Policy + CIS 5.2.x Activity Log alerts |
336343
| Audit evidence | ~85% | Control tests, evidence snapshots (AWS + Azure), access reviews, reports |
337344
| Vulnerability management | ~85% | Inspector + SBOM + OSV.dev + CISA KEV |
338345
| Supply chain security | ~80% | SBOM discovery + known-compromised DB + live scanning |
339346
| Change management | ~80% | GitHub integration + CloudTrail + Config + Azure Activity Log |
340-
| Remediation guidance | ~90% | 112 Terraform templates (81 AWS + 31 Azure azurerm) covering CloudTrail/KMS/Object Lock, Security Hub, Access Analyzer, EC2 IMDSv2 + instance profiles, EKS private endpoint + audit logging + secrets KMS, ECS task hardening, KMS rotation + key policy + scheduled deletion, IAM policy wildcards + role trust + unused roles, CIS 4.x CloudWatch alarms, Config conformance packs, CloudFront HTTPS+TLS+WAF+OAC, Redshift encryption+public-access+audit+SSL, ElastiCache TLS+at-rest+AUTH, Neptune encryption, RDS force_ssl + log_settings + min TLS, Lambda Function URL auth + layer origin, API Gateway client cert + authorizer + throttling + request validation, S3 Object Ownership + access logging + KMS-CMK, AWS Backup cross-region copy + access policy, EFS/SNS/SQS/Secrets/ACM, ELB v2 TLS+logs+headers, RDS deep+IAM auth+PITR, Lambda runtime+CMK+DLQ, API Gateway WAF+logging, AWS Backup vault lock, VPC endpoints, CloudWatch Logs KMS+retention, AWS Org SCPs+tag policies — plus the full Azure set |
347+
| Remediation guidance | ~90% | 132 Terraform templates (81 AWS + 31 Azure azurerm + 20 GCP google) covering CloudTrail/KMS/Object Lock, Security Hub, Access Analyzer, EC2 IMDSv2 + instance profiles, EKS private endpoint + audit logging + secrets KMS, ECS task hardening, KMS rotation + key policy + scheduled deletion, IAM policy wildcards + role trust + unused roles, CIS 4.x CloudWatch alarms, Config conformance packs, CloudFront HTTPS+TLS+WAF+OAC, Redshift encryption+public-access+audit+SSL, ElastiCache TLS+at-rest+AUTH, Neptune encryption, RDS force_ssl + log_settings + min TLS, Lambda Function URL auth + layer origin, API Gateway client cert + authorizer + throttling + request validation, S3 Object Ownership + access logging + KMS-CMK, AWS Backup cross-region copy + access policy, EFS/SNS/SQS/Secrets/ACM, ELB v2 TLS+logs+headers, RDS deep+IAM auth+PITR, Lambda runtime+CMK+DLQ, API Gateway WAF+logging, AWS Backup vault lock, VPC endpoints, CloudWatch Logs KMS+retention, AWS Org SCPs+tag policies — plus the full Azure and GCP sets |
341348
| Security questionnaires | ~70% | 199 questions auto-filled from scan evidence (SIG Lite, CAIQ, Enterprise) |
342349
| AI governance | ~85% | Cloud AI checks (Bedrock + SageMaker + Azure OpenAI + Azure ML) + AI SBOM, 7 frameworks (ISO 42001, EU AI Act, NIST AI RMF, NIST AI 600-1, OWASP LLM Top 10, OWASP Agentic Top 10, MITRE ATLAS); application source-code prompt-injection scanning lives in the standalone Whitney scanner (separate repo) |
343350
| Visual dashboard | Yes | FastAPI + Tailwind + Chart.js at localhost:8080 |
@@ -659,7 +666,7 @@ Tier 2 and 3 used 4 parallel agents in isolated worktrees for maximum throughput
659666
| Terraform templates | 14 | 36 | **36** |
660667
| Unit tests | 9 | 100 | **100** |
661668
| Compliance frameworks | 1 (SOC 2) | 2 (SOC 2 + ISO 27001) | **5** (+ HIPAA, ISO 42001, EU AI Act) |
662-
| Cloud providers | 1 (AWS) | 2 (AWS + Azure) | **2** |
669+
| Cloud providers | 1 (AWS) | 2 (AWS + Azure) | **3** (AWS + Azure + GCP) |
663670

664671
### Token Consumption Estimate
665672

@@ -717,7 +724,8 @@ shasta/
717724
├── .claude/skills/ # Claude Code skills (auto-discovered)
718725
│ ├── connect-aws/SKILL.md # AWS connection and validation
719726
│ ├── connect-azure/SKILL.md # Azure connection and validation
720-
│ ├── scan/SKILL.md # Full compliance scan (AWS + Azure)
727+
│ ├── connect-gcp/SKILL.md # GCP connection and validation
728+
│ ├── scan/SKILL.md # Full compliance scan (AWS + Azure + GCP)
721729
│ ├── gap-analysis.md # Interactive gap analysis
722730
│ ├── report.md # Report generation (MD/HTML/PDF)
723731
│ ├── remediate.md # Terraform remediation guidance
@@ -790,7 +798,7 @@ shasta/
790798
│ └── azure-test-env/ # Azure test environment
791799
│ └── main.tf # Azure test resources (compliant + non-compliant)
792800
793-
├── tests/ # pytest test suite (500+ tests)
801+
├── tests/ # pytest test suite (720+ tests)
794802
│ ├── conftest.py
795803
│ ├── test_aws/
796804
│ │ ├── test_client.py # AWS client tests (moto)
@@ -864,7 +872,7 @@ shasta/
864872
- [ ] Network ACL checks (AWS)
865873

866874
### Medium Term
867-
- [ ] GCP scanning modules
875+
- [x] ~~GCP scanning modules~~ — IAM, networking, storage, encryption, monitoring, compute, and Cloud Run checks with CIS GCP mappings
868876
- [ ] Okta integration (identity provider checks)
869877
- [ ] Google Workspace integration
870878
- [ ] Trust center page generation

TRUST.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ forward-looking discipline. Principles say what we promise to do.
1010
Trust says how you check that we did it.
1111

1212
For the Whitney AI scanner's specific validation story (vulnerability
13-
fixtures, live cloud validation against AWS + Azure, dual-engine
13+
fixtures, live cloud validation across AWS, Azure, and GCP, dual-engine
1414
Semgrep architecture), see the standalone Whitney repo at
1515
[github.com/transilienceai/whitney](https://github.com/transilienceai/whitney).
1616
(`src/whitney/TRUST.md` was retired in the 2026-04-13 Whitney/Shasta split.)
@@ -21,9 +21,9 @@ Semgrep architecture), see the standalone Whitney repo at
2121

2222
Shasta and Whitney together ship the following, all integrity-tested:
2323

24-
- **221 check functions** (221 cloud compliance + 0 AI governance — Whitney now ships as a separate repo at [github.com/transilienceai/whitney](https://github.com/transilienceai/whitney); install with `pip install whitney` for source-code scanning)
25-
- **112 Terraform remediation templates** (81 AWS + 31 Azure)
26-
- **706 tests** that all pass on every commit
24+
- **267 check functions** (267 cloud compliance + 0 AI governance — Whitney now ships as a separate repo at [github.com/transilienceai/whitney](https://github.com/transilienceai/whitney); install with `pip install whitney` for source-code scanning)
25+
- **132 Terraform remediation templates** (81 AWS + 31 Azure + 20 GCP)
26+
- **814 tests** that all pass on every commit
2727

2828
None of the claims in this README are written by hand and hoped-for —
2929
every numeric claim is AST-counted from source by an integrity test
@@ -58,7 +58,7 @@ Every finding is produced by:
5858

5959
| Mechanism | Used in |
6060
|---|---|
61-
| `boto3` / `azure.mgmt.*` SDK calls | All AWS / Azure cloud checks |
61+
| `boto3` / `azure.mgmt.*` / Google Cloud SDK calls | AWS, Azure, and GCP cloud checks |
6262
| Semgrep AST-based pattern matching (with regex fallback) | Whitney code scanning |
6363
| Dictionary lookups | Framework control mapping |
6464
| Arithmetic | Compliance scoring |

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ azure = [
6262
"azure-mgmt-security>=6.0.0",
6363
"msgraph-sdk>=1.5.0",
6464
]
65+
gcp = [
66+
"google-auth>=2.29.0",
67+
"google-api-python-client>=2.128.0",
68+
"google-cloud-storage>=2.16.0",
69+
"google-auth-httplib2>=0.2.0",
70+
]
6571
dashboard = [
6672
"fastapi>=0.115.0",
6773
"uvicorn>=0.32.0",

src/shasta/dashboard/routes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def _enrich_all_frameworks(findings):
3131
enrich_findings_with_hipaa(findings)
3232
return findings
3333

34+
3435
router = APIRouter()
3536

3637

@@ -195,6 +196,7 @@ async def finding_detail(request: Request, finding_id: str):
195196

196197
# Get mapped controls
197198
soc2_controls = finding.soc2_controls
199+
cis_gcp_controls = finding.cis_gcp_controls
198200
iso_controls = finding.details.get("iso27001_controls", [])
199201
hipaa_controls = finding.details.get("hipaa_controls", [])
200202

@@ -204,6 +206,7 @@ async def finding_detail(request: Request, finding_id: str):
204206
"request": request,
205207
"finding": finding,
206208
"soc2_controls": soc2_controls,
209+
"cis_gcp_controls": cis_gcp_controls,
207210
"iso_controls": iso_controls,
208211
"hipaa_controls": hipaa_controls,
209212
"details_json": json.dumps(finding.details, indent=2, default=str),

src/shasta/dashboard/templates/finding_detail.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h3 class="text-sm font-semibold text-gray-700 uppercase tracking-wider mb-4">Re
102102
<!-- Controls -->
103103
<div class="bg-white rounded-xl shadow-sm border border-gray-200 p-6 mb-6">
104104
<h3 class="text-sm font-semibold text-gray-700 uppercase tracking-wider mb-4">Mapped Controls</h3>
105-
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
105+
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
106106
{% if soc2_controls %}
107107
<div>
108108
<h4 class="text-xs font-medium text-gray-500 mb-2">SOC 2 Controls</h4>
@@ -113,6 +113,16 @@ <h4 class="text-xs font-medium text-gray-500 mb-2">SOC 2 Controls</h4>
113113
</div>
114114
</div>
115115
{% endif %}
116+
{% if cis_gcp_controls %}
117+
<div>
118+
<h4 class="text-xs font-medium text-gray-500 mb-2">CIS GCP Controls</h4>
119+
<div class="flex flex-wrap gap-2">
120+
{% for ctrl in cis_gcp_controls %}
121+
<span class="px-3 py-1 rounded-lg text-xs font-medium bg-sky-50 text-sky-700 border border-sky-200">{{ ctrl }}</span>
122+
{% endfor %}
123+
</div>
124+
</div>
125+
{% endif %}
116126
{% if iso_controls %}
117127
<div>
118128
<h4 class="text-xs font-medium text-gray-500 mb-2">ISO 27001 Controls</h4>
@@ -133,8 +143,8 @@ <h4 class="text-xs font-medium text-gray-500 mb-2">HIPAA Controls</h4>
133143
</div>
134144
</div>
135145
{% endif %}
136-
{% if not soc2_controls and not iso_controls and not hipaa_controls %}
137-
<p class="text-sm text-gray-400 md:col-span-3">No control mappings available for this finding.</p>
146+
{% if not soc2_controls and not cis_gcp_controls and not iso_controls and not hipaa_controls %}
147+
<p class="text-sm text-gray-400 md:col-span-4">No control mappings available for this finding.</p>
138148
{% endif %}
139149
</div>
140150
</div>

src/shasta/evidence/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class CloudProvider(str, Enum):
3535

3636
AWS = "aws"
3737
AZURE = "azure"
38+
GCP = "gcp"
3839

3940

4041
class CheckDomain(str, Enum):
@@ -106,6 +107,7 @@ def not_assessed(
106107
soc2_controls: list[str] = Field(default_factory=list) # e.g., ["CC6.1", "CC6.2"]
107108
cis_aws_controls: list[str] = Field(default_factory=list) # e.g., ["1.4", "3.1"]
108109
cis_azure_controls: list[str] = Field(default_factory=list) # e.g., ["1.1.4", "5.2.1"]
110+
cis_gcp_controls: list[str] = Field(default_factory=list) # e.g., ["1.4", "3.6", "5.1"]
109111
mcsb_controls: list[str] = Field(default_factory=list) # e.g., ["IM-6", "DP-5"]
110112
iso27001_controls: list[str] = Field(default_factory=list) # e.g., ["A.8.5", "A.5.15"]
111113
hipaa_controls: list[str] = Field(default_factory=list) # e.g., ["164.312(a)(1)", "164.312(e)(1)"]

src/shasta/gcp/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""GCP compliance scanning for Shasta."""

0 commit comments

Comments
 (0)