Skip to content

Commit eec98be

Browse files
authored
Server: add automatic security auditing for PR/main. (#285)
Adds security and license auditing via cargo-deny.
1 parent 25ff291 commit eec98be

File tree

4 files changed

+103
-1
lines changed

4 files changed

+103
-1
lines changed

.github/workflows/server-security.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Server Security
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '**/Cargo.toml'
9+
- '**/Cargo.lock'
10+
pull_request:
11+
paths:
12+
- '**/Cargo.toml'
13+
- '**/Cargo.lock'
14+
15+
jobs:
16+
security_audit:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: EmbarkStudios/cargo-deny-action@v1
21+
with:
22+
arguments: --manifest-path=server/Cargo.toml

deny.toml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
targets = [
2+
{ triple = "x86_64-pc-windows-gnu" },
3+
{ triple = "x86_64-unknown-linux-musl" },
4+
{ triple = "x86_64-apple-darwin" },
5+
{ triple = "aarch64-apple-darwin" },
6+
]
7+
8+
[advisories]
9+
db-path = "~/.cargo/advisory-db"
10+
db-urls = ["https://github.com/rustsec/advisory-db"]
11+
vulnerability = "deny"
12+
unmaintained = "warn"
13+
yanked = "deny"
14+
notice = "warn"
15+
ignore = [
16+
# TODO: Update `time` crate when possible. Old versions are currently required for `sqlx` and
17+
# `sea-orm`
18+
"RUSTSEC-2020-0071",
19+
20+
# TODO: Eliminate `chrono` crate when `time` update is possible.
21+
"RUSTSEC-2020-0159",
22+
]
23+
24+
[licenses]
25+
unlicensed = "deny"
26+
allow = [
27+
"Apache-2.0",
28+
"BSD-2-Clause",
29+
"BSD-3-Clause",
30+
"ISC",
31+
"MIT",
32+
"MPL-2.0",
33+
"OpenSSL",
34+
]
35+
deny = []
36+
copyleft = "deny"
37+
allow-osi-fsf-free = "neither"
38+
default = "deny"
39+
confidence-threshold = 0.8
40+
exceptions = [
41+
#{ allow = ["Zlib"], name = "adler32", version = "*" },
42+
]
43+
44+
[[licenses.clarify]]
45+
name = "ring"
46+
version = "*"
47+
expression = "MIT AND ISC AND OpenSSL"
48+
license-files = [
49+
{ path = "LICENSE", hash = 0xbd0eed23 }
50+
]
51+
52+
[[licenses.clarify]]
53+
name = "encoding_rs"
54+
version = "0.8.30"
55+
expression = "MIT OR Apache-2.0"
56+
license-files = [
57+
{ path = "COPYRIGHT", hash = 0x39f8ad31 }
58+
]
59+
60+
# TODO: Include internal crates
61+
[licenses.private]
62+
ignore = false
63+
registries = []
64+
65+
[bans]
66+
multiple-versions = "warn"
67+
wildcards = "allow"
68+
highlight = "all"
69+
allow = []
70+
deny = []
71+
skip = []
72+
skip-tree = []
73+
74+
[sources]
75+
unknown-registry = "warn"
76+
unknown-git = "warn"
77+
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
78+
allow-git = []
79+

server/svix-server/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ serde_urlencoded = "0.7.1"
3131
serde_path_to_error = "0.1.7"
3232
num_enum = "0.5.6"
3333
enum_dispatch = "0.3.8"
34-
regex = "1.5.4"
34+
regex = "1.5.5"
3535
lazy_static = "1.4.0"
3636
figment = { version = "0.10", features = ["toml", "env"] }
3737
tracing = "0.1.29"

server/svix-server_derive/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "svix-server_derive"
33
version = "0.1.0"
44
edition = "2021"
55
publish = false
6+
license = "MIT"
67

78
[lib]
89
proc-macro = true

0 commit comments

Comments
 (0)