Refactor: Addressing SecObserve advisories #368
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 Checks | |
| on: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: "0" | |
| CARGO_PROFILE_DEV_DEBUG: "0" | |
| RUST_TOOLCHAIN_VERSION: "1.93.0" | |
| RUSTFLAGS: "-D warnings" | |
| RUSTDOCFLAGS: "-D warnings" | |
| RUST_LOG: "info" | |
| permissions: {} | |
| jobs: | |
| # Identify unused dependencies | |
| cargo-udeps: | |
| name: Run Cargo Udeps | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTC_BOOTSTRAP: 1 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install rust toolchain | |
| run: | | |
| rustup toolchain install "${RUST_TOOLCHAIN_VERSION}" | |
| rustup default "${RUST_TOOLCHAIN_VERSION}" | |
| - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| with: | |
| key: udeps | |
| - run: cargo install --locked cargo-udeps@0.1.60 | |
| - run: cargo udeps --all-targets --all-features | |
| cargo-deny: | |
| name: Run Cargo Deny | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| checks: | |
| - advisories | |
| - bans licenses sources | |
| # Prevent sudden announcement of a new advisory from failing ci: | |
| continue-on-error: ${{ matrix.checks == 'advisories' }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install rust toolchain | |
| run: | | |
| rustup toolchain install "${RUST_TOOLCHAIN_VERSION}" | |
| rustup default "${RUST_TOOLCHAIN_VERSION}" | |
| - uses: EmbarkStudios/cargo-deny-action@3fd3802e88374d3fe9159b834c7714ec57d6c979 # v2.0.15 | |
| with: | |
| command: check ${{ matrix.checks }} |