kinjo 0.3.6

Kinjo: mDNS TUI and commands launch for local network services
Documentation
name: Security audit

# Checks both lockfiles against the RustSec advisory database. The weekly run
# catches advisories published against dependencies that have not changed.

on:
  push:
    branches: [ "main" ]
    paths: [ "Cargo.lock", "fuzz/Cargo.lock", ".github/workflows/audit.yml" ]
  pull_request:
    branches: [ "main" ]
    paths: [ "Cargo.lock", "fuzz/Cargo.lock", ".github/workflows/audit.yml" ]
  schedule:
    # Monday 04:00 UTC.
    - cron: '0 4 * * 1'
  workflow_dispatch:
  workflow_call:
    inputs:
      caller-run-id:
        description: >
          Run ID of the calling workflow. `github.event_name` cannot be used to
          detect a called run: inside a called workflow the github context is the
          caller's, so it is never 'workflow_call'.
        required: false
        type: string
        default: ""
      ref:
        description: >
          Exact commit to check out. Empty (the normal push/PR case) uses the
          triggering ref; a release caller pins its resolved release commit.
        required: false
        type: string
        default: ""

permissions:
  contents: read

concurrency:
  group: audit-${{ inputs.caller-run-id || github.ref }}
  cancel-in-progress: ${{ !inputs.caller-run-id }}

jobs:
  audit:
    runs-on: ubuntu-24.04
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
        with:
          ref: ${{ inputs.ref }}
          persist-credentials: false

      - name: Install cargo-audit
        uses: taiki-e/install-action@07b4745e0c39a41822af610387492e3e53aa222b # v2
        with:
          tool: cargo-audit@0.22.2

      - name: Audit dependencies
        run: |
          cargo audit
          cargo audit --file fuzz/Cargo.lock