Skip to content

Variables and secrets

Add settings under Settings → Secrets and variables → Actions in the caller repository, or use organization settings scoped to the caller. Use variables for IDs, switches, and the inference document, and secrets for keys and tokens. Keep the App private key, provider keys, and deployment credentials out of workflows, examples, JSON, and test data.

Kind Name Jobs
Variable CODEHAWK_APP_ID Self-hosted opt-in only, passed as the app_id workflow input with your own key.
Secret CODEHAWK_PRIVATE_KEY Self-hosted opt-in only. The hosted App needs no caller key or App ID.
Workflow input token_worker_url Empty for the hosted Worker, or another HTTPS token Worker base URL.
Variable CODEHAWK_INFERENCE PR review/reply, weekly review (including dry run), fix generation, and browser flows. Deprecated caller inference document, optional for one release. Overrides file routes while nonempty.
Secret CODEHAWK_CREDENTIAL_1 … _8 The same model jobs. Add only the slots selected by your settings or legacy inference document. Never pass them to fix publication or the scan.

Install the CodeHawk App and grant id-token: write to token-minting jobs and reusable workflow callers. See your own App for the optional app_id and CODEHAWK_PRIVATE_KEY pair.

Forward each used slot by name. Reusable workflows take them as named secrets. Composite actions take them as credential-1 … credential-8 inputs. Conventional names such as OPENAI_API_KEY are not read.

GITHUB_TOKEN in a composite action comes from its github-token input, not a repository secret you need to create. See job permissions for which token to pass.

Job Example caller variables
PR scan No switch, inference document, or credential. Use review_drafts and runs_on as workflow inputs.
PR review/reply PR_REVIEW_ENABLED=true, optional REVIEW_PR_MAX_USD for PR review only.
Weekly review WEEKLY_REVIEW_ENABLED=true, optional REVIEW_WEEKLY_MAX_USD and REVIEW_WEEKLY_CONTEXT_TOKENS.
Verified fixes FIX_ISSUES_ENABLED=true, optional FIX_ISSUES_MAX_USD passed in the composite steps' environment. Provide a trusted digest-pinned test image and configure fix_issues.test_commands before enabling the workflow.
Browser flows The caller's opt-in PR label, a trusted digest-pinned application image and startup command, CODEHAWK_S3_ENDPOINT and CODEHAWK_S3_BUCKET as variables, CODEHAWK_S3_ACCESS_KEY_ID and CODEHAWK_S3_SECRET_ACCESS_KEY as secrets, and optionally CODEHAWK_S3_REGION (default auto). Map them to the action inputs.

Models, reasoning settings, fallbacks and optional caps are chosen in .github/codehawk.json on the default branch. Forward the standard provider secrets used by those routes: CODEHAWK_OPENAI_API_KEY, CODEHAWK_ANTHROPIC_API_KEY, CODEHAWK_GOOGLE_API_KEY or CODEHAWK_GATEWAY_TOKEN. An explicit credential selects a numbered slot instead. The optional deprecated inference input overrides file routes for one release.

The *_ENABLED switches in the examples are caller-side if conditions. Setting them by itself does not install a workflow. Browser fixtures must use only seeded users and a throwaway database. There is no user login or database setting for the product site.