Skip to content
Open
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
191 changes: 191 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
version: 2

updates:
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "github-actions"

# Root pyproject.toml
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

# requirements.txt files
- package-ecosystem: "pip"
directory: "/tutorials/17-data-streaming/confluent-modernization"
Comment on lines +24 to +26
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/13-full-stack-applications/ai-stylist"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/07-guardrails-and-safety/granite-guardian-webapp"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/07-guardrails-and-safety/ai-agent-security"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/bee-ai-multi-agent-contract-management"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/chatdev_watsonx_tutorial_"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/a2a_tutorial/beeai-a2a-client"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/a2a_tutorial/beeai-a2a-server"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/02-agents-and-orchestration/sql-agent-app"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/02-agents-and-orchestration/wxo-text-classification/product-review-sentiment-agent"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

# pyproject.toml files (uv / poetry / standard pip)
- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/my_retail_advisor"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/multiagent-collab-cs-call-center-analysis"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/acp_tutorial"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/acp_tutorial/beeai_agent_server"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/03-multi-agent-systems/acp_tutorial/crewai_agent_server"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

- package-ecosystem: "pip"
directory: "/tutorials/02-agents-and-orchestration/react-agent-it-support"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "python"

# npm
- package-ecosystem: "npm"
directory: "/tutorials/13-full-stack-applications/silly_story_time"
schedule:
interval: "weekly"
day: "monday"
groups:
npm-all:
patterns:
- "*"
labels:
- "dependencies"
- "javascript"

- package-ecosystem: "npm"
directory: "/tutorials/16-ibm-bob/mcp-server-integration-ibm-bob/arxiv-server"
schedule:
interval: "weekly"
day: "monday"
labels:
- "dependencies"
- "javascript"
42 changes: 42 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CodeQL Security Analysis

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Run every Monday at 09:00 UTC
- cron: "0 9 * * 1"

permissions:
contents: read
security-events: write

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [python, javascript-typescript]

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# Use the security-extended query suite for broader coverage
queries: security-extended

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
41 changes: 41 additions & 0 deletions .github/workflows/dependabot-auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Dependabot Auto-Approve

on:
pull_request:
types: [opened, synchronize]

permissions:
contents: write
pull-requests: write
issues: write

jobs:
auto-approve:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

# Auto-approve patch and minor updates — safe to merge with minimal review
- name: Auto-approve patch and minor updates
if: >-
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr review "$PR_URL" --approve --body "Auto-approved: patch/minor dependency update."
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Label major updates so they are easy to find and prioritise
- name: Label major updates for manual review
if: steps.metadata.outputs.update-type == 'version-update:semver-major'
run: |
gh pr edit "$PR_URL" --add-label "dependencies" || true
gh pr comment "$PR_URL" --body "⚠️ **Major version update detected.** Manual review and testing required before merging."
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Dependency Review

on:
pull_request:
branches: [main]

permissions:
contents: read
pull-requests: write

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
# Block PRs that introduce medium severity or higher vulnerabilities
fail-on-severity: moderate
# Allow these licenses (Apache, MIT, BSD, ISC are standard open source)
allow-licenses: >-
Apache-2.0, MIT, BSD-2-Clause, BSD-3-Clause, ISC, Python-2.0,
PSF-2.0, CC0-1.0, Unlicense, 0BSD
# Post a comment on the PR summarising any findings
comment-summary-in-pr: always
89 changes: 89 additions & 0 deletions .github/workflows/python-security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Python Security Scan

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Run every Monday at 09:00 UTC
- cron: "0 9 * * 1"

permissions:
contents: read
security-events: write

jobs:
pip-audit:
name: pip-audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install pip-audit
run: pip install pip-audit

# Audit each requirements.txt and pyproject.toml independently
- name: Audit requirements and pyproject files
run: |
exit_code=0
while IFS= read -r f; do
echo "=== Auditing $f ==="
if [[ "$f" == *"requirements"*".txt" ]]; then
if ! pip-audit -r "$f" --desc; then
echo "❌ Vulnerabilities found in $f"
exit_code=1
fi
elif [[ "$f" == *"pyproject.toml" ]]; then
dir=$(dirname "$f")
if ! (cd "$dir" && pip-audit --desc); then
echo "❌ Vulnerabilities found in $f"
exit_code=1
fi
fi
done < <(find . \( -name "requirements*.txt" -o -name "pyproject.toml" \) \
-not -path "*/node_modules/*" \
-not -path "*/.venv/*" \
-not -path "*/WareHouse/*")
exit $exit_code

bandit:
name: Bandit
runs-on: ubuntu-latest
steps:
- name: Checkout
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[sarif]

- name: Run Bandit
# Educational content intentionally uses patterns Bandit flags (e.g. hardcoded
# example passwords, subprocess calls) — treat as informational, not blocking.
continue-on-error: true
run: |
bandit -r tutorials/ \
--exclude tutorials/03-multi-agent-systems/chatdev_watsonx_tutorial_/WareHouse \
-f sarif \
-o bandit-results.sarif \
--severity-level medium \
--confidence-level medium \
-q

- name: Upload Bandit SARIF
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: bandit-results.sarif
category: bandit
Loading
Loading