Modern QA2026CI Integration for Jailbreak Tests — tiles
Log inJoin
26 / 70 · 07 Security Testing for AI Apps · Jailbreak Testing← prev⊞ allnext →☰ Read as one page

4.6CI Integration for Jailbreak Tests

# .github/workflows/jailbreak-tests.yml
name: Jailbreak Security Tests
on:
  push:
    paths:
      - 'prompts/**'        # run when system prompts change
      - 'src/ai/**'         # run when AI code changes
  schedule:
    - cron: '0 6 * * 1'    # weekly Monday 6 AM

jobs:
  jailbreak-suite:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'
      - run: pip install -r requirements-test.txt

      - name: Run jailbreak test suite
        run: python -m pytest tests/security/jailbreak/ -v --tb=short
        env:
          AI_API_KEY: ${{ secrets.AI_API_KEY }}
          AI_ENDPOINT: ${{ secrets.AI_STAGING_ENDPOINT }}

      - name: Report results
        if: always()
        run: |
          python scripts/report_jailbreak_results.py \
            --results test-results.json \
            --slack-webhook ${{ secrets.SECURITY_SLACK_WEBHOOK }}