Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.corgea.app/llms.txt

Use this file to discover all available pages before exploring further.

The Harness Code integration with Corgea lets you scan repositories hosted in Harness Code, receive automated security reviews on every pull request, and create pull requests for code fixes directly from the Corgea platform.
Corgea integrates with Harness Code (the Git-based SCM inside the Harness platform). It does not require — and is independent of — Harness CI/CD pipelines.
1

Open your Harness profile

Sign in to Harness, then click your username at the bottom-left of the navigation bar and choose Profile Overview.
Open Harness profile
2

Create a new API key

Scroll down to the My API Keys section of your profile and click + API Key to create a new key.
Create a new Harness API key
For production setups we recommend creating a dedicated Service Account in Harness (Account Settings → Access Control → Service Accounts) and generating the API key under that account. This keeps Corgea’s actions clearly attributable and lets you rotate credentials without affecting any individual user.
3

Name your API key

Give the key a descriptive name such as corgea-integration, then click Save.
Name the Harness API key
4

Add a token to the API key

The API key itself does not authenticate requests — you need to generate a token under it. Expand the API key you just created and click + Token.
Add a token to the Harness API key
5

Generate the token

Give the token a name (for example corgea-token) and an expiration date, then click Generate Token.
Harness only displays the token value once. Make sure you copy it before closing the dialog — you will not be able to retrieve it later.
Generate the Harness token
6

Copy the token

Copy the generated token to your clipboard, then close the dialog. Harness tokens follow the format pat.<accountId>.<tokenId>.<secret> — Corgea automatically derives your account ID from the token, so you don’t need to provide it separately.
Copy the generated Harness token
7

Open the Corgea integrations page

Sign in to Corgea at corgea.app (or {your-instance}.corgea.app for self-hosted deployments) and open the Integrations page from the sidebar. In the Code Repository Integrations section, click the + button next to Harness.
Open the Corgea integrations page
8

Add the integration

Paste the token you copied from Harness into the API Token field.By default Corgea discovers repositories across every Harness organization the token can see. If you want to limit which orgs Corgea looks at, enter a comma-separated list of org identifiers in the Org allowlist field (for example default,my-other-org). Leave it blank to allow all orgs.
Add Harness integration in Corgea
9

Optional settings

Expand Optional settings if you need to adjust any of the defaults:
  • Name — a friendly label for the integration. Useful when connecting multiple Harness accounts.
  • Base URL — defaults to https://app.harness.io for Harness SaaS. Override this if you are connecting to a self-hosted Harness installation.
  • Gateway prefix — defaults to /gateway (the SaaS prefix). Some self-hosted deployments drop this prefix; in that case clear the field.
When you’re done, click Connect.
Optional Harness integration settings
Corgea validates your token immediately. On success the integration card will show your Harness account name and you can start binding repositories from the Projects page — Harness repos appear with the H icon and a <org>/<project>/<repo> label.

How it works

  • Repository discovery — Corgea calls the Harness Code API to list every repository under the orgs/projects your token can access (filtered by the allowlist if you set one). New repositories show up automatically; you can force a refresh from the Projects page.
  • Pull request scans — when you bind a Corgea project to a Harness repo, Corgea registers a per-repo webhook on Harness Code. Subsequent PR opens, reopens, and pushes trigger an incremental scan and post the results as inline review comments on the diff. Corgea also writes a commit status check (corgea-security-scan) so PR rules can require it before merging.
  • Apply fixes as PRs — from any Corgea-detected issue you can click Create Pull Request to have Corgea push the fix to a new Harness branch and open a PR back into the issue’s source branch.
  • Corgea Agent — replies to Corgea’s PR comments are routed through the Corgea Agent (when enabled for your company), which can mark issues as false positives, assign them, or answer follow-up questions, threaded under the original review comment.

Permissions

The user (or service account) that owns the API key must have at least the Code Repository Viewer role on every project you want Corgea to read. To enable PR comments, status checks, and PR creation, grant Code Repository Admin (or an equivalent custom role with create/comment/status permissions). See the Harness RBAC documentation for details.

Supported Harness deployments

DeploymentSupportedNotes
Harness SaaS (app.harness.io)Works out of the box with the defaults.
Harness Self-Managed EnterpriseOverride Base URL and, if needed, clear the Gateway prefix field.