Security & Trust
Exactly what Pharaoh accesses, stores, and protects.
WHAT PHARAOH ACCESSES
No Write Access to Your Code
Pharaoh cannot push commits, modify files, create branches, or open pull requests. The GitHub App reads repository contents, metadata, pull requests, and organization membership. It posts check results on commits, like the reminder to finish setup, and never touches your code. Pushes to the default branch trigger re-mapping. 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, the first line of doc comments, API route paths, and constant values - 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.
Each mapping run clones your code into a temporary directory and deletes it when the run ends, even if the run crashes. Nothing is kept between runs. The graph is a table of contents, not the book.
Sensitive properties - function signatures, the first line of doc comments, API route paths, and constant values - 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.
Each mapping run clones your code into a temporary directory and deletes it when the run ends, even if the run crashes. Nothing is kept between runs. The graph is a table of contents, not the book.
What Is NOT in the Graph
- Source code or file contents
- Function bodies, or comments beyond the first line of a doc comment
- Environment variable values (only their names)
- Commit messages, authors, or diffs
- Pull request content or issue content
GitHub API
read-only clone
→
Parser
temporary clone
→
Graph DB
metadata only
→
MCP Tools
query interface
→
Your AI
Claude, Cursor, etc.
Source code never persists. Cloned for one run, parsed into structural metadata, deleted when the run ends.
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 - within 30 days, 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, environment variable names, cron schedules, database table names. 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, doc comments, API routes, and constant values (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, doc comments, API routes, and constant values (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. Each mapping run clones your code into a temporary directory and deletes it when the run ends. The graph stores function names, relationships, and module boundaries. Sensitive properties (signatures, doc comments, routes, constant values) are encrypted per-tenant.
Can Pharaoh write to my repository?
No. Pharaoh can't push commits, modify files, create branches, or open pull requests. It posts check results on commits and never touches your code. 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?
Within 30 days: knowledge graph deleted, tenant record and encrypted tokens removed. Reinstall before then and your account and graphs come back. After that, reconnecting re-maps from scratch.