Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.malbox.app/llms.txt

Use this file to discover all available pages before exploring further.

This page documents all plugin configuration options. For conceptual information, see Plugin Configuration.

Plugin Types

TypeDescription
GuestExecutes within sandboxed environments (VMs, containers). Terminated with sandbox after task completion.
HostExecutes directly on the host system with full resource access. Can persist across multiple tasks.

Execution Contexts

ContextDescription
ExclusivePlugin runs alone, no other plugins execute simultaneously
SequentialPlugins run one at a time in defined order
ParallelCompatible plugins run concurrently
UnrestrictedNo coordination required, can run alongside any plugin

State Management

ModeDescription
PersistentPersists across tasks, host plugins only
EphemeralFresh state per task, no persistence
ScopedSelective sharing with specific plugins or tasks

Runtime Configuration

The [runtime] section in plugin.toml controls how the guest plugin runtime behaves. All values are baked into the plugin binary at compile time.
[runtime]
state      = "ephemeral"              # or "persistent", "scoped"
execution  = "exclusive"              # or "sequential", "parallel", "unrestricted"
port       = 50051
log_filter = "info"

[runtime.paths]
sample_dir       = "/tmp/malbox/samples"
artifact_dir     = "/tmp/malbox/artifacts"
stash_dir        = "/tmp/malbox/stash"
log_dir          = "/tmp/malbox/logs"
external_log_dir = "/tmp/malbox/ext-logs"

[runtime.stash]
threshold_bytes = 1048576
ttl_secs        = 120

[runtime.auto_collect.artifacts]
enabled  = true
include  = ["**/*"]
exclude  = []
max_file_size = 52428800

[runtime.auto_collect.external_logs]
enabled  = true
include  = ["**/*"]
exclude  = []
max_file_size = 52428800
state and execution are required. All other fields are optional with sensible defaults.
FieldTypeRequiredDefaultDescription
statestringYes-Plugin state management mode ("ephemeral", "persistent", or "scoped").
executionstringYes-Execution context ("exclusive", "sequential", "parallel", or "unrestricted").
portu16No50051gRPC listen port. Must be >= 1024. Guest plugins only.
log_filterstringNo"info"Tracing directive string (same syntax as tracing_subscriber::EnvFilter). Examples: "info", "debug", "info,hyper=warn".

[runtime.paths]

FieldTypeDefault (unix)Default (windows)Description
sample_dirstring/tmp/malbox/samplesC:\malbox\samplesWhere the daemon pushes the sample for analysis.
artifact_dirstring/tmp/malbox/artifactsC:\malbox\artifactsWhere the plugin writes output artifacts. Auto-collected after task execution.
stash_dirstring/tmp/malbox/stashC:\malbox\stashInternal result stash spillover directory.
log_dirstring/tmp/malbox/logsC:\malbox\logsSDK-internal log overflow files directory.
external_log_dirstring/tmp/malbox/ext-logsC:\malbox\ext-logsExternal log files from kernel drivers or other tools. Auto-collected after task execution.

[runtime.stash]

FieldTypeDefaultDescription
threshold_bytesinteger1048576 (1 MiB)Result payloads larger than this are spilled to disk via the result stash. Must be >= 4096.
ttl_secsinteger120How long stashed result entries are kept before TTL sweep reclaims them. Must be >= 1.

[runtime.auto_collect]

Controls automatic file collection from artifact_dir and external_log_dir after each task completes. Files in these directories are streamed back to the daemon as results without the plugin needing to send them explicitly via push_result.
For artifacts, files that were already sent explicitly (via ctx.push_result(PluginResult::file(...))) or marked via ctx.mark_collected() are skipped to avoid duplicates. External logs are always collected without dedup.

[runtime.auto_collect.artifacts]

FieldTypeDefaultDescription
enabledbooltrueWhether to auto-collect files from artifact_dir.
includestring[]["**/*"]Glob patterns for files to include.
excludestring[][]Glob patterns for files to exclude.
max_file_sizeinteger52428800 (50 MiB)Files larger than this are skipped.

[runtime.auto_collect.external_logs]

FieldTypeDefaultDescription
enabledbooltrueWhether to auto-collect files from external_log_dir.
includestring[]["**/*"]Glob patterns for files to include.
excludestring[][]Glob patterns for files to exclude.
max_file_sizeinteger52428800 (50 MiB)Files larger than this are skipped.
Changing any runtime setting requires rebuilding the plugin.The daemon validates the [runtime] section when scanning plugin manifests.Plugins with invalid values (e.g., a relative sample_dir or a port below 1024) are marked Invalid in the registry and will not be started.