Skip to content

DeepTeam is a framework to red team LLMs and AI agents.

feat: update docs

tanayvaswani309e59c5bea0
diff --git a/docs/content/docs/code-scanning-github-bot.mdx b/docs/content/docs/code-scanning-github-bot.mdx
index 06347ea2..0a01c1a7 100644
--- a/docs/content/docs/code-scanning-github-bot.mdx
+++ b/docs/content/docs/code-scanning-github-bot.mdx
@@ -3,7 +3,7 @@ title: Code Scanning GitHub Bot
sidebar_label: GitHub Bot
---
-`deepteam` can review every pull request and comment its findings as **`deepteam[bot]`**. The scan runs in your own CI using your `OPENAI_API_KEY`, and the comment is posted by the bot through GitHub Actions [OIDC](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect), so there are no bot tokens to store.
+`deepteam` can review every pull request and comment its findings as **`deepteam[bot]`**. By default the scan runs through **Claude** (the Claude Agent SDK) using your `ANTHROPIC_API_KEY`, and the comment is posted by the bot through GitHub Actions [OIDC](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect), so there are no bot tokens to store.
:::info
The workflow only needs `contents: read` and `id-token: write`, not `pull-requests: write`. The comment is posted server-side by the bot, and the OIDC token is bound to the exact repository and pull request the workflow ran for.
@@ -16,13 +16,15 @@ There are **TWO** ways to set up the bot:
- [Hosted GitHub App](/docs/code-scanning-github-bot#hosted-github-app) - install the app and it configures everything for you.
- [Manual Setup](/docs/code-scanning-github-bot#manual-setup) - add the scan workflow to your repository yourself.
+Both run the scan through **Claude** by default, which is the recommended provider. To use Codex, Cursor, or the built-in judge instead, see [Choosing a Provider](/docs/code-scanning-github-bot#choosing-a-provider).
+
## Hosted GitHub App
The quickest path is the hosted DeepTeam GitHub App, which sets everything up for you:
1. Install the app at [github.com/apps/deepteam](https://github.com/apps/deepteam), selecting the repositories you want scanned.
-2. Enter your email when redirected. The bot automatically opens a pull request that adds the scan workflow to each repository.
-3. Merge that pull request and add an `OPENAI_API_KEY` [repository secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).
+2. Enter your email when redirected. The bot automatically opens a pull request that adds the scan workflow to each repository, configured for the **Claude** provider.
+3. Merge that pull request and add an `ANTHROPIC_API_KEY` [repository secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions).
From then on, every pull request is scanned and commented on automatically.
@@ -51,15 +53,45 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- - run: pip install deepteam
+ - run: pip install "deepteam[claude]"
- name: Scan & comment as deepteam[bot]
env:
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- run: deepteam scan . --diff "origin/${{ github.base_ref }}..HEAD" --comment
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
+ run: deepteam scan . --provider claude --diff "origin/${{ github.base_ref }}..HEAD" --comment
```
-Then add an `OPENAI_API_KEY` repository secret and install the [DeepTeam GitHub App](https://github.com/apps/deepteam) on the repository so the bot is authorized to comment.
+Then add an `ANTHROPIC_API_KEY` repository secret and install the [DeepTeam GitHub App](https://github.com/apps/deepteam) on the repository so the bot is authorized to comment.
:::note
If your Confident AI account is in the EU region, set `CONFIDENT_BASE_URL: "https://eu.api.confident-ai.com"` under the step's `env`. The hosted app configures this for you automatically.
:::
+
+## Choosing a Provider
+
+Claude is the default and recommended provider, but you can delegate the scan to another agentic harness (Codex or Cursor) or to `deepteam`'s built-in judge. Each provider uses its own SDK extra and API key:
+
+| Provider | Install | API key |
+| --- | --- | --- |
+| `claude` (default) | `pip install "deepteam[claude]"` | `ANTHROPIC_API_KEY` |
+| `codex` | `pip install "deepteam[codex]"` | `OPENAI_API_KEY` |
+| `cursor` | `pip install "deepteam[cursor]"` | `CURSOR_API_KEY` |
+| `deepeval` | `pip install deepteam` | `OPENAI_API_KEY` |
+
+To switch, change the workflow's install line, the API key, and the `--provider` flag. For example, to use Codex:
+
+```yaml
+ - run: pip install "deepteam[codex]"
+ - name: Scan & comment as deepteam[bot]
+ env:
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
+ run: deepteam scan . --provider codex --diff "origin/${{ github.base_ref }}..HEAD" --comment
+```
+
+You can also pin the provider and model in `.deepteam-code-scan.yaml` instead of passing flags:
+
+```yaml title=".deepteam-code-scan.yaml"
+provider: claude
+model: claude-sonnet-4-5
+```
+
+The `model` is provider-specific (e.g. `claude-sonnet-4-5` for Claude, `gpt-5.4` for Codex, `composer-2.5` for Cursor). See [provider and model configuration](/docs/code-scanning-introduction#configuration-file) for all options, and the [runnable example](https://github.com/confident-ai/deepteam/blob/main/examples/code_scan_harness_example.py) for trying each provider locally.
diff --git a/docs/content/docs/code-scanning-introduction.mdx b/docs/content/docs/code-scanning-introduction.mdx
index b9c794e1..bc9f99ea 100644
--- a/docs/content/docs/code-scanning-introduction.mdx
+++ b/docs/content/docs/code-scanning-introduction.mdx
@@ -50,13 +50,14 @@ deepteam scan . --diff "main..HEAD"
### Command Line Flags
-There are **EIGHT** optional command line flags:
+There are **NINE** optional command line flags:
- [Optional] `--diff`: scan only files changed between two git refs, e.g. `"main..HEAD"`.
- [Optional] `-c`, `--config`: path to a config YAML. Auto-discovered at the scan root if not set.
- [Optional] `-f`, `--format`: output format, one of `markdown`, `sarif`, or `json`. Defaulted to `markdown`.
- [Optional] `--min-severity`: only report findings at or above `low`, `medium`, `high`, or `critical`.
-- [Optional] `-m`, `--model`: evaluation model, e.g. `gpt-4o`. Overrides the config.
+- [Optional] `-p`, `--provider`: scan engine, one of `codex`, `claude`, `cursor`, or `deepeval`. Defaulted to the provider inferred from the API key that is set, else `deepeval`.
+- [Optional] `-m`, `--model`: model for the chosen provider, e.g. `gpt-4o`. Overrides the config.
- [Optional] `-o`, `--output`: write the report to a file instead of stdout.
- [Optional] `--fail-on-findings` / `--no-fail-on-findings`: exit with code `1` if any findings remain. Defaulted to `True`.
- [Optional] `--comment`: post findings so `deepteam[bot]` comments on the pull request, see [GitHub Bot](/docs/code-scanning-github-bot).
@@ -74,18 +75,26 @@ instruction: |
exclude:
- "tests/**"
+
+# Optional: delegate the scan to an agentic harness instead of the built-in
+# judge. Omit both to auto-detect from the API key that is set.
+# provider: codex
+# model: gpt-4o
```
-There are **SEVEN** optional parameters when creating a code scan configuration:
+There are **EIGHT** optional parameters when creating a code scan configuration:
- [Optional] `min_severity`: minimum severity to report, one of `low`, `medium`, `high`, or `critical`. Defaulted to `low`.
- [Optional] `instruction`: project-specific guidance passed to the scanner. Defaulted to `None`.
- [Optional] `include`: glob patterns a file must match to be scanned. Defaulted to `None`.
- [Optional] `exclude`: glob patterns to skip. Defaulted to `None`.
- [Optional] `vulnerabilities`: restrict the scan to a subset of vulnerability names. Defaulted to a curated set of code-visible categories.
-- [Optional] `model`: default evaluation model. Defaulted to `None`.
+- [Optional] `provider`: scan engine, one of `codex`, `claude`, `cursor`, or `deepeval`. Defaulted to the provider inferred from the API key that is set, else `deepeval`.
+- [Optional] `model`: default model for the chosen provider. Defaulted to `None`.
- [Optional] `diffs_only`: only scan changed files. Defaulted to `False`.
+To run the scan through an agentic harness instead of the built-in judge, set `provider` to `codex`, `claude`, or `cursor` and install the matching extra (for example `pip install deepteam[codex]`). If you only set the API key (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `CURSOR_API_KEY`), the provider is auto-detected, so no config change is needed.
+
## Python API
For full control, you can use the scanner programmatically. Create a `code_scan_example.py` file and paste the following code: