name: Security audit

on:
  workflow_dispatch:
  push:
    paths:
      - "**/Cargo.toml"
      - "**/Cargo.lock"
      - ".github/workflows/audit.yml"
  schedule:
    - cron: "0 0 * * *"

jobs:
  security_audit:
    name: Audit check
    runs-on: ubuntu-24.04
    permissions:
      checks: write
      contents: read
      issues: write
    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
      - uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
