Technical architecture and boundaries

CodeKeep security model.

CodeKeep is designed around defense-in-depth: short-lived credentials, deterministic sandbox resource ceilings, strict database row-level security, and absolute human merge authority. This document describes our technical architecture and answers the eight core threat model questions.

01 / GitHub App permissions

What GitHub permissions does CodeKeep request, and why?

CodeKeep installs as a scoped GitHub App, strictly decoupling user authentication (via Supabase GitHub OAuth) from repository authorization. CodeKeep never uses user OAuth tokens to touch repositories.

  • Repository contents (read-only): required to perform shallow clones (--depth=1) of the repository for manifest discovery, AST analysis, and isolated container testing.
  • Pull requests (read and write): required to push remediated branches and open pull requests with detailed test execution evidence.
  • Metadata (read-only): standard GitHub API scope to list accessible repositories.
  • Never requested: organization administration, repository secrets, member administration, workflow approval, or force-push permissions.

02 / Repository code storage

Are repository contents stored, and for how long?

CodeKeep does not permanently store your repository source code.

During a scan or remediation run, a shallow clone is checked out directly into an ephemeral scratch workspace (/workspace inside the container or a temporary directory on the runner).

Once manifest parsing, AST inspection, and sandbox test execution finish, the entire temporary workspace is wiped in a guaranteed finally block. Only structured metadata (dependency names, versions, CVE IDs, and test execution output logs) is persisted to PostgreSQL for display in your dashboard.

03 / Token lifecycle

Where are tokens held, and when do they expire?

CodeKeep holds its GitHub App private key in secure runner memory. When an action is queued:

  1. The backend generates an in-memory RS256 JWT valid for 10 minutes.
  2. The backend requests a short-lived GitHub App installation access token scoped specifically to the target repository.
  3. The installation token is passed in memory to the git clone operation via http.extraheader.

Installation tokens are never written to database tables or committed to disk logs. By GitHub protocol, they expire automatically after 60 minutes if not already terminated.

04 / Sandbox network controls

Can remediation code access the network?

Remediation occurs inside isolated container runtimes or Modal serverless sandboxes.

During the dependency upgrade phase, network access is permitted solely to fetch declared packages from official ecosystem registries (for example, registry.npmjs.org, proxy.golang.org, pypi.org, crates.io). Test suites run with restricted ingress. No internal network interfaces, databases, or host metadata endpoints are reachable from inside the container.

05 / Resource ceilings

What CPU, memory, filesystem, and time limits apply?

To prevent runaway processes or malicious test suite loops, every runner operates under strict invariant guards:

Max 4 vCPU
CPU core limit
Max 4 GiB
RAM ceiling
10 minutes
Hard timeout
Read-only OS
Ephemeral /tmp

06 / Multi-tenant isolation

How are tenant boundaries enforced?

Tenant separation is enforced at multiple architectural layers:

  • Database engine: Supabase PostgreSQL enforces row-level security on all user-facing tables. Every query is constrained by auth.uid() = user_id. Child tables derive ownership through repository foreign keys.
  • API boundary: all FastAPI endpoints require verified JWT claims from Supabase GoTrue. Cross-tenant reads and mutations return immediate 401 or 404 rejections.
  • Execution sandboxes: sandboxes run in isolated container runtimes with distinct network namespaces and root filesystems. No container shares state with another.

07 / Revocation and deletion

How can a user revoke access and purge their data?

You retain full control over CodeKeep access at all times:

  • Instant access revocation: you can uninstall or suspend the CodeKeep GitHub App at any moment in your GitHub settings (Settings → Applications → Installed GitHub Apps). GitHub immediately invalidates all active installation tokens.
  • Metadata purge: deleting a repository from the CodeKeep dashboard immediately cascades and deletes all associated project metadata, dependency records, vulnerability findings, and log snapshots from PostgreSQL.

08 / Vulnerability reporting

How can someone report a security vulnerability?

We take security reports with the highest urgency. If you discover a security vulnerability in CodeKeep:

Direct email: [email protected]
Founder: Jeeva. Response SLA: under 48 hours.

Please include reproduction steps, the impacted component, and proof-of-concept details. We ask for coordinated disclosure and will acknowledge receipt within 48 hours.