Skip to content

Commit

Permalink
Integrate cargo deny in the CI / CD pipeline
Browse files Browse the repository at this point in the history
Cargo deny is a Rust tool used to enforce and manage linting rules and policy compliance in a project. It allows developers to configure and enforce rules related to code quality, dependency management, and security, ensuring that code adheres to specific standards.
  • Loading branch information
francois141 authored and CharlyCst committed Sep 18, 2024
1 parent 2e8dad2 commit ba92730
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 0 deletions.
2 changes: 2 additions & 0 deletions benchmark_analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "benchmark_analyzer"
version = "0.1.0"
edition = "2021"

license = "MIT"

[lib]
name = "benchmark"

Expand Down
2 changes: 2 additions & 0 deletions crates/abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "miralis_abi"
version = "0.1.0"
edition = "2021"

license = "MIT"

[dependencies]
miralis_core = { path = "../core" }
log = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions crates/config_helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "config_helpers"
version = "0.1.0"
edition = "2021"

license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
1 change: 1 addition & 0 deletions crates/config_select/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "config_select"
version = "0.1.0"
edition = "2021"
license = "MIT"

[lib]
proc-macro = true
Expand Down
2 changes: 2 additions & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ name = "miralis_core"
version = "0.1.0"
edition = "2021"

license = "MIT"

[dependencies]
24 changes: 24 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Cargo deny configuration
#
# See https://embarkstudios.github.io/cargo-deny/index.html for reference.

[output]
feature-depth = 1

[licenses]
allow = [
"MIT",
"Apache-2.0",
"Unicode-DFS-2016",
]

confidence-threshold = 0.8

[bans]
multiple-versions = "warn"
wildcards = "allow" # Required when using relative path dependencies

[sources]
unknown-registry = "warn"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
2 changes: 2 additions & 0 deletions firmware/benchmark/csr_write/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "csr_write"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "csr_write"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/benchmark/ecall_benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "ecall_benchmark"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "ecall_benchmark"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/breakpoint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "breakpoint"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "breakpoint"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/csr_ops/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "csr_ops"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "csr_ops"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/default/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "default"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "default"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "device"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "device"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/ecall/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "ecall"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "ecall"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/interrupt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "interrupt"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "interrupt"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/mcause/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "mcause"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "mcause"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/mepc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "mepc"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "mepc"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/mret/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "mret"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "mret"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/os_ctx_switch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "os_ctx_switch"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "os_ctx_switch"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/os_ecall/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "os_ecall"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "os_ecall"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/pmp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "pmp"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "pmp"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/sandbox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "sandbox"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "sandbox"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/vectored_mtvec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "vectored_mtvec"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "vectored_mtvec"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions payload/hello_world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "hello_world"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "hello_world"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "runner"
version = "0.1.0"
edition = "2021"

license = "MIT"

[dependencies]
clap = { version = "4.4.11", features = ["derive"] }
serde = { version = "1.0.196", features = ["derive"] }
Expand Down
2 changes: 2 additions & 0 deletions src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "miralis"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "miralis"
path = "main.rs"
Expand Down

0 comments on commit ba92730

Please sign in to comment.