Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ai-redteam.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: AI Red-Team Security Gate

on:
pull_request:
branches: [main, master]

jobs:
red-team-audit:
runs-on: ubuntu-latest

# Optional: If you want to spin up Ollama as a service container in GitHub Actions
services:
ollama:
image: ollama/ollama:latest
ports:
- 11434:11434

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Pull Test Model in CI
run: |
curl -X POST http://localhost:11434/api/pull -d '{"name": "gemma4:latest"}'

- name: Run SawOne Agentic Red-Team Action
uses: hackin2minutes-oss/sawone-agentic-action@v1
with:
redteam-endpoint: "http://localhost:11434/v1/chat/completions"
model-name: "gemma4:latest"
severity: HIGH,CRITICAL
enforce: true # Fails the PR if safety guardrails fail

- name: Upload Red-Team Audit Report
if: always()
uses: actions/upload-artifact@v4
with:
name: redteam-audit-results
path: promptfoo-redteam.yaml
38 changes: 38 additions & 0 deletions .github/workflows/exploitability.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Exploitability analysis

on:
push:
branches: [exploitability]
workflow_dispatch:

permissions:
contents: read

jobs:
exploitability:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write # SARIF upload to Code Scanning
steps:
- uses: actions/checkout@v4

- name: Run Semgrep on the API
working-directory: api
run: pipx run semgrep==1.183.0 scan --config p/python --metrics=off --json --output ../semgrep.json .

- name: Run exploitability analysis
id: exploitability
uses: hackin2minutes-oss/hackin2minutes-oss-exploitability-action@v2.0.0
with:
reports: semgrep.json
project-dir: api
exposure: unknown
fail-on: confirmed_exploitable

- name: Upload SARIF to Code Scanning
if: always() && hashFiles('exploitability-report/universal.sarif') != ''
uses: github/codeql-action/upload-sarif@4bfa242aa49c5f7c6770b98670d354a7dfac05f8 # v3
with:
sarif_file: exploitability-report/universal.sarif
category: exploitability
35 changes: 35 additions & 0 deletions .github/workflows/nano.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Security Scan

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
sawone-security-scan:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
pull-requests: write

steps:
- name: Checkout Source Code
uses: actions/checkout@v4

- name: Run SawOne Agentic Scanner
uses: hackin2minutes-oss/sawone-agentic-action@v1
# zizmor: ignore[unpinned-uses]
with:
severity: HIGH,CRITICAL
enforce: false
languages: en,ar

- name: Upload Security Reports
if: always()
uses: actions/upload-artifact@v4
with:
name: sawone-agentic-reports
path: sawone-agentic-reports/
overwrite: true