feat(all): progress #4
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: | |
schedule: | |
- cron: "0 2 * * *" | |
push: | |
branches: | |
- "main" | |
paths: | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- "crates/**/Cargo.toml" | |
- "deny.toml" | |
- ".github/workflows/security.yaml" | |
pull_request: | |
branches: | |
- "main" | |
paths: | |
- "Cargo.toml" | |
- "Cargo.lock" | |
- "crates/**/Cargo.toml" | |
- "deny.toml" | |
- ".github/workflows/security.yaml" | |
workflow_dispatch: | |
jobs: | |
security: | |
name: Security Audit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cache cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Install cargo-audit | |
run: cargo install cargo-audit | |
- name: Install cargo-machete | |
run: cargo install cargo-machete | |
- name: Install cargo-outdated | |
run: cargo install cargo-outdated | |
- name: Run cargo audit | |
run: cargo audit | |
continue-on-error: false | |
- name: Check for unused dependencies | |
run: cargo machete | |
continue-on-error: true | |
- name: Check for outdated dependencies | |
run: cargo outdated --exit-code 1 | |
continue-on-error: true | |
- name: Display dependency tree | |
run: cargo tree | |
continue-on-error: true | |
- name: Display dependency tree with duplicates | |
run: cargo tree --duplicates | |
continue-on-error: true | |
- name: Display dependency tree with licenses | |
run: cargo tree --format "{p} {l}" | |
continue-on-error: true |