-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions pipeline for security and memory safety checks.
Add GitHub Actions pipeline for security and memory safety checks.
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Security and Memory Safety | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
security-and-safety: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Install Clippy | ||
run: rustup component add clippy | ||
|
||
- name: Install Rustfmt | ||
run: rustup component add rustfmt | ||
|
||
- name: Install Miri | ||
run: rustup component add miri | ||
|
||
- name: Run Clippy (Linter) | ||
run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
- name: Run Rustfmt (Code Formatting) | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Run Miri (Memory Safety Checker) | ||
run: cargo miri run --all-targets | ||
|
||
- name: Run Security Audits | ||
run: cargo audit | ||
|
||
- name: Install AddressSanitizer | ||
run: rustup component add sanitizer | ||
|
||
- name: Run AddressSanitizer | ||
run: cargo build --release --features=asan | ||
|