Skip to content
Merged
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
131 changes: 131 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Security Scan

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
# Run weekly on Sundays at midnight
- cron: "0 0 * * 0"

permissions:
contents: read
security-events: write

jobs:
# Python security scanning with Bandit
bandit:
name: Bandit Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Bandit
run: pip install bandit bandit-sarif-formatter

- name: Run Bandit
run: |
bandit -r src/ -f sarif -o bandit-results.sarif --severity-level medium --exit-zero

- name: Upload Bandit results to GitHub Security
uses: github/codeql-action/upload-sarif@v4
if: always() && hashFiles('bandit-results.sarif') != ''
with:
sarif_file: bandit-results.sarif
category: bandit

# Dependency vulnerability scanning
pip-audit:
name: Dependency Vulnerability Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
pip install pip-audit
pip install -e .

- name: Run pip-audit
run: |
pip-audit --skip-editable --format=json --output=pip-audit-results.json || true
pip-audit --skip-editable --desc || true

# Secret scanning with Gitleaks
gitleaks:
name: Secret Scanning
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run Gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}

# Docker image scanning with Trivy
trivy:
name: Container Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build Docker image
run: docker build -t dsagent:scan .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "dsagent:scan"
format: "sarif"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH,MEDIUM"

- name: Upload Trivy results to GitHub Security
uses: github/codeql-action/upload-sarif@v4
if: always() && hashFiles('trivy-results.sarif') != ''
with:
sarif_file: trivy-results.sarif
category: trivy

# OSSF Scorecard for repository security best practices
scorecard:
name: OSSF Scorecard
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Run Scorecard
uses: ossf/scorecard-action@v2.4.0
with:
results_file: scorecard-results.sarif
results_format: sarif

- name: Upload Scorecard results to GitHub Security
uses: github/codeql-action/upload-sarif@v4
if: always() && hashFiles('scorecard-results.sarif') != ''
with:
sarif_file: scorecard-results.sarif
category: scorecard
92 changes: 0 additions & 92 deletions demo/financial-mcp/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions demo/financial-mcp/mcp.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions demo/financial-mcp/portfolio.csv

This file was deleted.

51 changes: 0 additions & 51 deletions demo/financial-mcp/run_demo.sh

This file was deleted.

72 changes: 0 additions & 72 deletions examples/basic_usage.py

This file was deleted.

Loading