Skip to content

11 Security and Privacy

Vicky Patel edited this page Nov 18, 2026 · 1 revision

11. Security & Privacy Architecture

Zero-Persistence Guarantee, Ephemeral Credentials, and Cryptographic State Verification


πŸ›‘οΈ Security First Principles

Developer trust is the foundation of GitVerse. When analyzing private repositories, developers entrust the application with access to confidential intellectual property and commit histories.

GitVerse addresses this through Architectural Impossibility:

Rather than promising to keep your data safe in our database, we designed GitVerse so that we cannot store your data even if we wanted to.

graph TD
    User([User initiates Private Scan]) --> Auth[Ephemeral OAuth / PAT]
    Auth --> RAM[Volatile RAM Only]
    RAM --> Exec[Single-Pass Calculation Engine]
    Exec --> Report[Generated Report to Browser]
    Exec --> Revoke[Immediate GitHub Token Revocation API]
    Revoke --> Null[Memory Garbage Collected]
    style Null fill:#e11d48,stroke:#9f1239,color:#fff
Loading

πŸ”’ The Zero-Persistence Model

  1. Zero Databases: GitVerse possesses no SQL database, NoSQL cluster, Redis cache, or disk storage. There is no place for credentials or scan results to be persisted.
  2. Zero Persistent Logs: Serverless execution logs strictly sanitize and strip authorization headers, access tokens, and personal emails before stdout emits.
  3. Zero Tracking Cookies: The platform uses zero third-party tracking scripts, zero analytics cookies, and zero fingerprinting beacons.

πŸ”‘ Ephemeral Token Lifecycle

When a developer authenticates to inspect private repositories:

Step 1: Minimum Viable Scope

GitVerse requests the minimal permissions required to inspect commit and pull request metadata (repo read scope). It never requests write permissions, admin rights, or webhook access.

Step 2: In-Memory Execution

The OAuth token is exchanged on Vercel's serverless edge and held solely in Go process memory (*oauth2.Token). The engine executes the GraphQL milestone queries in a single execution pass.

Step 3: Instantaneous Token Revocation

The moment calculation completesβ€”and before the final HTTP response is serialized to the clientβ€”GitVerse calls GitHub's token revocation API:

POST /applications/{client_id}/grant HTTP/1.1
Host: api.github.com
Authorization: Basic {base64(client_id:client_secret)}
Content-Type: application/json

{
  "access_token": "gho_EphemeralTokenValue"
}

Upon receiving HTTP 204 No Content confirming the token is destroyed, the Go handler releases the variable to the Go runtime garbage collector. Even if our edge functions were somehow compromised seconds later, the token is already invalid.


πŸ” Cryptographic Anti-CSRF (state) Verification

To eliminate Cross-Site Request Forgery (CSRF) during the OAuth handshake, GitVerse generates a cryptographically signed state token:

  1. Payload: The state parameter embeds a timestamp and a cryptographically secure random nonce.
  2. Signature: Signed using HMAC-SHA256 with a server secret (STATE_SECRET): $$\text{Signature} = \text{HMAC-SHA256}(K_{\text{secret}}, \text{timestamp} \parallel \text{nonce})$$
  3. Verification: When GitHub redirects back to /auth/callback, the handler verifies the HMAC signature and asserts that the timestamp has not expired ($\le 300\text{ seconds}$). Mismatched or expired states are rejected immediately.

🚨 Vulnerability Reporting

If you discover a security vulnerability in GitVerse, please do not file a public issue. Review our Security Policy and report findings directly via confidential security advisory or email to vicky.patel.work@gmail.com.

Clone this wiki locally