Security Audit #263
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Security Audit | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| schedule: | |
| # Run security audit daily at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| jobs: | |
| security_audit: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| issues: write | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Run security audit | |
| uses: rustsec/audit-check@v2.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| dependency_check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Install stable toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Cache cargo-machete | |
| uses: actions/cache@v4 | |
| id: cache-machete | |
| with: | |
| path: ~/.cargo/bin/cargo-machete | |
| key: cargo-machete-${{ runner.os }} | |
| - name: Install cargo-machete | |
| if: steps.cache-machete.outputs.cache-hit != 'true' | |
| run: cargo install cargo-machete | |
| - name: Check for unused dependencies | |
| run: cargo machete |