Skip to content

Commit

Permalink
chore: Add rust audit GitHub action (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
azhur authored Dec 16, 2024
1 parent bd8990c commit b53f5dc
Show file tree
Hide file tree
Showing 22 changed files with 35 additions and 142 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/audit-rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Audit Rust Dependencies

on:
push:
branches:
- main
pull_request:

jobs:
audit:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

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

- name: Run cargo audit
run: cargo audit
26 changes: 1 addition & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,8 @@ anyhow = "1.0.75"
argon2 = "0.5.2"
async-trait = "0.1.74"
axum = { version = "0.7.7", features = ["json", "query", "tower-log", "http1"] }
backon = "1.2.0"
base62 = "2.0.2"
base64 = "0.22.0"
bigdecimal = "0.4.3"
blake3 = "1.5.0"
build-info = "0.0.39"
build-info-build = "0.0.39"
bytes = "1.5.0"
Expand Down Expand Up @@ -73,25 +70,20 @@ fluent-static-codegen = "0.5.0"
futures = "0.3.28"
futures-lite = "2.3.0"
futures-util = { version = "0.3.29", features = [] }
headers = "0.4.0"
hex = "0.4.3"
hmac = "0.12.1"
hmac-sha256 = "1.1.7"
http = { version = "1.1.0" }
http-body = "1.0.1"
http-types = "2.12.0"
humantime = { version = "2.1.0" }
hyper = { version = "1.4.1", default-features = false }
image = "0.25.2"
init-tracing-opentelemetry = { version = "0.24.1", features = ["tracing_subscriber_ext"] }
itertools = "0.13.0"
jsonwebtoken = "9.2.0"
lapin = "2.5.0"
lazy_static = "1"
log = "0.4.20"
maud = "0.26.0"
miette = { version = "7.0.0", default-features = false }
mockito = "1.2.0"
moka = { version = "0.12.3", features = ["log", "logging", "sync"] }
nanoid = "0.4.0"
ndarray = "0.15.6"
Expand All @@ -104,8 +96,6 @@ opentelemetry-otlp = { version = "0.27.0", features = ["trace", "metrics", "logs
opentelemetry_sdk = { version = "0.27.0", features = ["trace", "metrics", "rt-tokio", "rt-tokio-current-thread"] }
pbjson-build = "0.7.0"
pin-project = "1.1.3"
postgres = "0.19.7"
postgres-types = { version = "0.2.6", default-features = false }
proc-macro2 = { version = "1.0.78" }
prost = "0.13.3"
prost-build = "0.13.3"
Expand All @@ -116,11 +106,7 @@ rand = "0.8.5"
rand_chacha = "0.3.1"
rand_distr = "0.4.3"
rdkafka = "0.37.0"
regex = "1"
reqwest = { version = "0.12.5", default-features = false }
reqwest-middleware = "0.4.0"
reqwest-retry = "0.7.0"
ring = "0.17.8"
rstest = "0.23.0"
rust_decimal = "1.32.0"
rust_decimal_macros = "1.32.0"
Expand All @@ -136,50 +122,41 @@ serde_qs = "0.13.0"
serde_yaml = "0.9.30"
sha2 = "0.10.8"
shellexpand = "3.1.0"
svix = { version = "1.42.0", default-features = false }
svix = { version = "1.44.0", default-features = false }
syn = "2.0.52"
strum = { version = "0.26", default-features = false }
tap = "1.0.1"
tempfile = "3.12.0"
testcontainers = "0.23.1"
testcontainers-modules = { version = "0.11.2", default-features = false }
thiserror = "2.0.3"
time = "0.3.36"
tokio = { version = "1.33.0", default-features = false }
tokio-postgres = { version = "0.7.7", default-features = false }
tokio-postgres-rustls = "0.13.0"
tokio-stream = "0.1.14"
tokio-test = { version = "0.4.3" }
tokio-util = "0.7.10"
tonic = "0.12.3"
tonic-build = "0.12.3"
tonic-health = "0.12.3"
tonic-reflection = "0.12.3"
tonic-tracing-opentelemetry = "0.24.0"
tonic-types = "0.12.2"
tonic-web = "0.12.3"
tower = { version = "0.5.0" }
tower-http = { version = "0.6.1", features = ["full"] }
tower-layer = { version = "0.3.3" }
tower-service = { version = "0.3.3" }
tracing = { version = "0.1.39", features = ["log"] }
tracing-futures = "0.2.5"
tracing-log = "0.2.0"
tracing-opentelemetry = { version = "0.28.0" }
tracing-subscriber = { version = "0.3.18", features = ["registry", "tracing-log", "fmt", "env-filter", "json"] }
typetag = "0.2.13"
unic-langid = "0.9"
url = "2.4.1"
uuid = "1.4.1"
uuid7 = "1.0.0"
utoipa = { version = "5.2.0", features = ["axum_extras", "uuid", "debug"] }
utoipa-axum = { version = "0.1.2" }
utoipa-swagger-ui = { version = "8.0.3", features = ["axum"] }
utoipa-redoc = { version = "5.0.0", features = ["axum"] }
utoipa-rapidoc = { version = "5.0.0", features = ["axum"] }
utoipa-scalar = { version = "0.2.0", features = ["axum"] }


# TODO prefix it all
common-build-info = { path = "crates/common-build-info" }
common-domain = { path = "crates/common-domain" }
Expand All @@ -198,4 +175,3 @@ metering = { path = "modules/metering" }
diesel-models = { path = "modules/meteroid/crates/diesel-models" }
meteroid-store = { path = "modules/meteroid/crates/meteroid-store" }
meteroid-invoicing = { path = "modules/meteroid/crates/meteroid-invoicing" }

2 changes: 2 additions & 0 deletions audit.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[advisories]
ignore = []
16 changes: 0 additions & 16 deletions crates/common-grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ license.workspace = true
common-config.workspace = true
common-logging = { workspace = true }
common-grpc-error-as-tonic-macros = { workspace = true }
diesel.workspace = true
deadpool-postgres.workspace = true
diesel-derive-enum.workspace = true
diesel-async.workspace = true

cached = { workspace = true, features = ["async", "tokio"] }
prost.workspace = true
anyhow.workspace = true
chrono = { workspace = true, features = ["clock"] }
Expand All @@ -25,25 +19,16 @@ serde_json.workspace = true
http = { workspace = true }
moka = { workspace = true }
tonic = { workspace = true }
tonic-types = { workspace = true }
tonic-tracing-opentelemetry.workspace = true
tower = { workspace = true }
tower-layer = { workspace = true }
tower-service = { workspace = true }
tower-http = { workspace = true }
hyper = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-log = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
tracing-opentelemetry = { workspace = true }
opentelemetry = { workspace = true }
once_cell = { workspace = true }
http-body = { workspace = true }
futures = { workspace = true }
futures-util = { workspace = true }
pin-project = { workspace = true }
blake3 = { workspace = true }
hex = { workspace = true }

argon2 = { workspace = true }
Expand All @@ -52,7 +37,6 @@ uuid = { workspace = true, features = ["serde"] }
hmac = { workspace = true }
sha2 = { workspace = true }
secrecy = { workspace = true }
jsonwebtoken.workspace = true

[build-dependencies]
prost-build.workspace = true
Expand Down
5 changes: 0 additions & 5 deletions crates/common-logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@ edition.workspace = true

[dependencies]
common-config.workspace = true
envconfig.workspace = true
tracing = { workspace = true }
tracing-log = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
tracing-opentelemetry = { workspace = true }
opentelemetry = { workspace = true }
opentelemetry-otlp = { workspace = true }
opentelemetry_sdk = { workspace = true }
init-tracing-opentelemetry = { workspace = true }
once_cell = { workspace = true }
log = { workspace = true }
tonic = { workspace = true }

2 changes: 0 additions & 2 deletions crates/common-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ edition.workspace = true
license.workspace = true

[dependencies]
uuid = { workspace = true, features = ["v4", "v7"] }
uuid7 = { workspace = true }
thiserror = { workspace = true, optional = true }
error-stack = { workspace = true, optional = true }
anyhow = { workspace = true, optional = true }
Expand Down
1 change: 0 additions & 1 deletion crates/distributed-lock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edition.workspace = true
license.workspace = true

[dependencies]
uuid.workspace = true
async-trait.workspace = true
thiserror.workspace = true
log = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion crates/kafka/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ serde = { workspace = true }
serde_json.workspace = true
log = { workspace = true }
anyhow = { workspace = true }
uuid = { workspace = true }
chrono = { workspace = true, features = ["clock", "serde"] }
2 changes: 1 addition & 1 deletion docker/develop/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
- meteroid_net

svix-server:
image: "docker.io/svix/svix-server:v1.42.0"
image: "docker.io/svix/svix-server:v1.44.0"
environment:
SVIX_JWT_SECRET: ${SVIX_JWT_SECRET:-changeMeSecret}
SVIX_DB_DSN: postgresql://${DATABASE_USER:-meteroid}:${DATABASE_PASSWORD:-meteroid}@pgbouncer/svix
Expand Down
14 changes: 1 addition & 13 deletions extra/generator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,21 @@
[package]
name = "generator"
name = "meteroid-generator"
version = "0.1.0"
rust-version.workspace = true
edition.workspace = true
license.workspace = true

[dependencies]
thiserror.workspace = true
dotenvy.workspace = true
chrono = { workspace = true, features = ["clock"] }
common-grpc = { workspace = true, features = ["client"] }
futures.workspace = true
log.workspace = true
serde.workspace = true
shellexpand.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread", "signal"] }
tokio-stream.workspace = true
tonic.workspace = true
tonic-web.workspace = true
tonic-tracing-opentelemetry.workspace = true
tracing = { workspace = true }
tracing-opentelemetry = { workspace = true }
tracing-subscriber = { workspace = true }
uuid.workspace = true
tracing-log = { workspace = true }
anyhow.workspace = true
metering-grpc = { workspace = true, features = ["client"] }
prost-types.workspace = true
common-logging.workspace = true
fastrand.workspace = true
serde_yaml.workspace = true
argon2.workspace = true
5 changes: 0 additions & 5 deletions modules/adapters/openstack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ tokio = { workspace = true, features = ["full"] }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
hmac = { workspace = true }
chrono = { workspace = true, features = ["clock", "serde"] }
hex = { workspace = true }
reqwest = { workspace = true, features = ["default"] }
log = { workspace = true }
lapin = { workspace = true }
futures-lite = { workspace = true }
Expand All @@ -23,4 +19,3 @@ dotenvy.workspace = true
metering-grpc = { workspace = true, features = ["client"] }
tonic.workspace = true
common-grpc = { workspace = true, features = ["client"] }
tower = { workspace = true }
5 changes: 0 additions & 5 deletions modules/adapters/slurm-collector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
chrono = { workspace = true, features = ["clock", "serde"] }
reqwest = { workspace = true, features = ["default", "json"] }
rusqlite = { version = "0.32.1", features = ["bundled"] }
env_logger = { workspace = true }
log = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
Expand All @@ -21,9 +19,6 @@ futures-util = { workspace = true }
metering-grpc = { workspace = true, features = ["client"] }
tonic.workspace = true
common-grpc = { workspace = true, features = ["client"] }
tower = { workspace = true }


[dev-dependencies]
mockito = { workspace = true }
tempfile = { workspace = true }
10 changes: 1 addition & 9 deletions modules/metering/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ license.workspace = true
[dependencies]
rand.workspace = true
async-trait.workspace = true
backon.workspace = true
cached = { workspace = true, features = ["async", "tokio", "redis_store", "redis_tokio"] }
chrono = { workspace = true, features = ["clock", "serde"] }
chrono-tz.workspace = true
Expand All @@ -23,29 +22,22 @@ log.workspace = true
metering-grpc = { workspace = true, features = ["server"] }
meteroid-grpc = { workspace = true, features = ["client"] }
common-grpc = { workspace = true, features = ["server", "client"] }
reqwest = { workspace = true }
rust_decimal = { workspace = true }
serde.workspace = true
serde_json.workspace = true
tap.workspace = true
thiserror.workspace = true
tokio = { workspace = true, features = ["full"] }
tonic.workspace = true
tonic-health.workspace = true
tonic-reflection.workspace = true
tower = { workspace = true }
tower-layer = { workspace = true }
tower-service = { workspace = true }
tower-http = { workspace = true }
hyper = { workspace = true }
tracing = { workspace = true }
tracing-log = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }
tonic-tracing-opentelemetry.workspace = true
once_cell = { workspace = true }
opentelemetry = { workspace = true }
uuid = { workspace = true, features = ["v4"] }
common-utils = { workspace = true, features = ["error-stack-conv"] }
prost-types.workspace = true
quick_cache.workspace = true

Expand All @@ -65,4 +57,4 @@ path = "src/bin/server.rs"
default = ["clickhouse", "kafka"]
kafka = ["dep:kafka", "dep:rdkafka"]
clickhouse = ["dep:clickhouse-rs"]
openstack = []
openstack = []
Loading

0 comments on commit b53f5dc

Please sign in to comment.