Skip to content

Commit 4e28919

Browse files
authored
Run cargo audit (#784)
1 parent 0f58dd8 commit 4e28919

6 files changed

Lines changed: 92 additions & 0 deletions

File tree

.github/workflows/cargo-audit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Cargo Audit
2+
3+
on:
4+
schedule:
5+
- cron: "0 6 * * *"
6+
7+
jobs:
8+
audit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Install Rust
15+
uses: dtolnay/rust-toolchain@stable
16+
17+
- name: Install cargo-audit
18+
run: cargo install cargo-audit --locked --version 0.22.0
19+
20+
- name: Run cargo audit
21+
run: cargo audit

.github/workflows/codeql.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CodeQL
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * 1"
6+
7+
jobs:
8+
analyze:
9+
name: Analyze
10+
runs-on: ubuntu-latest
11+
permissions:
12+
actions: read
13+
contents: read
14+
security-events: write
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
language: ["rust"]
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
28+
- name: Initialize CodeQL
29+
uses: github/codeql-action/init@v3
30+
with:
31+
languages: ${{ matrix.language }}
32+
33+
- name: Autobuild
34+
uses: github/codeql-action/autobuild@v3
35+
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v3

Cargo.lock

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ members = [
4040
"crates/job_runner",
4141
"crates/search_index",
4242
"crates/nft",
43+
"crates/nft_client",
4344
"crates/serde_serializers",
4445
"crates/number_formatter",
4546
"crates/prices_dex",

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ Run `just install` to install rust, typeshare
4949

5050
Run API locally: `cargo run --package api`
5151

52+
## Security Scanning
53+
54+
Run `just audit` to execute [`cargo-audit`](https://github.com/RustSec/rustsec/tree/main/cargo-audit) across the entire workspace. The command installs `cargo-audit` if needed and reports vulnerable or unmaintained dependencies surfaced via the RustSec advisory database. Treat the warnings as action items when possible, and file follow-up issues if immediate remediation is not feasible.
55+
5256
## Gemstone
5357

5458
Cross platform Rust library for iOS and Android with native async networking support.

justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ lint:
6868
@cargo clippy --version
6969
cargo clippy -- -D warnings
7070

71+
audit:
72+
@command -v cargo-audit >/dev/null || cargo install cargo-audit --locked --version 0.22.0
73+
cargo audit
74+
7175
unused:
7276
cargo install cargo-machete
7377
cargo machete

0 commit comments

Comments
 (0)