forked from ChelseaKR/sprout
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 2.06 KB
/
Copy pathredteam.yml
File metadata and controls
55 lines (50 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: redteam
# Promptfoo OWASP LLM01-LLM10 red team (eval/redteam/promptfooconfig.yaml) — see
# eval/redteam/README.md. Generation + grading call Anthropic and need
# ANTHROPIC_API_KEY, so this is opt-in/advisory until the key is provisioned as a
# repo secret and a maintainer has watched a run go clean; it has never been part of
# ci-gate's needs: list. Advisory jobs run on a schedule, not per-push
# (CI-CD-STANDARD §11d) — moved out of ci.yml 2026-07-17 to a nightly cadence.
on:
schedule:
- cron: "47 4 * * *" # nightly, 04:47 UTC
workflow_dispatch:
permissions:
contents: read
concurrency:
group: redteam
cancel-in-progress: true
jobs:
redteam:
runs-on: ubuntu-latest
continue-on-error: true # advisory; excluded from ci-gate
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "20"
- name: Check for ANTHROPIC_API_KEY
id: gate
env:
HAS_KEY: ${{ secrets.ANTHROPIC_API_KEY != '' }}
run: echo "run=$HAS_KEY" >> "$GITHUB_OUTPUT"
- name: Install + ingest
if: steps.gate.outputs.run == 'true'
run: uv sync --locked --extra serve && uv run sprout ingest
- name: Serve the chat API
if: steps.gate.outputs.run == 'true'
run: |
uv run sprout serve &
sleep 5
- name: Promptfoo red team (OWASP LLM01-LLM10)
if: steps.gate.outputs.run == 'true'
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
working-directory: eval/redteam
run: npx --yes promptfoo@latest redteam run --no-progress-bar
- name: No ANTHROPIC_API_KEY secret — skipped
if: steps.gate.outputs.run != 'true'
run: echo "::notice::ANTHROPIC_API_KEY not configured; see eval/redteam/README.md. Skipping (advisory job, not gate-blocking)."