298 lines
12 KiB
Markdown
298 lines
12 KiB
Markdown
# Ghaymah Cloud V2 Platform — Complete Analysis Report
|
|
|
|
> Generated: 2026-10-22T17:56:00Z
|
|
> Analyst: Automated Security & Infrastructure Analysis
|
|
> Target: https://deploy.ghaymah.systems
|
|
|
|
---
|
|
|
|
## Executive Summary
|
|
|
|
This report documents a **comprehensive analysis** of the **Ghaymah Cloud V2** platform, covering infrastructure discovery, API exploration, microservice deployment testing, security posture assessment, and a detailed comparison against the previous V1 version.
|
|
|
|
**Key Findings:**
|
|
- V2 is a **major evolution** with 22+ new managed services and features
|
|
- Security posture is **generally strong** with row-level isolation, but **5 security headers are missing** and **GraphQL introspection is fully exposed**
|
|
- Free plan limits to **1 active app** (enforced server-side)
|
|
- App hosting domain has changed to `hosted.cumin.dev` (from `hosted.ghaymah.systems`)
|
|
- **GenAI/LiteLLM** integration is a notable new addition
|
|
- The platform now supports a **CLI-first workflow** (`gy` CLI)
|
|
- **22 one-click templates** available in the Store
|
|
|
|
---
|
|
|
|
## 1. Platform Architecture
|
|
|
|
### 1.1 Core Endpoints Discovered
|
|
|
|
| Service | URL | Status | Purpose |
|
|
|---------|-----|--------|---------|
|
|
| **Dashboard** | `https://deploy.ghaymah.systems` | ✅ 200 | React 19 SPA (Vite-built) |
|
|
| **Auth** | `https://auth.ghaymah.systems` | ✅ Active | Hasura Auth (email/password, JWT HS256) |
|
|
| **GraphQL** | `https://graphql.ghaymah.systems/v1/graphql` | ✅ Active | Hasura GraphQL Engine |
|
|
| **Gateway** | `https://gateway.ghaymah.systems` | ❌ 404 | API Gateway (not routing) |
|
|
| **GenAI** | `https://genai.ghaymah.systems` | ✅ 200 | LiteLLM AI Gateway ("RUNNING") |
|
|
| **Status** | `https://status.ghaymah.systems/status/ghaymah` | ✅ 200 | Service Status Page |
|
|
| **Logs** | `https://logs.ghaymah.systems/logs` | ⚠️ 405 | Centralized Logging (POST only) |
|
|
| **Integrations** | `https://integrations.ghaymah.systems/api` | ❌ 404 | Third-party Integrations |
|
|
| **Registry** | `https://registry.ghaymah.systems/v2/` | 🔒 401 | Private Container Registry |
|
|
| **S3 Proxy** | `https://s3-nhost-proxy-83e02743fd61.hosted.ghaymah.systems` | ❌ 404 | Artifact Storage |
|
|
| **CLI v2** | `https://cliv2.ghaymah.systems/install.sh` | ✅ 200 | CLI Installation Script |
|
|
| **Docs** | `https://docs.ghaymah.cloud` | ✅ 200 | Documentation (Starlight/Astro v7.3.2) |
|
|
|
|
### 1.2 Frontend Stack
|
|
- **Framework**: React 19.0.0 (Vite bundled)
|
|
- **Build**: `index-B3hPiU8x.js` + `index-MwbzL9Cf.css`
|
|
- **28 Routes Discovered**:
|
|
- `/apps`, `/apps/:appId` — App management
|
|
- `/projects`, `/projects/:projectId`, `/projects/:projectId/apps/:appId` — Project hierarchy
|
|
- `/dashboard/*`, `/dashboard/static-deploy` — Dashboard views
|
|
- `/genAI` — AI assistant
|
|
- `/billing` — Payment management
|
|
- `/tunnels` — Localhost tunneling
|
|
- `/volumes`, `/managed-volumes` — Storage
|
|
- `/secrets`, `/pull-secrets` — Credentials
|
|
- `/postgres` — Database management
|
|
- `/storage` — S3 storage
|
|
- `/store` — One-click templates
|
|
- `/integrations` — Third-party
|
|
- `/simple-deployer` — Quick deploy
|
|
- `/assistant` — AI chat
|
|
- `/teams` — Team management
|
|
- `/user/profile` — User settings
|
|
- `/login`, `/signup/:ref_by?`, `/forgot-password`, `/reset-password`, `/verify-email`, `/onboarding`, `/overview`
|
|
|
|
### 1.3 Backend Architecture
|
|
```
|
|
React 19 SPA (Vite)
|
|
├── Hasura Auth (JWT, HS256, 900s expiry)
|
|
├── Hasura GraphQL Engine
|
|
│ ├── 15 Query types
|
|
│ ├── 41 Mutation types
|
|
│ └── 22 Subscription types (WebSocket)
|
|
├── LiteLLM (GenAI Gateway)
|
|
├── Container Registry (per-user)
|
|
├── S3-compatible Storage (Nhost proxy)
|
|
├── Helm Charts (ghaymah-project, ghaymah-app)
|
|
└── Kubernetes Cluster
|
|
├── CoreDNS (service discovery)
|
|
├── Ingress Controller
|
|
└── Per-user namespaces
|
|
```
|
|
|
|
---
|
|
|
|
## 2. GraphQL API Surface
|
|
|
|
### 2.1 Queries (15)
|
|
| Query | Purpose |
|
|
|-------|---------|
|
|
| `ghaymah_cloud_resources` | List Helm chart resources |
|
|
| `ghaymah_cloud_resources_by_pk` | Get resource by ID |
|
|
| `ghaymah_cloud_managed_resources` | List managed resources |
|
|
| `ghaymah_cloud_store` | List store templates |
|
|
| `ghaymah_cloud_user_plans` | User plan/quota info |
|
|
| `ghaymah_cloud_genai_apikeys` | GenAI API keys |
|
|
| `ghaymah_cloud_row_event` | Event history |
|
|
| `authRefreshToken(s)` | Auth token management |
|
|
|
|
### 2.2 Mutations (41) — Full API Surface
|
|
| Category | Mutations |
|
|
|----------|-----------|
|
|
| **Apps** | `createApp`, `updateApp`, `deleteApp`, `listApps`, `appLogs` |
|
|
| **Static Apps** | `createStaticApp`, `updateStaticApp`, `deleteStaticApp`, `listStaticApps`, `createStaticUploadURL`, `generateStaticConfig` |
|
|
| **PostgreSQL** | `createPostgresDb`, `deletePostgresDb`, `listPostgresDb` |
|
|
| **S3 Storage** | `createS3Bucket`, `deleteS3Bucket`, `listS3Buckets`, `listS3BucketKeys`, `deleteS3BucketKey`, `rotateS3BucketKey` |
|
|
| **Volumes** | `createVolume`, `deleteVolume`, `listVolumes` |
|
|
| **Secrets** | `createSecret`, `deleteSecret`, `listSecrets` |
|
|
| **Pull Secrets** | `createPullSecret`, `deletePullSecret`, `listPullSecrets` |
|
|
| **Resources** | `insert_ghaymah_cloud_resources(_one)`, `update_*` |
|
|
| **Managed** | `insert_ghaymah_cloud_managed_resources(_one)`, `update_*` |
|
|
|
|
### 2.3 Key Input Types
|
|
|
|
```graphql
|
|
# CreateAppInput
|
|
input CreateAppInput {
|
|
name: String! # Friendly name (not UUID)
|
|
image: String! # Container image
|
|
ports: [AppPortInput] # {name: String!, number: Int!, hostname, health}
|
|
env: [AppEnvInput] # {name, value, is_secret, file_path}
|
|
mounts: [AppMountInput] # {path, volume_id}
|
|
tags: [AppTagInput] # {key, value}
|
|
memory: Int # Default: 512Mi
|
|
cpu: Int # Default: 256m
|
|
instances: Int # Default: 1
|
|
ephemeral: Boolean
|
|
hibernated: Boolean
|
|
pull_secret_id: String
|
|
args: [String]
|
|
}
|
|
|
|
# CreateS3BucketInput
|
|
input CreateS3BucketInput {
|
|
name: String!
|
|
maxSize: Int!
|
|
}
|
|
|
|
# DBInput (PostgreSQL)
|
|
input DBInput {
|
|
name: String!
|
|
dbName: String!
|
|
username: String!
|
|
password: String!
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Store Templates (22 One-Click Apps)
|
|
|
|
| Template | Category | Description |
|
|
|----------|----------|-------------|
|
|
| Code Server | development | VS Code in the browser |
|
|
| Grafana | monitoring | Monitoring dashboards |
|
|
| Basic Nginx | web | Simple web server |
|
|
| WordPress Light | web | WordPress CMS |
|
|
| IT Tools | productivity | Developer/IT tools collection |
|
|
| n8n | automation | Workflow automation |
|
|
| WordPress | development | WordPress + MariaDB |
|
|
| PostgreSQL | database | PostgreSQL server |
|
|
| Hasura GraphQL | database | PostgreSQL + Hasura Engine |
|
|
| Mini QR | productivity | QR code generator |
|
|
| MeiliBridge | database | PostgreSQL-MeiliSearch bridge |
|
|
| Memos | development | Self-hosted memo hub |
|
|
| MariaDB | database | MariaDB server |
|
|
| Twenty CRM | development | CRM + PostgreSQL + Redis |
|
|
| Uptime Kuma | automation | Self-hosted monitoring |
|
|
| Stirling PDF | productivity | PDF manipulation tool |
|
|
| Valkey | database | In-memory data store |
|
|
| DocuSeal | development | Document signing platform |
|
|
| PgBouncer | database | PostgreSQL connection pooler |
|
|
| ChromaDB | database | Vector database |
|
|
| Metabase | database | Business intelligence |
|
|
| MCP Demo | tools | MCP demo server |
|
|
|
|
---
|
|
|
|
## 4. Security Assessment
|
|
|
|
### 4.1 Test Results Summary
|
|
|
|
| # | Test | Result | Severity | Details |
|
|
|---|------|--------|----------|---------|
|
|
| 1 | **IDOR Protection** | ✅ SECURE | N/A | Returns `null` for foreign resource IDs |
|
|
| 2 | **Unauthenticated Access** | ✅ SECURE | N/A | Query root not accessible without auth |
|
|
| 3 | **SQL Injection** | ✅ SECURE | N/A | Hasura parameterized queries prevent injection |
|
|
| 4 | **Cross-User Mutation** | ✅ SECURE | N/A | Cannot modify resources owned by other users |
|
|
| 5 | **JWT Algorithm** | ⚠️ HS256 | LOW | Symmetric algorithm (HS256), consider RS256 |
|
|
| 6 | **GraphQL Introspection** | ⚠️ EXPOSED | MEDIUM | 148 types fully exposed via introspection |
|
|
| 7 | **Security Headers** | ❌ MISSING | MEDIUM | All 5 standard headers missing |
|
|
| 8 | **Rate Limiting (Auth)** | ✅ ENFORCED | N/A | 429 returned after rapid auth requests |
|
|
| 9 | **Rate Limiting (API)** | ⚠️ NOT DETECTED | LOW | 20 rapid GraphQL requests succeeded |
|
|
| 10 | **Billing Enforcement** | ✅ ENFORCED | N/A | Free plan correctly limits to 1 active app |
|
|
|
|
### 4.2 Missing Security Headers
|
|
```
|
|
X-Frame-Options: MISSING → Risk: Clickjacking
|
|
X-Content-Type-Options: MISSING → Risk: MIME sniffing
|
|
Strict-Transport-Security: MISSING → Risk: Downgrade attacks
|
|
Content-Security-Policy: MISSING → Risk: XSS
|
|
X-XSS-Protection: MISSING → Risk: Reflected XSS
|
|
```
|
|
|
|
### 4.3 JWT Token Structure
|
|
```json
|
|
{
|
|
"alg": "HS256", // Symmetric key algorithm
|
|
"iss": "hasura-auth", // Issuer
|
|
"sub": "6c8a1ce5-...", // User ID
|
|
"exp": 1792680152, // 900s (15 min) expiry
|
|
"claims": {
|
|
"x-hasura-allowed-roles": ["me", "user"],
|
|
"x-hasura-default-role": "user",
|
|
"x-hasura-user-id": "6c8a1ce5-...",
|
|
"x-hasura-user-is-anonymous": "false"
|
|
}
|
|
}
|
|
```
|
|
|
|
### 4.4 Key Security Observations
|
|
1. **Row-Level Security**: Hasura RLS properly enforces `user_id` isolation — users cannot access or modify other users' resources
|
|
2. **Auth Rate Limiting**: The auth endpoint returns `429 Too Many Requests` on rapid authentication attempts
|
|
3. **GraphQL Introspection**: Full schema is exposed, which leaks internal API structure to attackers
|
|
4. **Billing Enforcement**: Server-side enforcement of free plan limits (1 app max) is properly implemented
|
|
|
|
---
|
|
|
|
## 5. Deployment Test Results
|
|
|
|
### 5.1 Test App Deployment
|
|
```
|
|
Service: v2-soc-gateway
|
|
Image: nginx:alpine
|
|
Status: Healthy ✅
|
|
URL: https://v2-soc-gateway-http-f2501454.hosted.cumin.dev
|
|
CPU: 256m
|
|
Memory: 512Mi
|
|
Instances: 1
|
|
Response: HTTP 200 (nginx/1.31.7)
|
|
```
|
|
|
|
### 5.2 Key Deployment Finding
|
|
> **App URLs now use `hosted.cumin.dev`** instead of `hosted.ghaymah.systems`
|
|
> This reveals the V2 platform uses a different hosting infrastructure (Cumin) for the actual app runtime,
|
|
> while the dashboard and APIs remain on `ghaymah.systems`.
|
|
|
|
### 5.3 Free Plan Limitations
|
|
- Maximum 1 active app
|
|
- Attempting to create a second app returns: `"payment required: your free app is already running - add a payment method for more"`
|
|
- Resource tiers: t1 through t7 available
|
|
|
|
---
|
|
|
|
## 6. GenAI / AI Integration
|
|
|
|
- **Engine**: LiteLLM (confirmed running at `genai.ghaymah.systems`)
|
|
- **API Keys**: Managed via GraphQL (`ghaymah_cloud_genai_apikeys` table)
|
|
- **User Key**: Pre-provisioned with key name `"GENAI Key for ziad.abd.elgwad2003@gmail.com"`
|
|
- **Budget**: No max budget set (unlimited)
|
|
- **Dashboard**: Accessible at `/genAI` route
|
|
- **AI Assistant**: Separate `/assistant` route for chat-based AI
|
|
|
|
---
|
|
|
|
## 7. User Account & Plan Details
|
|
|
|
```json
|
|
{
|
|
"plan_type": "free",
|
|
"current_resources": -14,
|
|
"max_resources": 5,
|
|
"user_id": "6c8a1ce5-4ac3-47ad-8838-64e2a986acf3"
|
|
}
|
|
```
|
|
|
|
> Note: `current_resources: -14` indicates deleted resources count down below zero, suggesting a counter that decrements on deletion but doesn't properly reset.
|
|
|
|
---
|
|
|
|
## 8. Recommendations
|
|
|
|
### Security
|
|
1. **Enable Security Headers**: Add `X-Frame-Options`, `X-Content-Type-Options`, `Strict-Transport-Security`, `Content-Security-Policy`, `X-XSS-Protection`
|
|
2. **Disable GraphQL Introspection** in production (or restrict to admin roles)
|
|
3. **Implement API Rate Limiting** on GraphQL endpoint (currently unlimited)
|
|
4. **Upgrade JWT Algorithm** from HS256 to RS256 for better key management
|
|
5. **Fix Resource Counter**: `current_resources: -14` is a potential billing bug
|
|
|
|
### Platform
|
|
1. Consider adding custom domain support for apps
|
|
2. Add multi-region deployment options
|
|
3. Implement webhook notifications for deployment events
|
|
|
|
---
|
|
|
|
*Report generated by Ghaymah V2 Analysis Script*
|
|
*Date: 2026-10-22*
|