name: Security Audit

on:
  push:
    branches: [main, dev]
    paths:
      - "**/Cargo.toml"
      - "**/Cargo.lock"
  schedule:
    - cron: "0 0 * * *" # Daily

jobs:
  audit:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v6
      - uses: taiki-e/install-action@cargo-audit
      - name: Strip path dependencies
        uses: ./.github/actions/strip-path-deps
      - run: cargo audit
