Skip to content

Weekly Security Scan #2

Weekly Security Scan

Weekly Security Scan #2

name: Weekly Security Scan
on:
schedule:
# Run every Monday at 9:00 AM UTC
- cron: '0 9 * * 1'
workflow_dispatch: # Allow manual triggering from any branch
permissions:
contents: read
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Get package name and latest release version
id: get_info
run: |
PACKAGE_NAME=$(grep -E '^name = ' pyproject.toml | head -1 | sed 's/name = "\(.*\)"/\1/')
echo "package_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
echo "Package name: $PACKAGE_NAME"
LATEST_VERSION=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name' | sed 's/^v//')
echo "version=$LATEST_VERSION" >> $GITHUB_OUTPUT
echo "Latest version: $LATEST_VERSION"
- name: Run security scan with tox
env:
PACKAGE_NAME: ${{ steps.get_info.outputs.package_name }}
PACKAGE_VERSION: ${{ steps.get_info.outputs.version }}
run: tox -e security
timeout-minutes: 10