-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.59 KB
/
Copy pathredteam.yml
File metadata and controls
67 lines (57 loc) · 1.59 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
56
57
58
59
60
61
62
63
64
65
66
67
name: Red-Team Harness
on:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
push:
branches: [main]
paths-ignore:
- "docs/**"
permissions:
contents: read
jobs:
redteam:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install pipx and Poetry
run: |
python -m pip install --upgrade pip pipx
pipx install poetry==1.8.3
- name: Install project
run: |
poetry install --with dev,security --no-interaction --no-ansi
- name: Prepare reports directory
run: mkdir -p reports
- name: Run red-team harness
run: |
poetry run python scripts/security/run_redteam.py \
--targets fastapi,sanitizer,pddl,guardrails \
--fail-fast \
--out reports/redteam_ci.json \
--out-md reports/redteam_ci.md
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
with:
name: redteam-reports
path: |
reports/redteam_ci.json
reports/redteam_ci.md
retention-days: 30
- name: Emit step summary
if: always()
run: |
if [ -f reports/redteam_ci.md ]; then
cat reports/redteam_ci.md >> "$GITHUB_STEP_SUMMARY"
else
echo "No red-team report produced" >> "$GITHUB_STEP_SUMMARY"
fi