Skip to content

Commit

Permalink
Refactor cargo-check action to cargo-deny
Browse files Browse the repository at this point in the history
  • Loading branch information
hatchan committed Apr 30, 2024
1 parent a540c2d commit 0d847bd
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/audit_rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Audit Rust code

on:
push:
branches: ["**"]
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "**/deny.toml"
schedule:
- cron: "43 1 * * *"
workflow_dispatch:

jobs:
rust_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

- uses: EmbarkStudios/cargo-deny-action@v1
with:
credentials: https://fiberplanebot:${{ secrets.PRIVATE_GITHUB_TOKEN }}@github.com/
49 changes: 49 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[advisories]
ignore = []
yanked = "deny"

[licenses]
allow = [
"0BSD",
"Apache-2.0 WITH LLVM-exception",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"CC0-1.0",
"ISC",
"MIT",
"MPL-2.0",
"OpenSSL",
"Unicode-DFS-2016",
"Unlicense",
"WTFPL",
"Zlib",
]
confidence-threshold = 0.8
exceptions = []

[[licenses.clarify]]
crate = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]

[licenses.private]
ignore = true

[bans]
multiple-versions = "allow"
wildcards = "allow"
highlight = "all"
workspace-default-features = "allow"
external-default-features = "allow"

deny = []

[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []

[sources.allow-org]
github = ["fiberplane", "autometrics-dev"]
1 change: 1 addition & 0 deletions examples/example-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ authors = ["Fiberplane <[email protected]>"]
edition = "2018"
name = "example-plugin"
version = "0.1.0"
publish = false

[lib]
crate-type = ["cdylib"]
Expand Down
1 change: 1 addition & 0 deletions examples/example-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ authors = ["Fiberplane <[email protected]>"]
edition = "2018"
name = "example-protocol"
version = "0.1.0"
publish = false

[dependencies]
bytes = { version = "1", features = ["serde"] }
Expand Down
1 change: 1 addition & 0 deletions examples/example-rust-wasmer2-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
edition = "2021"
name = "example-rust-wasmer2-runtime"
version = "0.1.0"
publish = false

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

Expand Down
1 change: 1 addition & 0 deletions examples/redux-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ authors = ["Fiberplane <[email protected]>"]
edition = "2018"
name = "redux-example"
version = "0.1.0"
publish = false

[dependencies]
fp-bindgen = {path = "../../fp-bindgen"}
Expand Down
1 change: 1 addition & 0 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "fp-bindgen-xtask"
version = "0.1.0"
edition = "2021"
publish = false

[dependencies]
anyhow = "1"
Expand Down

0 comments on commit 0d847bd

Please sign in to comment.