Node Security
Scanning nodes execute external scripts and containers. To prevent malicious tasks from compromising the host or pivoting into internal networks, nodes implement multi-layer security defenses.
1. Core Security Defense Mechanisms
1.1 Binary Whitelist (Always Enforced)
For SHELL or CMD (local command execution) type tasks, only whitelisted executables are allowed.
- Default Whitelist: 90 built-in, commonly used security tools and system commands (e.g.,
nmap,nuclei,httpx,curl,python3). - Interception: Non-whitelisted commands are blocked, and the task is marked
FAILED.
NOTE
The binary whitelist is a client-side execution-layer sandbox. The platform also provides a Node Tool Whitelist (dispatch layer) that controls which tools' tasks a node pulls from the server. The two complement each other; see Node Management → Node Tool Whitelist.
1.2 Environment Variable Filtering
Before executing commands, the node automatically filters sensitive environment variables, including system variables, dynamic link hijacking variables, cloud provider credentials, and container management sockets, preventing credential leakage or shared library hijacking.
1.3 Container Volume Mount Restrictions
The Docker executor enforces strict mount limits:
- Allowed Paths: Only
/tmp/,/private/tmp/,/var/tmp/, and/opt/testnet/. - Blocked Paths:
/etc/,/var/run/docker.sock,/root/and other sensitive paths are blocked.
1.4 SSRF Protection (Allowed by Default — Harden Explicitly)
By default the node allows HTTP/DNS/TCP probing of internal network ranges (allow_ssrf defaults to true) to support scanning isolated internal segments. If the node runs on an untrusted network, enable protection explicitly:
- Once
allow_ssrfis set tofalse, all private ranges (10.0.0.0/8,172.16.0.0/12,192.168.0.0/16, etc.), loopback addresses, and link-local addresses are blocked to prevent scanning internal services. - With protection enabled, domain probes use dual verification (before and after DNS resolution) to prevent DNS rebinding bypasses.
1.5 Privileged Container Defense
The node allows privileged containers by default (allow_privileged defaults to true): tools like masscan rely on privileged containers to craft raw sockets, and denying it by default would reject all such scanning tasks. For deployments against untrusted networks, set it explicitly to false in config.yaml; any Docker scanning task declaring --privileged mode will then be rejected outright, preventing container escapes.
1.6 Native SHELL Execution Gate (Disabled by Default)
A SHELL-type task delivered by the server is equivalent to executing an arbitrary command string on the node — the highest-risk execution channel. The node rejects such tasks by default (allow_shell defaults to false); the standard 29 Docker/HTTP/DNS/TCP tools are unaffected. When genuinely needed, enable it explicitly via config or TESTNET_ALLOW_SHELL=true; every execution then emits a full audit log (command, arguments, workdir).
1.7 Well-Known Dev Secret Startup Guard (Production Safety)
To prevent production deployments from inadvertently adopting repository-public default credentials, the node inspects the client secret upon startup: if it detects the well-known development default (default-client-secret-for-dev-environment-32chars), the client strictly refuses to start. For controlled local development and integration testing, operators must pass --allow-insecure-dev on the CLI to explicitly exempt the startup check.
WARNING
allow_shell ships disabled; allow_privileged and allow_ssrf ship allowed (matching the product's authorized internal scanning and port-scanning purpose). Nodes on office/production networks should tighten allow_ssrf and allow_privileged explicitly as needed — see the next section.
2. Node Security Hardening Configuration
Customize security parameters via the client's config.yaml (or TESTNET_ prefixed environment variables):
# testnet-client config.yaml
server:
url: "https://your-server:3100"
secret: "your-node-secret"
node:
name: "hardened-node-01"
security:
# Allow SSRF probing of internal ranges (default: true).
# Set to false in production/office networks to block internal probing.
allow_ssrf: false
# Allow privileged containers (default: true; set false on untrusted networks).
# allow_privileged: false
# Allow server-delivered native SHELL commands (default: false, already off).
# Every execution emits an audit log when enabled.
# allow_shell: true
# Custom allowed mount directories (REPLACES the built-in default list
# /tmp/, /private/tmp/, /var/tmp/, /opt/testnet/ — not appended to it)
allowed_volume_paths:
- "/tmp/"
- "/opt/testnet/"Equivalent environment variables:
export TESTNET_ALLOW_SSRF="false"
export TESTNET_ALLOW_PRIVILEGED="false"
export TESTNET_ALLOWED_VOLUME_PATHS="/tmp/,/opt/testnet/"3. Spec Validation
Before deploying new tool DSLs, run the client's validate command for a local format check:
# Validate the spec's static format (required fields, types, timeouts, file fields, etc.)
./testnet-client validate --spec my-tool-spec.yamlNOTE
validate performs static format validation only. Security enforcement — volume paths, SSRF, privileged mode — happens at task execution time on the node, inside the security sandbox.