Keyed parent on ureq 3 (rustls + ring, bundled roots), no async runtime: config from the environment (secret never printed, JWT expiry logged), JSON line logs with a field allowlist (child stderr escaped and truncated), strict key validation before any URL, Backend trait over PostgREST RPCs and Storage objects with closed error kinds, one job per claim with the STORAGE.md §3.4 mapping (content codes, processing_error on signals / timeout / overflow, Broken stops the loop with exit 20, a refused commit deletes nothing), sweeper (expire pending, purge queue, quarantine leftovers), per-stage watchdog (exit 21), WORKER_ONCE for tests, run --check extended. 11 loop tests on a fake backend and decoder; sandbox tests and seccomp derivation unchanged (the child still makes the same 7 syscalls); image 11.6 MB.
47 lines
1.4 KiB
TOML
47 lines
1.4 KiB
TOML
[package]
|
|
name = "faunosteo-worker"
|
|
description = "Faunosteo file-processing worker: keyed job loop and sweeper (R1), sandboxed decode child (R0)"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
publish.workspace = true
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "faunosteo-worker"
|
|
path = "src/main.rs"
|
|
|
|
[features]
|
|
default = []
|
|
# Extra subcommands and flags for the sandbox tests and the seccomp derivation
|
|
# (crates/worker/Dockerfile stage `test`); never part of a release build.
|
|
test-hooks = ["dep:crc32fast", "dep:flate2"]
|
|
|
|
[dependencies]
|
|
image.workspace = true
|
|
libwebp-sys.workspace = true
|
|
seccompiler.workspace = true
|
|
rlimit.workspace = true
|
|
libc.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
ureq.workspace = true
|
|
sha2.workspace = true
|
|
crc32fast = { version = "1.4", optional = true }
|
|
# Already in the tree through png: used by the iCCP-bomb fixture only.
|
|
flate2 = { version = "1.1", optional = true }
|
|
|
|
# The worker owns I/O (it is the process boundary), so the core's disallowed_methods lint is
|
|
# off here. unsafe stays denied crate-wide; the libwebp FFI and the prctl call carry a local
|
|
# #[allow(unsafe_code)] with a SAFETY comment each (forbid would not allow the local override).
|
|
[lints.rust]
|
|
unsafe_code = "deny"
|
|
|
|
[lints.clippy]
|
|
unwrap_used = "deny"
|
|
expect_used = "deny"
|
|
disallowed_methods = "allow"
|