Skip to content

cargo audit and cargo deny #656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Cargo Audit

on:
push:
branches: [main]
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- ".github/workflows/cargo-audit.yml"
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- ".github/workflows/cargo-audit.yml"
schedule:
- cron: "0 0 * * 0" # Run weekly on Sundays at midnight

jobs:
cargo-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-audit
run: cargo install cargo-audit

- name: Run cargo audit
working-directory: ./libwasmvm
run: cargo audit
continue-on-error: ${{ github.event_name == 'schedule' }} # Don't fail scheduled runs

- name: Run cargo audit with ignore unmaintained
working-directory: ./libwasmvm
run: cargo audit --ignore RUSTSEC-2024-0436 --ignore RUSTSEC-2024-0370
# These are the unmaintained crates we're already tracking in deny.toml
34 changes: 34 additions & 0 deletions .github/workflows/cargo-deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Cargo Deny

on:
push:
branches: [main]
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "**/deny.toml"
- ".github/workflows/cargo-deny.yml"
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "**/deny.toml"
- ".github/workflows/cargo-deny.yml"

jobs:
cargo-deny:
runs-on: ubuntu-latest
strategy:
matrix:
checks:
# - advisories - this should be restored at some point
- bans
- sources
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
arguments: --all-features --exclude-dev
rust-version: stable
manifest-path: libwasmvm/Cargo.toml
2 changes: 1 addition & 1 deletion .github/workflows/lint-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23.4"
go-version: "1.24"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
Expand Down