name: Audit Dependencies

on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main
    paths:
      - '.github/workflows/audit.yaml'
      - '**/Cargo.toml'
      - '**/Cargo.lock'
  schedule:
    - cron: '0 0 * * *'
  workflow_dispatch:

concurrency:
  group: audit-${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read
  issues: write

jobs:
  audit:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v7
        with:
          persist-credentials: false

      - uses: actions-rust-lang/audit@v1
        name: Audit Rust Dependencies
