# Apex application security documentation Source: https://docs.cantina.security/apex Set up Apex to scan repositories and pull requests for exploitable vulnerabilities, verify findings, and run scans through the app, CLI, or API. Apex is Cantina's agentic application security engineer. It reviews repositories and pull requests for exploitable vulnerabilities, produces findings with evidence and remediation guidance, and verifies whether fixes hold. ## How the docs are organized The Apex docs are organized around the workflow most teams follow: connect code, define the workspace, scope the scan, and then run or automate the scan from the app or CLI. Use this page as the entry point when you are deciding which guide belongs to the next step in setup or scan planning. > **Key idea** > Start with onboarding when access is not configured yet. Start with the scan manual when a workspace already exists and the main decision is scope. ## Guides * **[Start here - Client onboarding](/apex/onboarding):** Connect GitHub or GitLab, choose repositories, and send the context Apex needs before the first scan. * **[Run scans - Apex scan manual](/apex/scan-manual):** Scope a scan, choose when to run it, explain the threat model, and split larger repos into useful review units. * **[Automate scans - Scheduled scans](/apex/scheduled-scans):** Turn on recurring auto-scans of a workspace, choose a daily or weekly cadence, and keep monitoring without manual runs. * **[Reference - Apex CLI guide](/apex/cli):** Install the CLI, wire Apex into Claude Code, Codex CLI, or GitHub Copilot CLI, and drive scan workflows from the terminal. * **[Reference - Apex service API](/apex/api):** Create an organization service key, trigger scans from a headless worker, poll their status, and retrieve GitLab SAST findings. ## Scan workflow Apex works best when the workspace reflects a real security surface, not a loose collection of unrelated directories. The path below keeps access, scope, and context aligned before the scan starts. * Connect a code host or use the CLI from the repository you want to scan. * Create a workspace and choose the repositories, branches, pull requests, or commits in scope. * Add private docs, architecture notes, API specs, and threat model details that are not obvious from the code. * Run the scan after the scope and context describe one coherent system. * Use the CLI or workspace UI to track progress, read findings, and export results. > **Before the first scan** > Make sure the person approving repository access and the person deciding scan scope agree on the same repos, refs, and supporting materials. ## Reference The CLI guide is the canonical reference for local and agent-driven workflows. The service API guide covers static-token, headless HTTP integrations for serverless workers and audit hubs. * Read [client onboarding](/apex/onboarding) if you are setting up a workspace for the first time. * Read the [scan manual](/apex/scan-manual) before spending a scan entitlement or splitting a large repo. * Use the [CLI guide](/apex/cli) when you want Apex available directly inside developer and agent workflows. * Use the [service API](/apex/api) when a serverless function, cron job, or internal audit hub needs static-token HTTP access. For a product-level explanation of what Apex finds and how it fits into Cantina, see the [Apex application security overview](https://www.cantina.security/apex). # Apex service API Source: https://docs.cantina.security/apex/api Run Apex from serverless functions, CI, and internal audit hubs with an organization service key and a REST/JSON workflow. * **Read:** 12 min * **Updated:** August 17, 2026 * **Audience:** Platform engineers ## § 01 Choose the right integration Use Apex CLI or MCP when a person or coding agent is working interactively in a repository. Use the service API when a headless process needs HTTP, JSON, and a static organization credential. | Surface | Intended use | Authentication | | - | - | - | | CLI + MCP | Developers and coding agents | Device login | | Service API | CI, serverless workers, cron jobs, and internal audit hubs | Organization service key | Set the service key as `APEX_SERVICE_KEY` and send it as `Authorization: Bearer ...` or `X-API-Key`. The CLI does not consume this variable and `apex login` does not accept service keys. `APEX_API_KEY` is a legacy integration name; rename it to `APEX_SERVICE_KEY` when adopting these examples. The machine-readable contract is available at [`/api/apex/v1/openapi.json`](https://ai.cantina.xyz/api/apex/v1/openapi.json). ## § 02 Prerequisites * Generate a service key with the smallest required scopes: `scans:create`, `scans:read`, and `findings:read`. * Store the key in a secret manager. Apex displays the raw secret once and stores only its hash. * For a remote scan, connect the GitHub repository to the organization that owns the key. The first API scan can create and link its workspace automatically. * For a remote scan, send a full 40- or 64-character commit SHA. Branch names and moving refs are not accepted. * For a local or non-Git directory, create a `tar.gz` archive and use the source upload flow. No Git remote or website scan is required. GitLab service-account access is not yet supported by the version-one remote repository flow. Use a local archive for source that Apex cannot materialize through an organization GitHub connection. ## § 03 Generate a service key Organization managers and Apex administrators can generate a key from **Company Settings → Service API keys**. Copy the one-time secret directly into a secret manager. You can also create one from your own authenticated terminal: ```bash theme={null} apex update apex login # Read existing scans and findings only apex service-key create \ --name "Audit hub" \ --scope scans:read,findings:read \ --expires-at "" # Add scans:create for an integration that starts or cancels scans apex service-key create \ --name "Audit hub" \ --scope scans:create,scans:read,findings:read \ --expires-at "" ``` The commands above use device login only to let an authorized person create the service key. The resulting service key is for REST requests, not later CLI authentication. List metadata or revoke a key without exposing its secret: ```bash theme={null} apex service-key list apex service-key revoke ``` ## § 04 Check credit balances Use the service key to read the current balances for its organization before offering scan choices: ```bash theme={null} curl --header "Authorization: Bearer $APEX_SERVICE_KEY" \ https://ai.cantina.xyz/api/apex/v1/credits ``` ```json theme={null} { "companyId": "2abf03ae-768b-4717-9d14-43e1a8d8d9a1", "scansEnabled": true, "balances": { "standard": { "purchased": 12, "used": 5, "remaining": 7 }, "audit": { "purchased": 2, "used": 1, "remaining": 1 }, "lite": { "purchased": 8, "used": 3, "remaining": 5 } }, "scanTypes": { "standard": { "available": true, "ledger": "standard", "creditsRequired": 1 }, "audit": { "available": true, "ledger": "audit", "creditsRequired": 1 }, "lite": { "available": true, "ledger": "lite", "creditsRequired": 1 } } } ``` The endpoint requires `scans:create` and never accepts a company identifier; the authenticated service key determines the organization. `scanTypes` applies the active credit ledger, configured cost, and `scansEnabled` state. Source compatibility is separate: local archives support only `standard`, while `audit` and `lite` require a provider-backed GitHub source. The response is a point-in-time snapshot. Scan creation can still return `402` if another request consumes the entitlement first; refresh the balances before offering another confirmed choice. ## § 05 Trigger a remote scan Send a stable, unique `Idempotency-Key` for each intended scan. Reuse it only when retrying the identical request after a transport error, timeout, or `5xx`. ```bash theme={null} curl --request POST https://ai.cantina.xyz/api/apex/v1/scans \ --header "Authorization: Bearer $APEX_SERVICE_KEY" \ --header "Idempotency-Key: 8c8d9e5d-4fa6-4b65-bd42-14ddb5874c83" \ --header "Content-Type: application/json" \ --data '{ "repoUrl": "https://github.com/acme/payments", "commit": "0123456789abcdef0123456789abcdef01234567", "paths": ["src", "packages/auth"], "scanType": "standard", "generateThreatModel": true }' ``` If no active workspace is linked to the canonical repository, Apex creates one and links it before starting the scan. If multiple workspaces match, the API returns a conflict with workspace choices; submit a new intended request with the selected `workspaceId` and a new idempotency key. When `workspaceId` is present, `useExistingThreatModel` defaults to `true`. Apex validates that a completed model exists before reserving credits. Set `generateThreatModel: true` for a fresh model, or `generateThreatModel: false` only when you intentionally want neither generation nor validated reuse. The optional `paths` array is a focus hint, not a security boundary. Apex may inspect or report code outside those paths. | Scan type | Notes | | - | - | | `standard` | Default; supports remote repositories and local archives | | `audit` | Requires a provider-backed source and an audit entitlement | | `lite` | Requires a provider-backed source and Lite access/credits | ## § 06 Scan a local directory Raw filesystem paths cannot cross an HTTP boundary. Package the source, calculate its SHA-256 plus compressed and uncompressed byte counts, then create, upload, complete, and scan the archive. ```bash theme={null} # 1. Create the archive outside the source tree or exclude the output archive. tar --exclude="./apex-source.tar.gz" -czf apex-source.tar.gz . # 2. Create the workspace and signed upload session. curl --request POST https://ai.cantina.xyz/api/apex/v1/source-uploads \ --header "Authorization: Bearer $APEX_SERVICE_KEY" \ --header "Content-Type: application/json" \ --data '{ "workspaceName": "Payments local", "uploads": [{ "displayName": "payments", "relativePath": ".", "archiveFormat": "tar.gz", "sha256": "", "compressedBytes": , "uncompressedBytes": }] }' # 3. PUT the archive to uploads[0].upload.putUrl using every returned header. curl --request PUT \ --header "Content-Type: application/gzip" \ --upload-file apex-source.tar.gz \ "" # 4. Verify the upload and retain the returned archiveId and sha256. curl --request POST \ --header "Authorization: Bearer $APEX_SERVICE_KEY" \ --header "Content-Type: application/json" \ --data '{"workspaceId":""}' \ https://ai.cantina.xyz/api/apex/v1/source-uploads//complete # 5. Start a standard scan from the completed archive. curl --request POST https://ai.cantina.xyz/api/apex/v1/scans \ --header "Authorization: Bearer $APEX_SERVICE_KEY" \ --header "Idempotency-Key: " \ --header "Content-Type: application/json" \ --data '{ "workspaceId": "", "scanType": "standard", "generateThreatModel": true, "scanSources": [{ "sourceKind": "local_archive", "displayName": "payments", "relativePath": ".", "archiveId": "", "sha256": "" }] }' ``` A newly created local workspace has no completed threat model to reuse. Keep `generateThreatModel: true` on its first scan; omitting it makes a request with `workspaceId` default to existing-model reuse and can return `THREAT_MODEL_NOT_AVAILABLE`. Each archive must be at most 500 MiB compressed and 2 GiB uncompressed. A scan can include at most 20 archives. Signed upload URLs are credentials: do not log or persist them beyond the upload. A successful scan request returns HTTP `202`: ```json theme={null} { "scanId": "3e559b86-f524-4b27-a175-fb4944c53f1b", "workspaceId": "2abf03ae-768b-4717-9d14-43e1a8d8d9a1", "status": "preparing", "statusUrl": "/api/apex/v1/scans/3e559b86-f524-4b27-a175-fb4944c53f1b", "findingsUrl": "/api/apex/v1/scans/3e559b86-f524-4b27-a175-fb4944c53f1b/findings" } ``` ## § 07 Poll and cancel scans ```bash theme={null} curl --header "Authorization: Bearer $APEX_SERVICE_KEY" \ https://ai.cantina.xyz/api/apex/v1/scans/ ``` Retain `scanId` and `workspaceId`. Poll with bounded backoff while status is `preparing`, `queued`, or `running`; stop on `completed`, `failed`, or `cancelled`. Large scans can take hours, so a 20-minute timeout is not suitable for full-codebase benchmarking. Make polling resumable instead of creating a duplicate scan after a client restart. To cancel an active scan: ```bash theme={null} curl --request POST \ --header "Authorization: Bearer $APEX_SERVICE_KEY" \ https://ai.cantina.xyz/api/apex/v1/scans//cancel ``` Cancellation requires `scans:create`. Repeating a successful cancellation is safe. Apex returns `409` when the scan is already completed or failed, or has not started in Apex yet. ## § 08 Fetch findings ```bash theme={null} curl --header "Authorization: Bearer $APEX_SERVICE_KEY" \ https://ai.cantina.xyz/api/apex/v1/scans//findings ``` The scan findings response is a GitLab SAST report. Each vulnerability includes the persisted Apex finding ID, title, description, severity, and available source location. IDs remain stable when the same scan is fetched again. A key with `findings:read` can retrieve unpublished drafts. Treat the payload and credential as privileged data. The first findings request after completion may return `503` with `Retry-After` while Apex durably synchronizes the terminal finding set. Retry the same GET. To retrieve the same cross-scan set as the workspace findings browser, use a workspace prefix or UUID: ```bash theme={null} curl --header "Authorization: Bearer $APEX_SERVICE_KEY" \ 'https://ai.cantina.xyz/api/apex/v1/workspaces/BEDR9/findings?state=open' ``` `state=open` excludes invalid findings, duplicates, and findings marked fixed, false positive, won't fix, or skipped. Repeat `filter` to combine facets such as `severity:high`, `review:accepted`, `repo:example-app`, `source:lib/auth.ts`, or `!validation:invalid`. ## § 09 Errors and retries | Code | Meaning | | - | - | | `400` | Invalid commit, path hint, archive metadata, or request body | | `401` | Missing, malformed, expired, or revoked service key | | `402` | Selected scan credit or entitlement is exhausted | | `403` | The key lacks the required scope | | `404` | The resource does not exist in the key's organization | | `409` | Idempotency conflict, workspace mismatch, active scan, or invalid cancellation state | | `422` | Unsupported repository or scan-source input | | `429` | Rate limit reached; respect `Retry-After` | | `500` / `502` / `503` | Server, provider, provisioning, or finalization failure; retry safely with backoff | GET and cancellation requests are safe to retry. After a transport error, timeout, or `5xx`, retry scan creation only with the original body and original `Idempotency-Key`. After correcting a definitive `4xx`, submit a new intended request with a new key. Never log authorization headers, the service key, or signed upload URLs. ## § 10 Agent-ready environment prompt Use the [API agent environment](/apex/api-agent-environment) when a coding agent or orchestration system must choose a source and start one Standard scan, then return the workspace ID, scan ID, and handoff links immediately. It is deliberately REST-only: it does not install Apex CLI, call `apex login`, or remain attached while a multi-hour scan completes. Short prompts for adapter development: * Using `APEX_SERVICE_KEY` from the environment, fetch the organization's current Apex Standard credit balance, ask whether to use the exact local archive or a compatible provider-backed commit, start one confirmed Standard scan, and immediately return its workspace ID, scan ID, accepted status, status URL, findings URL, and web link without logging credentials. * Package this local directory as `tar.gz`, create and complete an Apex source upload, then start a standard scan from its `local_archive` scan source. Keep the service key and signed upload URL secret. * Given an Apex `scanId`, fetch its findings, preserve the raw response, and import each vulnerability once by stable ID. Do not trigger a new scan. # Apex API agent environment Source: https://docs.cantina.security/apex/api-agent-environment A copyable REST-only prompt that selects a source and starts a Standard Apex scan, then returns handoff links immediately. * **Read:** 7 min * **Updated:** August 17, 2026 * **Audience:** Platform engineers and agent developers ## When to use this prompt Use this environment prompt when an agent, CI worker, or orchestration service must choose a source and start one Standard Apex scan without remaining attached for hours. The agent returns the workspace and scan identifiers plus links as soon as Apex accepts the scan. A person or separate worker can monitor it afterward. Do not combine it with CLI instructions. Apex CLI and MCP use device login; `APEX_SERVICE_KEY` authenticates only the REST API. Starting a scan requires `scans:create`. A later worker that polls status or downloads findings also needs `scans:read` or `findings:read`, respectively. `GET /api/apex/v1/credits` returns the service key organization's current standard, audit, and Lite balances plus effective scan-type availability. This is a point-in-time snapshot; scan creation remains authoritative if balances change before submission. This prompt intentionally starts only `standard` scans. It offers an exact local archive or, when compatible, a provider-backed GitHub commit. It never offers `audit` or `lite`. ## Copyable environment prompt ```text theme={null} ## Task Help the caller choose a source, confirm, and start exactly one Standard Apex security scan for this repository through the hosted REST API. As soon as Apex accepts the scan, return the workspace ID, scan ID, accepted status, and direct links. Do not wait for the scan to finish, poll it, or fetch findings in this task. Never offer or start an Audit or Lite scan. ## Integration boundary - Use the Apex service API documented at https://ai.cantina.xyz/docs/apex-api. - Do not install or invoke Apex CLI or MCP. - Do not run `apex login`; CLI device authentication does not accept service keys. ## Preconditions — check before doing anything else 1. Check only whether `APEX_SERVICE_KEY` is set and non-empty. - If missing or empty, stop immediately and report that `APEX_SERVICE_KEY` is not defined. - Never print, echo, log, serialize, or include its value in an error. - Do not inspect or print `CANTINA_API_KEY`; this workflow does not use it. 2. Confirm the key is intended to have `scans:create`. If the API returns 403, stop and report that the key lacks the required scope. 3. Read the current API documentation before making requests. If it conflicts with this prompt, follow the documentation and report the difference. 4. Call `GET /api/apex/v1/credits` with the service key. - If `scansEnabled` is false, stop and report that scans are disabled for the organization. - Retain `balances.standard` and `scanTypes.standard` in memory. Do not use CLI/MCP or ask the caller to supply balances. - Treat `scanTypes.standard.available` as a point-in-time credit check. The accompanying `ledger` and `creditsRequired` explain the Standard balance that will be charged. - Ignore Audit and Lite availability. This workflow never offers those scan types even when they have available credits. ## Choose before creating anything 1. Inspect the checkout without modifying it. Determine the repository directory name, full HEAD commit SHA, Git remote, and whether the checkout is clean and its HEAD commit is available from the GitHub remote. 2. Build the compatible choices below. Never show a source-incompatible choice. Apply the credit response before presenting the list. - `standard` + `local_archive`: available when `scanTypes.standard.available` is true, for the exact local checkout, including dirty, unpushed, non-Git, or non-GitHub source. - `standard` + `remote_repo`: available only for a clean, provider-backed GitHub commit that Apex can materialize and when `scanTypes.standard.available` is true. - If no compatible funded choice remains, report the Standard remaining balance and stop without creating anything. 3. Present one concise selection question. State that the scan type is fixed to Standard. For each choice show the source mode, effective ledger, credits required, and that ledger's remaining balance. Explain that a local archive scans the exact checkout, while a remote scan uses the named commit. Ask: `Which Standard scan source should I use?` - Do not create an archive, upload, workspace, or scan before the caller chooses. - If only one compatible choice remains, ask the caller to confirm it. - If the caller already selected a compatible source mode in the same request, summarize the Standard scan choice and treat it as confirmed. ## Start the confirmed scan ### Local archive choice 1. This source supports only `scanType: standard`. Create a temporary `tar.gz` archive outside the source tree without modifying tracked files. 2. Calculate the archive SHA-256, compressed byte count, and uncompressed byte count required by `POST /api/apex/v1/source-uploads`. 3. Create a source-upload session using the repository directory name as the workspace name. Retain the workspace ID, upload ID, signed PUT URL, and required upload headers in memory. Treat the signed URL as a credential. 4. PUT the archive to the signed URL using every returned header. Then call `POST /api/apex/v1/source-uploads/{uploadId}/complete` and retain its archive ID and verified SHA-256. 5. Build the scan request with the workspace ID, `scanType: standard`, `generateThreatModel: true`, and one `local_archive` scan source containing the archive ID and verified SHA-256. A new local workspace has no model to reuse, so do not omit `generateThreatModel: true`. ### Provider-backed choice 1. Use the canonical GitHub repository URL and full HEAD commit SHA. Do not use a moving branch or tag. 2. Build the scan request with `scanType: standard`, `repoUrl`, `commit`, and `generateThreatModel: true`. 3. If workspace resolution returns 409 with multiple matching workspaces, show those choices and ask which workspace to use. After selection, include its `workspaceId` and use a new idempotency key because the first request had a definitive 4xx response. ### Submit and hand off 1. Generate one stable idempotency key for this intended scan. Call `POST /api/apex/v1/scans` with the confirmed request. 2. After a successful HTTP 202 response, retain the workspace ID from source setup, workspace resolution, or the accepted response, plus the returned scan ID, status, `statusUrl`, and `findingsUrl`. 3. Resolve relative API URLs against `https://ai.cantina.xyz` and construct: - Workspace link: `https://ai.cantina.xyz/workspace/` - Scan link: `https://ai.cantina.xyz/workspace/?scanId=` 4. Delete only the temporary local archive, if one was created. Do not modify repository files. 5. Return the handoff output immediately. Do not call the status or findings endpoints, wait for a terminal state, or create `apex-findings.json`. ## Credit and error UX - On 402, report that the Standard scan credit is unavailable. Do not submit another scan. Refresh `GET /api/apex/v1/credits`; if Standard is available, re-present the compatible source choices and require confirmation. Otherwise report the remaining Standard balance and stop. - On 403, report the missing `scans:create` scope. - On a workspace-resolution 409, ask the caller to choose from the returned workspaces; do not guess. - On an active-scan or other 409, report the conflict and stop rather than forcing or duplicating work. - On an unrecoverable error, report the HTTP method, endpoint path, status, and redacted response body. ## Retry and safety rules - Send `Authorization: Bearer ` without logging the header. - Credit-balance GET requests are safe to retry with bounded backoff. - Reuse the same idempotency key and identical request body only after a transport error, timeout, or 5xx from scan creation. - After correcting a definitive 4xx, use a new idempotency key. - Never change source mode or workspace without caller confirmation. The scan type must remain `standard`. - Never create a second scan merely because a request timed out or the client restarted. - Do not improvise CLI commands or alternative authentication flows. ## Output Return immediately after HTTP 202 in this shape: Apex scan started - Scan type: standard - Source mode: - Workspace ID: - Scan ID: - Accepted status: - Workspace: https://ai.cantina.xyz/workspace/ - Scan: https://ai.cantina.xyz/workspace/?scanId= - Status API: - Findings API: (available after completion) Do not include elapsed time or finding counts because this task does not wait for completion. ``` ## Why this returns immediately * The scan type is fixed to Standard, and the caller chooses and confirms the source before any upload or scan is created. * Source compatibility and the authenticated Standard balance snapshot filter the choices before the caller confirms one. * It returns stable workspace and scan identifiers plus clickable handoff links as soon as Apex accepts the scan. * Monitoring and findings retrieval are separate, resumable tasks, so the initiating agent does not remain attached for a multi-hour scan. See the [Apex service API guide](/apex/api) for request examples, archive limits, scan-type constraints, status values, and retry behavior. # Apex CLI guide Source: https://docs.cantina.security/apex/cli Install Apex CLI, wire it into Claude Code, Codex CLI, or GitHub Copilot CLI, and run scans from the terminal or an agent. * **Read:** 12 min * **Updated:** August 13, 2026 * **Audience:** Developers ## § 01 What Apex CLI is Apex CLI is the standalone Apex client. It ships an interactive shell, a scripted command surface, and a stable apex-mcp server over stdio. apex setup registers Apex with Claude Code, Codex CLI, and GitHub Copilot CLI and installs their skills. This page reflects `@cantinasecurity/apex-cli` 0.1.26 and its current command surface. > **Building a headless integration?** > CLI and MCP use device login for people and coding agents. Use the Apex service API when a serverless function, cron job, or internal audit hub needs HTTP and a static organization service key. ## § 02 Install the CLI ```javascript theme={null} npm install -g @cantinasecurity/apex-cli # or pnpm add -g @cantinasecurity/apex-cli ``` The npm package requires Node.js 20 or newer. The install commands use the latest npm dist tag. Run `apex update` to replace an older global install. Then register Apex with installed agent CLIs and install skills: ```javascript theme={null} apex setup # registers with whichever CLIs are installed apex setup claude # Claude Code only apex setup codex # Codex CLI only apex setup copilot # GitHub Copilot CLI only apex update # upgrade in place ``` > **What apex setup does** > Registers Apex as an MCP server in installed Codex, Claude Code, and GitHub Copilot CLI clients, installs the Codex skill into `$CODEX_HOME/skills/apex-cli`, installs the Claude project skill into `.claude/skills/apex-cli` in the current repository, and installs the GitHub Copilot CLI skill into `$COPILOT_HOME/skills/apex-cli` or `~/.copilot/skills/apex-cli`. Re-run setup after upgrading if you want to refresh copied skill files. ## § 03 Sign in to Apex ```javascript theme={null} apex login # starts device login apex doctor # validates auth, source detection, workspace binding, materialization ``` The default host is `https://ai.cantina.xyz/`. Use `APEX_BASE_URL` only when testing against a non-production Apex host. `APEX_SERVICE_KEY` authenticates the hosted REST API only. It does not authenticate CLI or MCP commands, which use device login. `apex doctor` reports this distinction when it detects an Apex service key but no device-login session. `APEX_API_KEY` is recognized for that migration diagnostic, but `APEX_SERVICE_KEY` is the documented REST variable. ## § 04 Use with Claude Code ```javascript theme={null} apex setup claude # or, manually: claude mcp add apex --scope user -e APEX_MCP_CLIENT=claude -e APEX_CLIENT_INTEGRATION=claude -- apex-mcp ``` Expected result: Apex appears as a connected MCP server inside Claude Code and apex-\* tools are available. ## § 05 Use with Codex CLI ```javascript theme={null} apex setup codex # or, manually: codex mcp add apex --env APEX_MCP_CLIENT=codex --env APEX_CLIENT_INTEGRATION=codex -- apex-mcp ``` ## § 06 Use with GitHub Copilot CLI ```javascript theme={null} apex setup copilot # or, manually: copilot mcp add apex --tools "*" -- apex-mcp ``` ## § 07 Prompt examples Phrases that work well from inside Claude Code, Codex CLI, GitHub Copilot CLI, or any other MCP-aware agent. * Scan this repo and summarize findings. * Set up Apex in this repo for the first time. * Dry-run with apex-doctor. * Export the latest findings. * Triage critical and high findings only. * Run an audit scan for this workspace. * Run a Lite scan for this workspace. * Run a PR scan for pull request 42. * Mark KERN2-25 fixed with this PR and start a fix review scan. ## § 08 Interactive shell Bare apex opens the interactive shell. Slash commands inside it: ```javascript theme={null} /credits /scan [standard|audit|lite] /scan pr /scans /findings [scan-id] /findings workspace [filter...] /findings comment /findings feedback valid [comment] /findings feedback invalid [comment] /findings fix-review /export [scan-id] /workspaces /workspace use /workspace name /cancel-scan [scan-id] /status /doctor /repos /company [id|handle] /connect github /connect gitlab /open /clear /update /claim /logout /help /exit ``` ## § 09 Scripted commands ```javascript theme={null} apex credits apex scan apex scan --mode audit apex scan --mode lite apex scan --mode pr --pr [--pr ] [--pr-path ] apex scans apex findings [--scan ] apex findings --workspace [--company ] [--workspace-ref ] [--finding-state all|open] [--filter <[!]facet:value>] apex findings comment --content [--parent-comment ] [--scan ] apex findings feedback [comment] [--comment ] [--scan ] [--suggested-severity extreme|critical|high|medium|low|informational] [--dismissal-reason false-positive|by-design|not-relevant] [--label acknowledged|fixed] [--fix-pr-url ] apex findings fix-review [--scan ] apex export findings [--scan ] [--format markdown|json|gitlab-sast] [--output ] apex workspaces apex workspace apex workspace use apex cancel-scan [scan-id] apex status [--scan ] apex doctor apex login apex redeem [--replace] [--json] apex claim [--no-open] [--json] apex logout apex service-key create --name [--company ] [--scope ] [--expires-at ] [--json] apex service-key list [--company ] [--json] apex service-key revoke [--company ] [--json] apex setup [all|codex|claude|copilot] apex telemetry [status|enable|disable] apex update apex connect github apex connect gitlab ``` ### Common flags | Flag | Description | | - | - | | `--company ` | Target a specific company | | `--workspace-name ` | Pin or create a named workspace | | `--scan ` | Select a specific scan for status, findings, or export | | `--workspace` | Use the cross-scan workspace findings view | | `--workspace-ref ` | Select a workspace for `apex findings --workspace` only | | `--finding-state all\|open` | Return all findings or only findings needing review | | `--filter <[!]facet:value>` | Filter workspace findings (repeatable) | | `--format markdown\|json\|gitlab-sast` | Output format for exports | | `--output ` | Output path for exports | | `--limit ` | Cap list length | | `--mode standard\|audit\|lite\|pr` | Scan mode | | `--pr ` | Select one or more GitHub PRs for PR scans | | `--pr-path ` | Limit a single PR scan to changed paths | | `--source-mode auto\|remote\|local` | Source resolution mode | | `--repo ` | Constrain to a repo path (repeatable) | | `--force` | Skip confirmation | | `--replace` | Replace an existing guest trial session | | `--json` | Machine-readable output | | `--no-open` | Don't open the browser | | `--non-interactive` | Fail fast in scripts | | `--content ` | Body for a finding comment | | `--comment ` | Rationale for finding feedback | | `--dismissal-reason false-positive\|by-design\|not-relevant` | Dismissal reason for invalid feedback | | `--suggested-severity extreme\|critical\|high\|medium\|low\|informational` | Suggested severity for feedback | | `--label acknowledged\|fixed` | Finding label | | `--fix-pr-url ` | Attach one or more Fix PR URLs | ## § 10 Run a scan ```javascript theme={null} apex scan apex scan --mode audit apex scan --mode lite apex scan --mode pr --pr 42 apex scan --mode pr --pr 42:src/auth.ts,src/policy.ts apex scan --source-mode local apex scan --repo ./services/api --repo ./services/worker apex status # progress on the latest scan apex status --scan apex scans # recent scans apex findings # latest scan's findings apex findings --scan apex findings --workspace --workspace-ref BEDR9 --company apex-internal --finding-state open apex export findings --format markdown --output findings.md ``` 1. **Let Apex resolve the workspace** - Run apex scan from the repository root. Apex uses the current folder as the default workspace name unless you pass --workspace-name. 2. **Keep source planning explicit when needed** - By default, Apex scans the current directory. Use --repo for specific roots and --source-mode local when you want a snapshot of the exact working tree. 3. **Use the current scan-mode names** - Use standard for normal scans, audit for audit scans, lite for beta-enabled Lite scans, and pr with --pr for GitHub pull request scans. The old ultra mode is still accepted only as a legacy alias for audit. `--workspace-ref` is supported only by `apex findings --workspace`. To list scans or export findings for a different workspace, bind it first with `apex workspace use `. Unsupported or misspelled flags fail instead of silently falling back to the current local binding. > **Local snapshots and provider-backed scans** > Standard scans can use local snapshot uploads for dirty git worktrees and plain directories. Audit and Lite scans require provider-backed GitHub or GitLab sources that Apex can materialize remotely; Lite scans also require beta access. PR scans require one provider-backed GitHub repository. ## § 11 Review findings Apex CLI can now add finding comments, mark findings valid or invalid, attach Fix PR URLs, and start fix review scans. ```javascript theme={null} apex findings comment KERN2-25 --content "Needs auth boundary check" apex findings feedback KERN2-25 valid --comment "Reproduced on latest build" apex findings feedback KERN2-25 invalid --dismissal-reason false-positive --comment "Unreachable path" apex findings feedback KERN2-25 valid --label fixed --fix-pr-url https://github.com/acme/app/pull/123 --comment "Fixed in PR #123" apex findings fix-review KERN2-25 ``` > **Feedback authentication** > Finding comments, feedback, and fix review scans use the same Apex CLI device-login credentials as read operations. MCP clients should complete `apex-auth-start` and `apex-auth-wait`, then call the finding write tools without asking users to paste browser cookies or auth tokens. ## § 12 MCP tools Agent clients should prefer the Apex MCP server over shelling out. Use `apex setup` for automatic registration, or manually point clients at the stable `apex-mcp` binary. | Tool | Description | | - | - | | apex-auth-status / apex-auth-start / apex-auth-wait | Check auth and complete device login without opening a browser | | apex-trial-status | Inspect local guest-session and claim deadlines without exposing secrets | | apex-doctor | Validate auth, detected sources, provider access, workspace binding, and source materialization | | apex-workspaces / apex-workspace-use | List workspaces and bind the current directory by name, prefix, or ID | | apex-scan | Start standard, audit, Lite, or PR scans with explicit cwd, repoPaths, sourceMode, pullRequests, and force inputs | | apex-status / apex-scans / apex-cancel-scan | Monitor the latest or selected scan, list workspace scans, and cancel scans | | apex-findings / apex-export-findings | Inspect or export one scan's findings | | apex-workspace-findings | Inspect findings across a selected workspace, including an open-finding view | | apex-finding-comment / apex-finding-feedback | Leave comments or valid/invalid feedback on a finding | | apex-finding-fix-review | Start a fix review scan after fixed feedback has a Fix PR URL | ```javascript theme={null} codex mcp add apex --env APEX_MCP_CLIENT=codex --env APEX_CLIENT_INTEGRATION=codex -- apex-mcp claude mcp add apex --scope user -e APEX_MCP_CLIENT=claude -e APEX_CLIENT_INTEGRATION=claude -- apex-mcp copilot mcp add apex --tools "*" -- apex-mcp ``` > **Plugin installs use the published package** > Marketplace and plugin installs launch the pinned npm package with `npx -y -p @cantinasecurity/apex-cli@0.1.26 apex-mcp`, so users do not need a global `apex` install before enabling the plugin. ## § 13 Usage telemetry Apex CLI 0.1.26 emits first-party, privacy-preserving usage telemetry for direct CLI, interactive shell, and MCP usage. Telemetry is enabled by default and can be inspected or disabled locally: ```javascript theme={null} apex telemetry status apex telemetry disable apex telemetry enable APEX_TELEMETRY_DISABLED=1 apex scan ``` Telemetry records lifecycle events, duration, success or failure category, CLI version, Node and platform basics, anonymous install and session IDs, and sanitized command metadata. It does not send raw cwd paths, repository URLs, finding IDs, scan IDs, PR URLs, comments, file paths, tokens, bearer credentials, or raw flag values. ## § 14 Troubleshooting * If apex isn't found, confirm your global bin directory is on PATH. * Apex CLI requires Node.js 20 or newer. * If setup skips a client, confirm the claude, codex, or copilot CLI is installed. Explicit setup targets require the matching CLI. * Make sure MCP clients launch apex-mcp directly, not pnpm mcp without --silent. * A service key in `APEX_SERVICE_KEY` or `APEX_API_KEY` does not sign the CLI in. Use `apex login` for CLI device authentication, or use the [service API](/apex/api) for headless workflows. * If you need to inspect or opt out of local usage telemetry, run apex telemetry status, apex telemetry disable, or set APEX\_TELEMETRY\_DISABLED=1. * If browser launch fails during login, copy the verification URL manually. * If sources aren't found, run apex doctor from the repository root or pass `--repo `. * If remote materialization fails, retry with --source-mode local unless you specifically need provider-backed remote materialization. * Audit and Lite scans require provider-backed GitHub or GitLab sources. Local snapshot fallback is for standard scans. * Lite scans also require the Lite Scan beta feature and an available Lite scan entitlement. * PR scans require a provider-backed GitHub repository and `--mode pr --pr `. * If a scan is already active, use apex status, pass `--scan ` for a specific scan, or pass --force when you intentionally want to start another scan. * Finding comments, feedback, and fix review scans use the same Apex login as read commands. # Client onboarding guide Source: https://docs.cantina.security/apex/onboarding How repository access works, what Apex needs during setup, and what to send before the first scan. * **Read:** 8 min * **Updated:** Apr 28, 2026 * **Audience:** Workspace owners ## § 01 What onboarding looks like Apex does not need personal access from every engineer. GitHub usually connects through a GitHub App. GitLab supports OAuth or a service-account token. Connecting a provider unlocks repository import - teams still choose repos, refs, and docs before scans run. 1. **Connect a code host** - Done once per company or workspace. 2. **Create a workspace** - Choose the exact repositories in scope. 3. **Pick a ref for each repository** - Branch, pull request, or commit. 4. **Add supporting context** - Docs, API specs, architecture notes, sharp edges. 5. **Run the scan** - Only after scope and context look right. ## § 02 Why Apex needs access * Show repositories available to the connected company or workspace. * Load branches, pull requests, commits, and repository trees during workspace setup. * Pull selected source at the exact ref chosen for a scan. * Keep private repositories in scope without asking users to package or upload code manually. ## § 03 GitHub onboarding * Apex starts a GitHub App installation flow. * An organization owner or repository admin may need to approve the installation. * After installation, the team still chooses exact repositories per workspace. * If approval is pending, workspace setup can continue and reconnect once approved. *Workspace setup - connect options* GitHub App authorization screen *GitHub App authorization screen* Workspace setup after GitHub is connected *Workspace setup after GitHub is connected* ## § 04 GitLab onboarding * [GitLab.com](http://GitLab.com) connects through the shared OAuth app. * Self-hosted GitLab can connect through OAuth or token setup. * Token setup accepts a personal access token or service-account token with API scope. * A service-account token is the recommended default over an individual engineer token. ## § 05 What to send ahead Send these before kickoff and the first workspace usually takes minutes, not days. * Provider: GitHub, [GitLab.com](http://GitLab.com), or self-hosted GitLab. * Organization, account, or group owner - plus the person who can approve the connection. * Repositories in scope and expected default branches, pull requests, or commits. * Documentation: architecture, permissions, trust boundaries, key integrations, deployment shape. * Priority-shaping context: sharp edges, sensitive flows, threat-model constraints, bug classes that matter. ## § 06 FAQ **Does Apex need personal access to every codebase?** No. Provider connections happen once at the company or workspace level. **Does connecting a provider start a scan?** No. You still pick repositories, refs, and context first. **What if GitHub App approval is pending?** Workspace setup can continue. Reconnect after approval lands. **Can scope be limited?** Yes - to selected repositories and specific refs (branch, PR, or commit). Workspace setup - connect options *Workspace setup - connect options* # Apex scan manual Source: https://docs.cantina.security/apex/scan-manual A practical guide to scoping scans, timing them well, and giving Apex enough context to return useful findings. * **Read:** 12 min * **Updated:** Apr 28, 2026 * **Audience:** Workspace owners ## § 01 How to think about Apex Treat Apex like a fast auditing team. It works best on whole systems rather than tiny diffs, with context about architecture, permissions, invariants, and integrations. > **Key idea** > Apex works best as a standalone scan of a coherent system. Aim it at one deployable unit at a time, not at every PR. ## § 02 When to run a scan * Run after a meaningful batch of merged changes - not on every PR. * Re-scan before major launches, risky refactors, upgrade work, or new external integrations. * Avoid back-to-back scans on near-identical code. * The first scan on a system is usually the highest-yield pass. ## § 03 Audit vs normal scans Two scan modes, picked by what you already know about the system and how much is riding on the result. **Normal scan** * After a meaningful batch of changes, when you already understand the system. * Follow-up passes on stable scope. * When the change matters enough to re-check, but isn't a launch-grade event. * When repos, trust boundaries, threat model, and focus areas are already known. **Audit scan** * First scan of a system, protocol, or large codebase. * Before launch, major release, or external security review handoff. * After changes to auth, permissions, upgrade paths, signing, payments, settlement, or privileged flows. * When risk lives in interactions and trust boundaries rather than one file. > **Don't burn an Audit on** > A small PR (unless it crosses a critical trust boundary), a repeat scan on near-identical code, a tiny isolated change, or work where fast iteration matters more than assurance. ## § 04 Threat model guidance Apex does not infer priorities from code alone. A few sentences in plain language change the output significantly. * Say directly if griefing or DoS is out of scope. * Say directly if privileged role abuse, signer misuse, upgrade risk, or fee math matters. * Specify if only critical and high-severity findings matter. ## § 05 Scope and inputs * Use one scan for one coherent system whenever possible. * Provide the best documentation you have: README, architecture notes, trust boundaries, permissions, external integrations. * Split unrelated apps, services, contracts, and infrastructure into separate scans. * Do not expand scope just because everything lives in one repository. ### Helpful inputs * Repository selections that map to one deployable unit or review target. * Current docs explaining architecture, permissions, upgrade paths, and integrations. * Focused notes on assumptions, legacy paths, sharp edges, and sensitive flows. ## § 06 Splitting large repos A large monorepo is rarely one review target. The split you want is the split a security reviewer would draw if they had to read the whole thing. 1. **Split by deployable system** - When services ship independently, scan them independently. 2. **Split by trust boundary** - Isolate areas that handle secrets, auth, payments, signing, or other privileged actions. 3. **Split by runtime** - Contracts, backend services, frontend apps, and infrastructure are materially different systems. 4. **Keep code together only when** - It should be reasoned about as a single security surface. | Repository shape | Typical scan count | Why | | - | - | - | | Focused repository | 1 scan | One deployable unit, one review target. | | Small monorepo, a few distinct systems | 2–3 scans | One scan per coherent system; don't merge unrelated surfaces. | | Large monorepo or mega-repo | 4+ scans | One scan per major subsystem; separate by deployable or trust boundary first. | | Two directories, unclear shared review target | Separate | If you can't justify them as one review target, they aren't one. | ## § 07 Planning template Use this skeleton to decide how to split a repository or mega-repository into Apex scans. **Apex Scan Planning Template** ```javascript theme={null} # Apex Scan Planning Template # Decide how to split a repository into Apex scans. Repository: name: url: type: single-app | monorepo | mega-repo top_level: [apps/, services/, contracts/, infra/] runtimes: [ts, go, solidity] sensitive: [auth, payments, signing, upgrade] existing_docs: known_excludes: [vendor/, generated/, build/] Goals: - Decide scan count for this repo - Explain why each scan is its own review target - Call out what NOT to group together - Identify missing docs / context to add first # Rules of thumb # - One scan per coherent security surface # - Split contracts / backend / frontend / infra / admin tooling # - Split by deployable or trust boundary first # - Skip generated, vendor, build, dependency directories # - Keep PR-review scans separate from broad baseline scans Recommended split: # example output - scan_1: contracts/ + shared protocol libs - scan_2: services/* (backend) - scan_3: infra/ + deployment logic Do not combine: contracts with backend — different runtimes & trust models Add before scanning: upgrade-path notes, signer permissions, fee math invariants ``` # Scheduled scans Source: https://docs.cantina.security/apex/scheduled-scans Run recurring workspace scans or fix reviews on a fixed cadence so monitoring keeps up with the code without manual effort. * **Read:** 5 min * **Updated:** Jul 10, 2026 * **Audience:** Workspace owners ## § 01 What scheduled scans are A workspace schedule can start a recurring scan, recurring fix reviews of eligible public findings, or both. Instead of starting each run by hand, you set one cadence and choose which actions Apex should trigger using the workspace scope and context you already configured. Scheduled runs appear in the workspace alongside manual scans and fix reviews, so there is no separate place to look for their results. > **Key idea** > Scheduling is best for a coherent, long-lived workspace you want to keep watching over time. Scope and context still come from the workspace, so keep them accurate. ## § 02 Why schedule scans * Keep monitoring a workspace continuously instead of remembering to start each scan by hand. * Catch regressions and newly introduced issues automatically as the code keeps changing. * Recheck eligible public findings across the workspace scan history without starting each fix review by hand. * Keep findings fresh on long-lived systems where the security surface shifts over time. ## § 03 Enable a schedule Scheduling is configured from the workspace scan list. The steps below walk through turning it on. 1. **Open the workspace** - Go to the workspace you want to monitor and stay on the scan list view. 2. **Open the schedule dialog** - Select Schedule in the scan list header to open the Auto-trigger scans dialog. 3. **Choose what to schedule** - Enable Auto-trigger scan, Auto-trigger fix review, or both. For fix reviews, choose whether each repository should use its workspace/default branch or the same named branch override. 4. **Choose a cadence** - Set the interval with Every and a number, then pick Days or Weeks. Weekly schedules also let you choose the day of the week the schedule runs. 5. **Save the schedule** - Select Save schedule. Apex records the schedule and shows the next run date. > **Fix review scope and branches** > Scheduled fix reviews preflight public findings from every non-archived, non-fix-review scan in the workspace, then start only the eligible reviews. They are not limited to the latest scan. > > Workspace branch lets each repository use its default or configured workspace branch. A named branch override is applied to every repository in the workspace, so use it only when that branch exists across the repository set. ## § 04 Choosing a cadence The interval is an Every value paired with a unit. Pick the granularity that matches how often the workspace changes. * Days: run every N days, up to 365. * Weeks: run every N weeks, up to 52, on a chosen day of the week. * The enabled scan and fix-review actions share the same cadence. * The dialog summarizes the schedule (for example, "Every 2 weeks on Mon") and shows the next run date. > **First run** > After you save, Apex evaluates each enabled action at the next scheduled time. A scheduled fix review preflights existing public findings in the workspace scan history using the selected branch behavior; it does not create a new workspace scan first. ## § 05 Manage or turn off Open the Schedule dialog again at any time to change the cadence, day of the week, fix-review branch, or which actions are enabled. The dialog also shows the next run. Its Last successful value tracks successful Auto-trigger scan starts; fix-review-only runs do not update that value. Auto-trigger scan and Auto-trigger fix review can be turned off independently. Turn both off and save to stop the schedule while leaving manual scans and fix reviews untouched. # Client API Reference Source: https://docs.cantina.security/api REST endpoints available to client organizations > REST endpoints available to client organizations The Cantina REST API gives client organizations programmatic access to the same data and actions exposed in the dashboard. Use it to manage your company, browse and update repositories, retrieve audit reports, and connect events to downstream tools. For information on generating an API key and authenticating requests, see [API Access](/security-teams/getting-started/api-access). *** ## Companies Manage company accounts, members, manager roles, GitHub App installations, and SSO configuration. * **Companies** - Company accounts, users, GitHub, and SSO endpoints ## Reports Retrieve audit reports for finished engagements. * **Reports** - List and fetch audit reports ## Repositories Browse repositories you have access to, read files and findings, manage teams, and interact with comments. * **Repositories** - Repository, file, finding, and team endpoints ## Zapier Subscribe to Cantina events from Zapier or any other workflow tool that can call HTTP webhooks. * **Zapier** - Event subscription endpoints # MCP access Source: https://docs.cantina.security/api/mcp-access Connect external MCP clients (Claude Code, Cursor, CI scripts) to your Clarion workspace. > Connect external MCP clients (Claude Code, Cursor, CI scripts) to your Clarion workspace. > **Note:** Clarion exposes a workspace-scoped Model Context Protocol (MCP) server so external clients can - without the Clarion web UI - read alerts, incidents, tasks, monitors, and signals; operate the scheduler; author and edit agents and skills; browse and instantiate templates; and manage the workspace's default agent instructions. There are two ways to connect: OAuth (for IDE/agent clients) and long-lived API tokens (for headless ones). ## Where it lives In Clarion, go to **Settings > MCP access**. The page has two tabs: * **API tokens** - mint, list, and revoke long-lived bearer tokens. One row per token; the plaintext is shown exactly once at creation time. * **OAuth setup** - copy-paste snippets for Claude Code and Claude Desktop, plus a generic note for other MCP clients. No secrets to manage. The MCP endpoint itself is at `https:///api/mcp` (the OAuth setup tab fills in the right URL for your environment). *** ## Choosing a flow | | OAuth | Long-lived token | | - | - | - | | Best for | Claude Code, Cursor, any IDE/agent client that can open a browser | CI jobs, cron workers, headless scripts | | Setup | One browser sign-in, no secret to copy | Mint a token, copy it into the client config | | Revocation | From the client's settings | Revoke the row in **Settings > MCP access** | | Appears in token list | No | Yes | If a client supports OAuth, use it. The browser flow handles re-auth automatically when access expires; long-lived tokens never rotate and stay valid until revoked. *** ## Connecting via OAuth ### Claude Code (CLI) 1. Open **Settings > MCP access > OAuth setup** and copy the `claude mcp add` command shown there. It already contains the right URL for your workspace. 2. Run it: ```bash theme={null} claude mcp add --transport http clarion https:///api/mcp ``` 3. Start a session. On the first tool call Claude Code opens the Clarion OAuth grant page - pick the workspace and approve. The token is captured by Claude Code's local callback. ### Claude Desktop 1. Open **Settings > MCP access > OAuth setup** and copy the JSON snippet. 2. Paste it into `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or the equivalent path on Windows/Linux: ```json theme={null} { "mcpServers": { "clarion": { "type": "http", "url": "https:///api/mcp" } } } ``` 3. Restart Claude Desktop. The first tool call triggers the same browser grant flow as the CLI. ### Other MCP clients Point any MCP client that speaks the [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) at `https:///api/mcp`. The first unauthenticated request returns a `WWW-Authenticate` challenge that points at `/.well-known/oauth-protected-resource`; any spec-compliant client follows the metadata to discover the authorization server and complete the OAuth flow without extra config. *** ## Connecting via a long-lived API token Use this when the client can't drive an interactive browser sign-in. 1. In **Settings > MCP access > API tokens**, click **New token**. 2. Give it a label that lets you recognize it later (e.g. `CI nightly drift check`, `Cron worker`). 3. Click **Create token**. The dialog swaps to a one-time reveal - copy the plaintext **now**. Once you close the dialog the secret is gone for good. 4. Paste the token into your MCP client config as a `Bearer` credential: ```json theme={null} { "mcpServers": { "clarion": { "type": "http", "url": "https:///api/mcp", "headers": { "Authorization": "Bearer " } } } } ``` > **Warning:** A long-lived token grants full workspace access over MCP - not just reads and light triage, but **creating and editing configuration**: agents, skills, schedules, and the workspace's default agent instructions. Treat it like any other secret - keep it out of source control and rotate (revoke + re-mint) on a cadence that matches your other credentials. ### Revoking a token In the **API tokens** tab, click the revoke icon on the row, confirm, and the token stops authenticating immediately. Any client still using it gets a 401 on its next request. Revocation is one-way; revoked rows stay in the list with a "Revoked" badge so you can audit who created them and when. *** ## Available tools After connecting, the client sees the following workspace-scoped tools under the `clarion` server (so each one appears as `mcp__clarion__`). Every tool is scoped to the token's workspace: reads filter by workspace, cross-workspace lookups return an error rather than another tenant's data, and mutations are attributed to the operator who minted the token. ### Read & triage **Alerts** * `list_alerts` - paginated list, filterable by status / severity / search * `get_alert` - full alert detail by display number * `complete_remediation_item` - toggle a checklist item on an alert's remediation list * `retrigger_alert` - re-run triage agents for an alert (e.g. after deploying a fix) **Incidents** * `list_incidents` - paginated list with the same filters as alerts, plus search * `get_incident` - incident detail including linked alerts **Tasks** * `list_tasks` - paginated list, filter by status / priority / `alertNumber` (useful for "has this alert been escalated yet?") * `get_task` - single task by id **Monitors & integrations** * `list_monitors`, `get_monitor` - the workspace's ingestion sources, with sanitized per-type config (webhook secrets stripped) * `list_integrations`, `get_integration_health` - integration sync health (consecutive failures, pause state, auth errors); credentials are never returned **Signals** * `list_signals`, `get_signal` - the raw ingested events that feed alerts, before any alert fires **Schedules** * `list_schedules`, `get_schedule` - discover what's running in the workspace * `list_schedule_runs`, `get_schedule_run` - poll-friendly run snapshots * `run_schedule_once` - fire a schedule out-of-band without changing its cron cadence * `cancel_schedule_run` - cancel a pending or running execution * `create_schedule`, `update_schedule`, `set_schedule_enabled`, `delete_schedule` - full CRUD on recurring tasks ### Configure the workspace > **Note:** Skill and instruction content is exchanged as **markdown** (with inline `` pills) and converted to/from Clarion's rich-text format automatically - you never handle the raw editor JSON. **Agents** * `list_agents`, `get_agent` - the workspace's triage agents and their linked skills/monitors * `create_agent`, `update_agent` - manage an agent's name, active state, linked skills, and linked **existing** monitors. Monitor *creation* stays in the Clarion UI - it involves webhook secrets and registration that aren't exposed over MCP. **Skills** * `list_skills`, `get_skill` - reusable workspace skills, instructions returned as markdown * `create_skill`, `update_skill` - author or edit a skill from markdown; tools are extracted from the inline `` pills, and edits snapshot a new version **Templates** * `list_skill_templates`, `get_skill_template` - browse the curated skill-template catalog * `create_skill_from_template` - instantiate a skill template into a *managed* workspace skill (auto-updates when the template changes; idempotent - returns the existing copy if already instantiated) * `list_agent_templates`, `get_agent_template` - browse the published agent-template catalog * `create_agent_from_template` - scaffold an agent plus its managed skills from a template, created inactive so you can review before it runs **Workspace** * `list_workspace_tools` - the action tools currently **available** to agents in this workspace. Only tools whose backing integration (and any required credentials or pauser config) is actually connected are returned - unconfigured ones are omitted - so this reflects what a skill can reference *today*. Includes the workspace's custom MCP servers, custom API/CLI toolsets, and Microsoft Sentinel tools. * `get_workspace_instructions`, `set_workspace_instructions` - read or replace the default agent instructions (markdown) applied to every agent in the workspace > **Note:** Templates are a shared, platform-curated catalog. These tools only **browse** it and **instantiate** copies into your workspace - creating, editing, or deleting templates is admin-only and is not exposed over MCP. > **Info:** The agent-side MCP server used by Clarion's own triage agents has a separate (broader) tool surface - agents see integration tools like `mcp__slack__*`, `mcp__okta__*`, `mcp__cloudtrail__*` etc. that aren't exposed externally. External MCP clients only see the workspace tools listed above. `list_workspace_tools` surfaces the *names* of the available integration tools so a skill you author can reference them by their `` type, but those tools still execute agent-side during triage. # Clarion security operations documentation Source: https://docs.cantina.security/clarion Set up Clarion to connect security tools, correlate alerts, preserve business context, and run governed response with security agents. [Clarion](https://clarion.cantina.xyz) is Cantina's agentic security operations platform. It ingests signals from every security tool, correlates threats in real time, and executes response playbooks autonomously, so your SOC team focuses on strategy while Clarion handles the noise. Reduce alert fatigue through intelligent deduplication and prioritization across all your security tools. Provide 24/7 instant threat response with AI-powered agents that act outside business hours. Capture team expertise in executable skills that persist when staff leave. ## Why Clarion? Security teams are overwhelmed by fragmented tooling, alert fatigue, and manual response processes. Clarion unifies your security operations into a single orchestration layer: * **Signal ingestion** — Consolidate signals from SIEM, EDR, WAF, SOAR, IAM, NDR, and more into one platform. * **Real-time correlation** — Automatically correlate threats across sources to surface what matters and eliminate false positives. * **Agentic response** — Execute response playbooks autonomously with AI agents that triage, escalate, and remediate. * **Proactive monitoring** — Monitor DNS records, HTTP endpoints, smart contracts, and infrastructure with configurable checks. * **Signal rules** — Define custom rules to automatically route, escalate, and act on security signals. ## Start with Clarion Connect the first integration, invite members, and activate an agent. Learn how alerts, incidents, tasks, agents, skills, and tools fit together. Give agents the business and technology context they need during investigations. Follow the setup guide for the security, cloud, identity, and collaboration tools in your stack. For a product-level explanation of how Clarion fits into Cantina, see the [Cantina platform overview](https://www.cantina.security/platform). # Getting started Source: https://docs.cantina.security/clarion/getting-started Set up your Clarion workspace, create your first agent, and start triaging issues. This guide walks you through the essential steps to go from a fresh workspace to a live agent triaging real issues. ## 1. Create your workspace Sign in at [clarion.cantina.xyz](https://clarion.cantina.xyz). You may already have a workspace set up for you by the Cantina team. If not, you can create one yourself — all new workspaces require approval from the Cantina team before they go live. ## 2. Invite your team Open **Settings → Members** to invite teammates. Members receive notifications, review agent decisions, and approve sensitive actions when an agent asks.