Reference
Configuration
Every secret, variable and binding for the web and engine Workers.
Reference
Every secret, variable and binding for the web and engine Workers.
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.
The web Worker is openvscan-web, configured in web/wrangler.jsonc.
| Name | Required | Description | Example |
|---|---|---|---|
WORKOS_API_KEY | Yes | The 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_ID | Yes | The 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_KEY | Yes | AES-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_ID | Yes | The GitHub App's numeric ID. | 123456 |
GITHUB_APP_PRIVATE_KEY | Yes | The App's private key in PEM format. Real newlines and escaped \n both work. | Contents of the downloaded .pem file |
GITHUB_APP_SLUG | Yes | The 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_SECRET | Yes | The App's webhook secret. Without it, every webhook delivery is rejected with 401. | Output of openssl rand -hex 32 |
GITHUB_CLIENT_ID | Yes | The App's OAuth client ID. Users link their GitHub account through it. | Iv23li... |
GITHUB_CLIENT_SECRET | Yes | The App's OAuth client secret. | Generated under Client secrets on the App |
FREE_REVIEWS_PER_WEEK | No | Limits 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.
| Name | Required | Description | Example |
|---|---|---|---|
VITE_APP_URL | Yes | The 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_DOMAIN | For MCP | Your 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 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:
https://openvscan.example.com/api/auth/callback as a redirect URI.https://openvscan.example.com/. Without it, signing out ends on a WorkOS error page.https://openvscan.example.com/signin, for sign-ins that start outside the app.https://openvscan.example.com/reset-password. WorkOS's reset email links there with ?token=.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.
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_WEEKThat'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.
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.
| Name | Required | Description | Example |
|---|---|---|---|
DAYTONA_API_KEY | No | A Daytona API key. When set, review sandboxes run on Daytona unless SANDBOX_PROVIDER says otherwise. See Run sandboxes on Daytona. | dtn_… |
CREDENTIALS_KEY | Yes | The 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_ID | Yes | The GitHub App's numeric ID. | 123456 |
GITHUB_APP_PRIVATE_KEY | Yes | The 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 |
| Name | Default | Description |
|---|---|---|
APP_URL | https://openvscan.com | Public 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_INSTANCE | standard-2 | Container instance type for review sandboxes. See Instance types below. |
DEV_ROUTES | false | Enables the /__dev/* smoke-test routes. Keep it false in production. |
SANDBOX_PROVIDER | empty | cloudflare or daytona. Empty uses Daytona when DAYTONA_API_KEY is set and Cloudflare otherwise. |
DAYTONA_MODE | hybrid | hybrid 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_SNAPSHOT | openvscan-sandbox | The Daytona snapshot sandboxes start from, built by engine/scripts/daytona-snapshot.sh. |
DAYTONA_API_URL | https://app.daytona.io/api | Daytona's API, for self-hosted Daytona. |
DAYTONA_TARGET | empty | Daytona region, such as us or eu. Empty uses your organization's default. |
USER_SANDBOX_IMAGE | set by the deploy script | The 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. |
SANDBOX_INSTANCE accepts the Cloudflare Containers instance types:
litebasicstandard-1standard-2 (default)standard-3standard-4SANDBOX_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.
These are declared in the wrangler.jsonc files. You normally only change the D1 database_id.
| Binding | Worker | Type | Target |
|---|---|---|---|
DB | Both | D1 database | openvscan |
ARTIFACTS | Both | R2 bucket | openvscan-artifacts |
ENGINE | Web | Service binding | Worker openvscan-engine, entrypoint EngineApi |
REVIEW_WORKFLOW | Engine | Workflow | openvscan-review, class ReviewWorkflow |
SANDBOX | Engine | Durable Object | ScanSandbox, 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:
db:migrate and db:migrate:local scripts in the root package.json apply migrations to a database named openvscan.ENGINE binding targets the Worker named openvscan-engine.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.