OpenVScan
ProductDocsSelf-hosting
StarSign in
  • Documentation
  • Self-hosting

Self-hosting

  • Self-hosting guide
  • Register a GitHub App
  • Deploy to Cloudflare

Reference

  • Run sandboxes on Daytona
  • Configuration
  • Local development
  • Upgrading

Reference

Configuration

Every secret, variable and binding for the web and engine Workers.

Edit this page on GitHub
PreviousRun sandboxes on DaytonaNext Local development
OpenVScan

Open-source security review for GitHub pull requests. Scanners plus your own coding agent.

Product

  • How it works
  • Security
  • FAQ
  • Privacy

Developers

  • Documentation
  • Quickstart
  • Self-hosting
© 2026 OpenVScan · AGPL-3.0
Theme

Each Worker reads two kinds of settings. Secrets are set with Wrangler (wrangler secret put, wrangler secret bulk or wrangler deploy --secrets-file) and never appear in the repository. Variables live in the vars block of the Worker's wrangler.jsonc and are replaced on every deploy. For local development, both kinds go in the Worker's .dev.vars file. See Local development.

Web Worker secrets

The web Worker is openvscan-web, configured in web/wrangler.jsonc.

NameRequiredDescriptionExample
WORKOS_API_KEYYesThe secret API key of your WorkOS environment. The web Worker uses it to finish sign-in, refresh sessions, list and revoke sessions in Settings, and update or delete WorkOS users. Without it, or without WORKOS_CLIENT_ID, /api/auth/signin returns 503.sk_...
WORKOS_CLIENT_IDYesThe client ID of your WorkOS environment. It is not sensitive, but keep it a secret next to WORKOS_API_KEY: a var with the same name would clash with it.client_...
CREDENTIALS_KEYYesAES-256-GCM key. It seals the session cookie, linked GitHub account tokens and the agent credentials and Daytona keys users save in Settings. Must be 32 random bytes, base64-encoded, and identical to the engine's value.Output of openssl rand -base64 32
GITHUB_APP_IDYesThe GitHub App's numeric ID.123456
GITHUB_APP_PRIVATE_KEYYesThe App's private key in PEM format. Real newlines and escaped \n both work.Contents of the downloaded .pem file
GITHUB_APP_SLUGYesThe App's slug, used to build the install link https://github.com/apps/<slug>/installations/new. Without it, the dashboard shows no install button.openvscan-acme
GITHUB_WEBHOOK_SECRETYesThe App's webhook secret. Without it, every webhook delivery is rejected with 401.Output of openssl rand -hex 32
GITHUB_CLIENT_IDYesThe App's OAuth client ID. Users link their GitHub account through it.Iv23li...
GITHUB_CLIENT_SECRETYesThe App's OAuth client secret.Generated under Client secrets on the App
FREE_REVIEWS_PER_WEEKNoLimits each account to this many reviews per rolling 7 days (an account's own review_limit overrides it), counted over the repositories it connected. Reviews that run in a user's own Daytona account don't count. Leave it unset for no limit. See Review limit.5

Without GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET, users can sign in but cannot link GitHub, and connecting an installation needs a linked GitHub account. See Linking GitHub.

Web Worker variables

NameRequiredDescriptionExample
VITE_APP_URLYesThe public origin of the web Worker. In production, the sign-in and GitHub link redirect URIs, the sign-out return address and the MCP resource URL are built from it, so it must match what users type in the browser.https://openvscan.example.com
WORKOS_AUTHKIT_DOMAINFor MCPYour AuthKit domain. MCP clients sign in through it. When it is empty, /mcp returns 404 and Settings hides Connect your coding agent. See MCP server.your-app.authkit.app

VITE_APP_URL ships set to https://openvscan.com, and the WorkOS values ship empty. Change them before you deploy.

Sign in with WorkOS

Sign-in uses WorkOS user management. The sign-in, sign-up and password pages are OpenVScan's own, on your domain, and call the WorkOS API from the web Worker. WorkOS keeps the passwords, sends the verification codes and password reset emails, and enforces the password rules. OpenVScan stores no passwords and sends no email. Continue with GitHub goes straight to GitHub through WorkOS.

In the WorkOS dashboard, for the environment you deploy with:

  • Add https://openvscan.example.com/api/auth/callback as a redirect URI.
  • Set the default Sign-out URI to https://openvscan.example.com/. Without it, signing out ends on a WorkOS error page.
  • Set the Initiate login URI to https://openvscan.example.com/signin, for sign-ins that start outside the app.
  • Enable Email + Password. WorkOS always requires a verified email, for GitHub sign-in too: the first sign-in of an unverified address gets a 6-digit code by email, entered on the sign-in page. After that, the address counts as verified.
  • Set the Password reset URL to https://openvscan.example.com/reset-password. WorkOS's reset email links there with ?token=.
  • Optional: enable GitHub as a sign-in method. Configure the GitHub connection with this deployment's GitHub App client ID and secret, and turn on returning GitHub OAuth tokens. A user who then signs in with GitHub has their GitHub account linked at the same time. See Linking GitHub.

Email sign-in, sign-up, the verification code and password reset run on /signin, /signup, /forgot-password and /reset-password. GitHub sign-in goes through /api/auth/signin to WorkOS and GitHub, and returns to /api/auth/callback. The session is one httpOnly cookie, ovs_session, holding the WorkOS access and refresh tokens sealed with CREDENTIALS_KEY. Each request checks the access token against WorkOS's signing keys and refreshes it when it expires, so a session revoked in WorkOS stops working within minutes.

WorkOS's password API has no lockout, so the web Worker limits attempts with two rate limiting bindings in web/wrangler.jsonc: AUTH_IP_LIMITER (20 a minute per client IP) and AUTH_EMAIL_LIMITER (5 a minute per email address). Each namespace_id must be unique in your Cloudflare account. Without the bindings, the forms are not rate limited.

Each user's OpenVScan id is their WorkOS user id. Keep a deployment on one WorkOS environment: another environment has different user ids.

Review limit

A public deployment can cap how many reviews each account runs on its sandboxes. Set FREE_REVIEWS_PER_WEEK on the web Worker:

cd web && pnpm exec wrangler secret put FREE_REVIEWS_PER_WEEK

That's the default for every account. To give one account a different number, set its review_limit in D1 (its id is the WorkOS user id); empty uses the default:

cd web && pnpm exec wrangler d1 execute openvscan --remote \
  --command "UPDATE user SET review_limit = 20 WHERE email = 'someone@example.com'"

It applies from the next review, with no redeploy. Set it back to NULL to return the account to the default. An account's own number applies even when FREE_REVIEWS_PER_WEEK is unset.

A review counts when it starts: a pull request push, a @<app> review comment, a re-run or a branch review. Once an account reaches the limit, new pull request pushes get a neutral Weekly review limit reached check and nothing runs, and the dashboard says when the next review frees up. A run already in progress is never cancelled by a refused one.

Users lift the limit by saving their own Daytona API key in Settings → Review limit. Their reviews then run checkout and scanners in their Daytona organization. The engine copies the review image there as a snapshot, so the image must be public: see Your users' own Daytona keys.

Engine Worker secrets

The engine is openvscan-engine, configured in engine/wrangler.jsonc. The three required secrets are listed under secrets.required, and Wrangler refuses to deploy the engine without them.

NameRequiredDescriptionExample
DAYTONA_API_KEYNoA Daytona API key. When set, review sandboxes run on Daytona unless SANDBOX_PROVIDER says otherwise. See Run sandboxes on Daytona.dtn_…
CREDENTIALS_KEYYesThe same value as the web Worker's. The engine decrypts the repository owner's credential with it when an AI review starts.Output of openssl rand -base64 32
GITHUB_APP_IDYesThe GitHub App's numeric ID.123456
GITHUB_APP_PRIVATE_KEYYesThe App's private key in PEM format. The engine uses it to create check runs, post reviews and comments, and mint read-only clone tokens.Contents of the downloaded .pem file

Engine Worker variables

NameDefaultDescription
APP_URLhttps://openvscan.comPublic origin of the web Worker. The engine builds the check run's "details" link and the links in failure messages from it. Set it to your origin.
SANDBOX_INSTANCEstandard-2Container instance type for review sandboxes. See Instance types below.
DEV_ROUTESfalseEnables the /__dev/* smoke-test routes. Keep it false in production.
SANDBOX_PROVIDERemptycloudflare or daytona. Empty uses Daytona when DAYTONA_API_KEY is set and Cloudflare otherwise.
DAYTONA_MODEhybridhybrid runs scanners on Daytona and the AI review on Cloudflare. full runs everything on Daytona and needs a Tier 3 or 4 Daytona organization.
DAYTONA_SNAPSHOTopenvscan-sandboxThe Daytona snapshot sandboxes start from, built by engine/scripts/daytona-snapshot.sh.
DAYTONA_API_URLhttps://app.daytona.io/apiDaytona's API, for self-hosted Daytona.
DAYTONA_TARGETemptyDaytona region, such as us or eu. Empty uses your organization's default.
USER_SANDBOX_IMAGEset by the deploy scriptThe public review image that users' own Daytona organizations pull, such as ghcr.io/<owner>/openvscan-sandbox:<tag>. pnpm run deploy sets it from engine/scripts/deploy.sh. Only needed with FREE_REVIEWS_PER_WEEK. See Your users' own Daytona keys.

Never enable DEV_ROUTES in production

When DEV_ROUTES is "true", anyone who can reach the engine's public URL can start sandbox containers, clone public repositories and run agents through /__dev/scan and /__dev/agent. These routes have no authentication. They exist for local testing only.

Instance types

SANDBOX_INSTANCE accepts the Cloudflare Containers instance types:

  • lite
  • basic
  • standard-1
  • standard-2 (default)
  • standard-3
  • standard-4

SANDBOX_INSTANCE applies to Cloudflare containers only; size Daytona sandboxes when you build the snapshot. Each run gets its own container, and the whole run (clone, scanners and agent) happens on it. Larger types cost more per second of runtime. Smaller types lower cost but leave less memory and CPU for the scanners and the agent on large repositories. Start with the default and adjust based on run times and failures you see in the dashboard. Cloudflare's Containers documentation lists the vCPU, memory and disk of each type.

Bindings

These are declared in the wrangler.jsonc files. You normally only change the D1 database_id.

BindingWorkerTypeTarget
DBBothD1 databaseopenvscan
ARTIFACTSBothR2 bucketopenvscan-artifacts
ENGINEWebService bindingWorker openvscan-engine, entrypoint EngineApi
REVIEW_WORKFLOWEngineWorkflowopenvscan-review, class ReviewWorkflow
SANDBOXEngineDurable ObjectScanSandbox, backed by the container image built from engine/container/Dockerfile

Some names are referenced outside the binding itself. Keep them unless you change every reference:

  • The db:migrate and db:migrate:local scripts in the root package.json apply migrations to a database named openvscan.
  • The web Worker's ENGINE binding targets the Worker named openvscan-engine.

Container image build arguments

engine/container/Dockerfile pins the tool versions with build arguments: OPENGREP_VERSION, OSV_SCANNER_VERSION, GITLEAKS_VERSION, TRIVY_VERSION, ZIZMOR_VERSION, POUTINE_VERSION, CLAUDE_CODE_VERSION, CODEX_VERSION, CURSOR_AGENT_VERSION and SANDBOX_VERSION. Each downloaded binary also has *_SHA256_AMD64 and *_SHA256_ARM64 arguments (Spectral is installed from npm with npm ci, pinned by engine/container/spectral/package-lock.json), and the build fails if a download doesn't match. OPENGREP_RULES_COMMIT, GITLAB_RULES_COMMIT, TRAILOFBITS_RULES_COMMIT, OXDEA_RULES_COMMIT and MOBSFSCAN_RULES_COMMIT pin the OpenGrep rule packs; see Scanners.

Change them by editing the defaults in the Dockerfile, and change them deliberately. Keep SANDBOX_VERSION in step with the @cloudflare/sandbox version in engine/package.json. The scanner output parsers in engine/src/scanners depend on each tool's flags and output format.