feat(worker): sandboxed decode child skeleton — rlimits, traced seccomp allowlist, pure-Rust decoders, libwebp in the child, parent RIFF check, musl image with test stage
This commit is contained in:
1 parent
2a38fa37b5
commit
3970cdca52
13 files changed
+1435
No files matched your search
@@ -0,0 +1,33 @@
|
||||
//! Exit codes of the `decode` child, reserved away from 1 (generic failure), 101 (Rust
|
||||
//! panic) and signal deaths (reported separately by the parent). The parent maps them to
|
||||
//! the closed rejection reasons of STEP8_FILES_ANALYSIS II.7.
|
||||
|
||||
pub const OK: i32 = 0;
|
||||
pub const USAGE: i32 = 2;
|
||||
pub const ENV_NOT_EMPTY: i32 = 10;
|
||||
pub const SANDBOX_FAILED: i32 = 11;
|
||||
pub const INPUT_TOO_LARGE: i32 = 12;
|
||||
pub const UNSUPPORTED_TYPE: i32 = 13;
|
||||
pub const DECODE_FAILED: i32 = 14;
|
||||
pub const DIMENSIONS: i32 = 15;
|
||||
pub const ENCODE_FAILED: i32 = 16;
|
||||
pub const OUTPUT_FAILED: i32 = 17;
|
||||
pub const INTERNAL: i32 = 18;
|
||||
|
||||
/// Stable name of an exit code for logs and tests.
|
||||
pub fn name(code: i32) -> &'static str {
|
||||
match code {
|
||||
OK => "ok",
|
||||
USAGE => "usage",
|
||||
ENV_NOT_EMPTY => "env_not_empty",
|
||||
SANDBOX_FAILED => "sandbox_failed",
|
||||
INPUT_TOO_LARGE => "input_too_large",
|
||||
UNSUPPORTED_TYPE => "unsupported_type",
|
||||
DECODE_FAILED => "decode_failed",
|
||||
DIMENSIONS => "dimensions",
|
||||
ENCODE_FAILED => "encode_failed",
|
||||
OUTPUT_FAILED => "output_failed",
|
||||
INTERNAL => "internal",
|
||||
_ => "unknown",
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user