MyClaude Docs
MyClaude Docs

Getting Started

Buyers

Creators

CLI

API

Agent Integration

Developers

Security

Security ModelCreator Security GuideContent ReportingVulnerability DisclosureTrust & Safety

Legal

Security

Security Model

How MyClaude protects user accounts, product files, payment data, and marketplace integrity through layered security controls.

Explanation

MyClaude protects users through 6 security layers: Firebase Auth with JWT tokens, Firestore security rules blocking direct client writes to sensitive fields, signed URLs for paid file downloads (5-minute expiry), CSRF middleware on all mutations, automated content scanning with 22 malicious pattern detectors, and rate limiting on all API mutation routes. No single control protects everything — a bug in one layer cannot bypass the others.

Authentication

Every user session is backed by Firebase Authentication. When you log in, Firebase issues a JWT (JSON Web Token) that is valid for 1 hour and automatically refreshed client-side.

MechanismDetail
ProviderFirebase Auth (email/password, Google OAuth)
Token typeFirebase ID Token (JWT, RS256 signed)
Token expiry1 hour, auto-refreshed by Firebase SDK
Token deliveryAuthorization: Bearer {token} on every API request

Unauthenticated users can browse public product listings. Any action that writes data — purchasing, publishing, downloading a paid file — requires a valid token.

Authorization

MyClaude uses a dual Firebase SDK architecture. The server-side Admin SDK handles all privileged operations; the client-side SDK is scoped to public reads and authenticated user operations.

ContextSDKRole
Next.js Server Components (SSR)Firebase AdminRead product/user data server-side
API Routes (mutations)Firebase AdminVerify tokens, write orders, generate signed URLs
Browser (client components)Firebase Client SDKAuth state, public reads, user profile updates

Every API route that performs a mutation follows this verification sequence:

  1. Extract Authorization: Bearer {token} from request headers
  2. Call admin.auth().verifyIdToken(token) — rejects expired or tampered tokens
  3. Use the decoded UID to confirm the caller is authorized for the requested resource
  4. Return 401 Unauthorized if the token is missing, expired, or invalid

Data Protection

Firestore security rules enforce ownership at the database layer, independent of application logic. This means a bug in application code cannot grant a user access to another user's private data.

CollectionRead ruleWrite rule
productsPublic (published products)Owner only
usersPublic (profile data)Owner only
ordersOwner onlyWebhook only (Admin SDK)
reviewsPublicAuthenticated buyers only

Sensitive fields — such as raw Stripe account identifiers and internal file storage paths — are never included in client-facing API responses.

File Storage

Product files for paid products are never exposed directly to the browser. File URLs in Firestore are admin-only fields.

The download flow:

User clicks Download
  → POST /api/products/download (with auth token)
  → API verifies token
  → For paid products: confirms purchase order exists for this user + product
  → For free products: allows immediately
  → Generates a signed URL (5-minute expiry, single-use intent)
  → Returns URL → Client opens in new tab
ControlValue
Direct file URL exposureNever — fileUrl field is server-only
Signed URL expiry5 minutes
Storage bucket read rulesallow read: if false (signed URLs bypass this)
Paid product accessOrder existence verified before URL generation

Content Scanning

Every product submitted via myclaude publish passes through the CONDUIT pipeline before appearing on the marketplace. The pipeline runs myclaude scan against the product bundle.

CheckWhat it detects
Secrets scanAPI keys, tokens, credentials, private keys
Malicious patternsShell injection, network exfiltration patterns
Prohibited contentContent policy violations (see Content Policy)
Manifest validationRequired vault.yaml fields, version format, category validity

Products that fail any scan are rejected before listing. Creators receive a specific error message identifying the violation.

Payment Security

Payments are processed entirely by Stripe. MyClaude never handles raw card data.

ControlDetail
Payment processorStripe (PCI DSS Level 1 certified)
Creator payoutsStripe Connect Express — MyClaude never holds creator funds
Order creationServer-side only, triggered by Stripe webhook
Webhook verificationstripe.webhooks.constructEvent validates every webhook signature
Platform fee8% retained via Stripe Connect application fee

Orders are created exclusively by the Stripe webhook handler. There is no client-side code path that can create an order. A buyer purchasing a product through any means other than Stripe checkout will not receive a valid order record, and will be denied file access.

Rate Limiting

All mutation API routes are protected by server-side rate limiting to prevent abuse.

Endpoint categoryLimit
Auth-required mutations60 requests / minute per user
Stripe checkout initiation10 requests / minute per user
File download20 requests / minute per user

Related pages

  • Vulnerability Disclosure — how to report security issues
  • Trust & Safety — content enforcement and marketplace integrity
  • Content Policy — prohibited content rules

Admin Panel

Reference for the MyClaude admin panel: role-based access, report management, product quarantine, user moderation, API routes, and audit logging.

Creator Security Guide

Security best practices for MyClaude product creators: protecting your accounts, passing content scans, designing secure products, and responding to reports.

On this page

AuthenticationAuthorizationData ProtectionFile StorageContent ScanningPayment SecurityRate LimitingRelated pages