> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corridor.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code / Claude Tag

> Set up Corridor with the cloud environments behind Claude Code on the web and Claude Tag to scan code for security vulnerabilities before every commit.

Corridor integrates with the cloud environments behind [Claude Code on the web](https://claude.ai/code) and [Claude Tag](https://claude.com/docs/claude-tag/overview), Anthropic's @Claude in Slack, to catch security vulnerabilities before code is committed. When configured, every session installs the Corridor CLI and a git pre-commit hook that scans staged changes and blocks commits containing security findings.

## Prerequisites

* A Corridor account with a team created
* **Owner** role on your Corridor team
* A Claude account with permission to edit cloud environments
* The repository imported into Corridor as a project

## Setup

<Steps>
  <Step title="Open the Long-Running Agents page in Corridor">
    In the [Corridor dashboard](https://app.corridor.dev), navigate to **Governance > Long-Running Agents** and click the **Configuration** tab.

    Select **Claude Code** from the agent options.
  </Step>

  <Step title="Open your Claude cloud environment settings">
    Go to [claude.ai/admin-settings/cloud-environments](https://claude.ai/admin-settings/cloud-environments) and select the environment you want to configure or create a new one.

    Set the environment's **Network access** to **Full access**. The setup script downloads the Corridor CLI over the network, and **Trusted access** only reaches package managers and MCP servers.
  </Step>

  <Step title="Generate a Corridor API key">
    Back in the Corridor Configuration tab, enter a name for your key (for example, "Claude cloud agents") and click **Generate key**.

    Corridor shows the finished setup command with the key already in it. Copy the whole command, and note that the key is only shown once.
  </Step>

  <Step title="Paste the setup command">
    In your Claude cloud environment settings, paste the command into the **Setup script** field and save:

    ```bash theme={null}
    curl -fsSL https://app.corridor.dev/cli/claude-setup.sh | CORRIDOR_API_KEY=YOUR_KEY sh
    ```

    If you are reusing an existing key, paste this template and replace `YOUR_KEY` with it.

    The script runs at the start of every session. It installs the Corridor CLI and a git pre-commit hook that runs `corridor scan --staged` before each commit.
  </Step>

  <Step title="Point your sessions at this environment">
    * **Claude Tag channels:** set the default environment at [claude.ai/admin-settings/claude-tag](https://claude.ai/admin-settings/claude-tag), under **Slack** → **Advanced** → **default environment**.
    * **Claude Code sessions:** an Owner can set this as the organization's default environment at [claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code).
  </Step>
</Steps>

## How it works

Once configured, every Claude Code cloud session will:

1. Install the Corridor CLI
2. Install a git pre-commit hook
3. Scan staged changes before each commit
4. Block commits that contain security findings

Sessions start from a fresh clone before the hook could be installed in a repository, so it goes in the home directory and covers the checkout the session creates afterwards.

Findings caught by the pre-commit scan appear in the **Usage** tab of the Long-Running Agents page, where you can review severity, affected files, and resolution status.

## Managing API keys

You can view and revoke API keys in the **Configuration** tab under **Team-Owned API Keys**. Each key shows its name, creation date, and last used date.

To rotate a key:

1. Generate a new key in Corridor
2. Replace the key in the **Setup script** command in your Claude cloud environment settings
3. Revoke the old key

## Next steps

<CardGroup cols={2}>
  <Card title="Guardrails" icon="shield-check" href="/features/guardrails">
    Configure the security rules that your agents enforce.
  </Card>

  <Card title="Findings" icon="magnifying-glass" href="/features/findings">
    Learn how to review and resolve security findings.
  </Card>
</CardGroup>
