Skip to content

done?

done? #5

Workflow file for this run

name: py_audit
on:
push:
paths:
- "python/**"
- ".github/workflows/py_audit.yml"
pull_request:
paths:
- "python/**"
- ".github/workflows/py_audit.yml"
schedule:
- cron: "0 6 * * 1" # Weekly, Monday 06:00 UTC
permissions:
contents: read
jobs:
detect:
name: Detect Python code
runs-on: ubuntu-latest
outputs:
has_python: ${{ steps.check.outputs.has_python }}
steps:
- uses: actions/checkout@v4
- id: check
run: |
if [ -d "python" ] && find python -name "*.py" | grep -q .; then
echo "has_python=true" >> "$GITHUB_OUTPUT"
else
echo "has_python=false" >> "$GITHUB_OUTPUT"
fi
pip-audit:
name: pip-audit (${{ matrix.os }}, py${{ matrix.python-version }})
needs: detect
if: needs.detect.outputs.has_python == 'true'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package
working-directory: python
run: pip install .
- name: Run pip-audit
uses: pypa/gh-action-pip-audit@v1.1.0
with:
inputs: python/
vulnerability-service: osv