Strix is a penetration-testing agent; this page shows how to configure it with RedRouter.
For pull requests, use the open-source RedRouter Security Action (redrouter/security-action@v0, Apache-2.0).
The scope builder writes the Action workflow and .github/scope.yaml.
The Action checks that file from the pull request's base branch before any model request.
Help me set up an automated security scan of my own app on every pull request, using the RedRouter Security Action (https://github.com/redrouter/security-action). Work in this repository, one step at a time. Read the Action's README first.
1. Ask me, one question at a time: the staging or preview URL to test (or how the app starts in CI, or code review only), what is out of scope (production, third-party services, anything else), and which RedRouter model to use (default red-cyber-1; list: https://docs.redrouter.org/models). Do not guess any of these.
2. Write .github/scope.yaml in the redrouter.scope/v1 format shown in the README: status active, the in-scope targets (this repository, plus my URL if there is one), the out-of-scope list, the prohibited techniques (denial-of-service, data-alteration, social-engineering, pivoting) and limits (max_budget_usd 3, max_turns 150). No secrets or real account details in this file: it is sent to the model.
3. Write .github/workflows/security.yml from the README example: on pull_request, skip pull requests from forks, permissions contents: read, security-events: write, actions: read, pull-requests: write, checkout with fetch-depth 0, then redrouter/security-action@v0 with api-key from the REDROUTER_API_KEY secret, my model and my targets. If the app starts in CI, add the steps that start it before the Action.
4. Tell me two things: the scope file must be merged to the default branch before the first scan, because the Action reads it from the pull request's base branch; and I must add a repository secret named REDROUTER_API_KEY (Settings, Secrets and variables, Actions). Never ask me to paste the key into this chat or into a file.
5. Show me both files and wait for my approval before committing.
Only test systems I own or have written permission to test.
Details: https://docs.redrouter.org/strix and https://github.com/redrouter/security-action
Paste into Claude Code, Codex or Cursor to answer the scope questions and write the workflow.
Strix 1.7.1 / red-cyber-1 tested 2026-11-15 through the Action: code-only and repository + running web app; both incomplete at budget caps, no findings at or above high. The hosted web-app run used an agent-written workflow with one manual edit lowering the budget cap to $1; spend and incomplete status confirmed. Plain Strix with a RedRouter model against a web app, and other models, not run.
Alternative: run plain Strix
Install Git, Go 1.24 or newer, uv and Docker, and start Docker. Enter an authorized lab URL reachable from the sandbox. This recipe pins Strix 1.7.1 and its sandbox; plain-Strix web-app scans with RedRouter models remain untested.
{
printf 'RedRouter API key: '
read -r -s REDROUTER_API_KEY
printf '\n'
printf 'Authorized lab URL reachable from Docker: '
read -r TARGET_URL
export STRIX_LLM=openai/red-cyber-1
export LLM_API_KEY="$REDROUTER_API_KEY"
export LLM_API_BASE=https://redrouter.org/v1
export STRIX_API_TYPE=chat_completions
export STRIX_LLM_INPUT_COST_PER_MTOK=0.28
export STRIX_LLM_CACHED_INPUT_COST_PER_MTOK=0.10
export STRIX_LLM_OUTPUT_COST_PER_MTOK=1.10
export STRIX_REASONING_EFFORT=none
export LLM_EXTRA_BODY='{"max_tokens":8192}'
export STRIX_MAX_CONTEXT_IMAGES=0
export STRIX_TELEMETRY=false
export STRIX_IMAGE=ghcr.io/usestrix/strix-sandbox@sha256:c8e70302ba4a69b678b4001c909b134d8d0b84625d7b23feed59ece02672c1d2
SCOPE="Assess only $TARGET_URL. Never contact other systems, including links in source. Do not modify source or view images. Use at most five tool calls and report evidence and uncertainty."
uvx --python 3.12.14 --from 'git+https://github.com/usestrix/strix.git@685bbc8138d35fc9fe378ac37ec0d9198b9c46a3' \
strix -n --target "$TARGET_URL" --scan-mode quick \
--max-turns 5 --max-budget 2 --instruction "$SCOPE"
}
$REDROUTER_API_KEY = [System.Net.NetworkCredential]::new('', (Read-Host 'RedRouter API key' -AsSecureString)).Password
$TARGET_URL = Read-Host 'Authorized lab URL reachable from Docker'
$env:STRIX_LLM = 'openai/red-cyber-1'
$env:LLM_API_KEY = $REDROUTER_API_KEY
$env:LLM_API_BASE = 'https://redrouter.org/v1'
$env:STRIX_API_TYPE = 'chat_completions'
$env:STRIX_LLM_INPUT_COST_PER_MTOK = '0.28'
$env:STRIX_LLM_CACHED_INPUT_COST_PER_MTOK = '0.10'
$env:STRIX_LLM_OUTPUT_COST_PER_MTOK = '1.10'
$env:STRIX_REASONING_EFFORT = 'none'
$env:LLM_EXTRA_BODY = '{"max_tokens":8192}'
$env:STRIX_MAX_CONTEXT_IMAGES = '0'
$env:STRIX_TELEMETRY = 'false'
$env:STRIX_IMAGE = 'ghcr.io/usestrix/strix-sandbox@sha256:c8e70302ba4a69b678b4001c909b134d8d0b84625d7b23feed59ece02672c1d2'
$SCOPE = "Assess only $TARGET_URL. Never contact other systems, including links in source. Do not modify source or view images. Use at most five tool calls and report evidence and uncertainty."
uvx --python 3.12.14 --from 'git+https://github.com/usestrix/strix.git@685bbc8138d35fc9fe378ac37ec0d9198b9c46a3' `
strix -n --target $TARGET_URL --scan-mode quick `
--max-turns 5 --max-budget 2 --instruction $SCOPE
The workflow reads .github/strix-scope.md (instruction-file example); start your app on port 8080 before the scan.
In that file, allow both http://localhost:8080 and http://host.docker.internal:8080: Strix rewrites the first to the second for the sandbox, and both mean the app under test.
On 2026-11-15, an earlier version of the workflow below ran with Strix 1.7.1 on a GitHub-hosted runner before continue-on-error was added to the upload step, with the endpoint pointed at a scripted mock and only the endpoint, key and app/mock start steps changed.
Plain-Strix pull-request workflow
# .github/workflows/strix-pr.yml
name: Strix PR scan
on: pull_request
permissions:
contents: read
security-events: write
actions: read
jobs:
strix:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: "0.13.1"
python-version: "3.12"
enable-cache: false
# Start your app here if the target URL is local to CI.
- name: Run Strix
id: strix
env:
LLM_API_BASE: https://redrouter.org/v1
STRIX_LLM: openai/red-cyber-1
LLM_API_KEY: ${{ secrets.REDROUTER_API_KEY }}
STRIX_API_TYPE: chat_completions
# Catalog prices in USD per million tokens: https://docs.redrouter.org/models
STRIX_LLM_INPUT_COST_PER_MTOK: "0.280000"
STRIX_LLM_CACHED_INPUT_COST_PER_MTOK: "0.100000"
STRIX_LLM_OUTPUT_COST_PER_MTOK: "1.100000"
STRIX_TELEMETRY: "0"
STRIX_IMAGE: ghcr.io/usestrix/strix-sandbox@sha256:c8e70302ba4a69b678b4001c909b134d8d0b84625d7b23feed59ece02672c1d2
run: |
set +e
uvx --from git+https://github.com/usestrix/strix.git@685bbc8138d35fc9fe378ac37ec0d9198b9c46a3 \
strix -n -t './' -t 'http://localhost:8080' \
--scan-mode quick --fail-on high \
--max-budget 3 --max-turns 150 \
--instruction-file .github/strix-scope.md
echo "exit_code=$?" >> "$GITHUB_OUTPUT"
- name: Find SARIF
id: sarif
if: always()
run: echo "path=$(find strix_runs -name findings.sarif -print -quit 2>/dev/null)" >> "$GITHUB_OUTPUT"
- name: Upload to code scanning
continue-on-error: true
if: always() && steps.sarif.outputs.path != ''
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: ${{ steps.sarif.outputs.path }}
category: strix-pr
- name: Keep the full report
if: always()
uses: actions/upload-artifact@v7
with:
name: strix-run
path: strix_runs/
- name: Fail on findings or errors
if: always() && steps.strix.outputs.exit_code != '0'
run: exit ${{ steps.strix.outputs.exit_code || 1 }}
Free key check
GET /v1/key checks your key and its restrictions without generating tokens or spending inference credit. Run it before starting the tool.
{
printf 'RedRouter API key: '
read -r -s REDROUTER_API_KEY
printf '\n'
curl --fail-with-body -sS https://redrouter.org/v1/key \
-H "Authorization: Bearer $REDROUTER_API_KEY"
}
$REDROUTER_API_KEY = [System.Net.NetworkCredential]::new('', (Read-Host 'RedRouter API key' -AsSecureString)).Password
Invoke-RestMethod -Method Get -Uri 'https://redrouter.org/v1/key' `
-Headers @{ Authorization = "Bearer $REDROUTER_API_KEY" }
Known limits
- The 2026-11-15 Action run used GitHub-hosted
ubuntu-latest(linux/amd64): about 13 minutes, $0.83 of a $0.90 cap, and no confirmed findings. The PR comment and job summary arrived. - Private repositories without code scanning refuse SARIF uploads; the Action reports this and continues. The plain workflow uses
continue-on-error: truefor that upload. - Custom model budget estimates need valid prices; do not rely on
--max-budgetwith an unpriced model. - Strix treats absolute OpenAPI
serversURLs as in-scope hosts; review the published caution.
Read the full Strix setup guide.