Skip to content

Commit 2e6abcf

Browse files
committed
Replace alert and log crates with audit crate
1 parent 88c5482 commit 2e6abcf

File tree

27 files changed

+811
-602
lines changed

27 files changed

+811
-602
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ members = [
77
"sandpolis",
88
"sandpolis-account",
99
"sandpolis-agent",
10-
"sandpolis-alert",
10+
"sandpolis-audit",
1111
"sandpolis-bootagent",
1212
"sandpolis-client",
1313
"sandpolis-database",
@@ -17,7 +17,6 @@ members = [
1717
"sandpolis-group",
1818
"sandpolis-instance",
1919
"sandpolis-location",
20-
"sandpolis-logs",
2120
"sandpolis-macros",
2221
"sandpolis-mobile",
2322
"sandpolis-network",
@@ -47,12 +46,14 @@ colored = "3.0.0"
4746
futures = "0.3.30"
4847
futures-util = "0.3.31"
4948
image = "0.25.5"
49+
native_db = "0.8.1"
50+
native_model = "0.4.20"
5051
os_info = "3.8.2"
5152
pem = "3.0.4"
5253
rand = "0.9.0"
5354
regex = "1.11.1"
5455
ring = "0.17.8"
55-
russh = { version = "0.51.1" }
56+
russh = { version = "0.52.0" }
5657
rustls = "0.23.21"
5758
serde_bytes = "0.11.15"
5859
serde_cbor = "0.11.2"

sandpolis-account/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ license = "AGPL-3.0-only"
55
name = "sandpolis-account"
66
version = "0.0.1"
77

8+
[build-dependencies]
9+
built = { version = "0.8", features = ["git2", "chrono", "semver"] }
10+
811
[dependencies]
912
anyhow = { workspace = true }
1013
validator = { workspace = true }

sandpolis-account/build.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use std::{env, path::PathBuf};
2+
3+
fn main() {
4+
if built::write_built_file().is_err() {
5+
let dest =
6+
std::path::Path::new(&env::var("OUT_DIR").expect("OUT_DIR not set")).join("built.rs");
7+
built::write_built_file_with_opts(Some(&PathBuf::from("..")), &dest)
8+
.expect("Failed to acquire build-time information");
9+
}
10+
}

sandpolis-agent/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ serde = { workspace = true }
1111
axum = { workspace = true }
1212
axum-macros = { workspace = true }
1313
clap = { workspace = true }
14-
tokio-cron-scheduler = { version = "0.13.0", optional = true }
14+
tokio-cron-scheduler = { version = "0.14.0", optional = true }
1515
sandpolis-network = { path = "../sandpolis-network", version = "0.0.1" }
1616
sandpolis-database = { path = "../sandpolis-database", version = "0.0.1" }
1717

sandpolis-alert/CHANGELOG.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

sandpolis-alert/Cargo.toml

Lines changed: 0 additions & 14 deletions
This file was deleted.

sandpolis-alert/src/lib.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

sandpolis-audit/Cargo.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[package]
2+
description = "Virtual estate monitoring & management!"
3+
edition = "2024"
4+
license = "AGPL-3.0-only"
5+
name = "sandpolis-audit"
6+
version = "0.0.1"
7+
8+
[dependencies]
9+
anyhow = { workspace = true }
10+
serde = { workspace = true }
11+
linux-audit-parser = "0.2.7"
12+
native_db = { workspace = true }
13+
native_model = { workspace = true }
14+
sandpolis-instance = { path = "../sandpolis-instance", version = "0.0.1" }
15+
sandpolis-database = { path = "../sandpolis-database", version = "0.0.1" }
16+
17+
[features]
18+
server = []
19+
agent = []
20+
client = []

sandpolis-audit/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Sandpolis audit layer
2+
3+
This layer reads logs, audit events, and checks file signatures.
4+
5+
### Auditd
6+
7+
Integrates with Linux's auditd framework.

0 commit comments

Comments
 (0)