Security & Trust
Exactly what Pharaoh accesses, stores, and protects.
WHAT PHARAOH ACCESSES
Read-Only Repository Access
Pharaoh cannot push commits, modify files, create branches, or open pull requests. The GitHub App requests two permissions: repository contents (read) and metadata (read). Webhook events on the default branch trigger re-mapping. No write access exists. Verify your permissions on GitHub →
Access Tied to Your GitHub Org
Your GitHub org membership is your Pharaoh access. Remove someone from your org, their access revokes within minutes. Org membership is re-verified on every token refresh. No API tokens to rotate, no credentials on developer machines, no .env files to manage.
WHAT PHARAOH STORES
The Knowledge Graph
Function names, file paths, import/export relationships, call chains, complexity scores, module boundaries. Structural metadata - how your code is organized, not what it does.
Sensitive properties - function signatures, documentation strings, and API route patterns - are encrypted with per-tenant keys (AES-256-GCM, HKDF key derivation). Opaque ciphertext in the database, readable only through the owning tenant's derived key.
Source code is read during parsing, used to build the graph in memory, then discarded. The graph is a table of contents, not the book.
Sensitive properties - function signatures, documentation strings, and API route patterns - are encrypted with per-tenant keys (AES-256-GCM, HKDF key derivation). Opaque ciphertext in the database, readable only through the owning tenant's derived key.
Source code is read during parsing, used to build the graph in memory, then discarded. The graph is a table of contents, not the book.
What Is NOT in the Graph
- Source code or file contents
- Variable values, string literals, or implementation logic
- Secrets, environment variable values, or credentials
- Git history or commit messages
- Pull request content or issue content
GitHub API
read-only clone
→
Parser
in-memory only
→
Graph DB
metadata only
→
MCP Tools
query interface
→
Your AI
Claude, Cursor, etc.
Source code never persists. Read, parsed into structural metadata, discarded.
HOW DATA IS PROTECTED
Tenant Isolation
Two independent layers. First: every graph query starts from your repositories - structurally impossible to traverse into another tenant's data (Cypher repo-anchoring). Second: before any query runs, Pharaoh verifies your repository ownership against a separate database (Postgres ownership check). Both layers must fail simultaneously for cross-tenant access. CI enforces this - every new query is automatically tested for isolation violations.
Encryption
GitHub tokens: Encrypted at rest with AES-256-GCM and per-tenant derived keys (HKDF). Unique random initialization vector per token. Compromising one tenant does not expose others.
Graph properties: Function signatures, documentation strings, and API route patterns - encrypted per-tenant (AES-256-GCM). Opaque ciphertext in the database, readable only through the owning tenant's key.
In transit: TLS on all connections. The server refuses to start without an encryption key configured.
Graph properties: Function signatures, documentation strings, and API route patterns - encrypted per-tenant (AES-256-GCM). Opaque ciphertext in the database, readable only through the owning tenant's key.
In transit: TLS on all connections. The server refuses to start without an encryption key configured.
Rate Limiting
Each tenant has independent rate limits (100 requests per minute, sliding window). One tenant's usage cannot affect another.
Infrastructure
Render (application hosting), Neo4j Aura (graph database), PostgreSQL on Render (operational data), Stripe (billing - card numbers never touch our servers), GitHub (authentication and repository access). All providers enforce encryption at rest and in transit.
Account Deletion
Uninstall the GitHub App or delete your account - knowledge graph gone, tenant data gone, encrypted tokens destroyed. Audit logs retained 90 days, then purged. No lock-in. Reconnecting re-maps from scratch.
IF PHARAOH GETS BREACHED
Exposed: Function names, file paths, module boundaries, dependency relationships, complexity scores. Structural metadata - how code is organized, not what it does.
Protected: Source code (never stored). GitHub tokens (encrypted per-tenant - one compromised tenant does not expose others). Function signatures, documentation strings, and API routes (encrypted with per-tenant derived keys). Cross-tenant data (query-level isolation prevents lateral movement).
Your action required: None. Pharaoh remediates server-side. No packages to update, no credentials to rotate, no patches to apply.
Protected: Source code (never stored). GitHub tokens (encrypted per-tenant - one compromised tenant does not expose others). Function signatures, documentation strings, and API routes (encrypted with per-tenant derived keys). Cross-tenant data (query-level isolation prevents lateral movement).
Your action required: None. Pharaoh remediates server-side. No packages to update, no credentials to rotate, no patches to apply.
Common Questions
Does Pharaoh store my source code?
No. Source code is read during mapping, used to generate a structural graph in memory, then discarded. The graph stores function names, relationships, and module boundaries. Sensitive properties (signatures, docs, routes) are encrypted per-tenant.
Can Pharaoh write to my repository?
No. Read-only permissions only. Cannot push commits, modify files, create branches, or open pull requests. Verify this yourself on GitHub.
What happens when someone leaves the org?
Remove them from your GitHub org. Pharaoh access revokes within minutes. Org membership is re-verified on every token refresh. No tokens to rotate, no accounts to deactivate.
Who can see my data?
Members of your GitHub organization who authenticate through Pharaoh's OAuth flow. No one else. Tenant isolation is enforced at the query level - no API call, admin interface, or backdoor surfaces one tenant's data to another.
What happens when I disconnect?
Knowledge graph deleted. Tenant record and encrypted tokens removed. Reconnecting re-maps from scratch.