Skip to main content
isol8 supports fetching source code from remote URLs before execution. This is useful for GitHub-hosted scripts, Gists, and pinned CI inputs.

Overview

Remote code execution via URL is controlled by:
  1. Request fields (codeUrl, codeHash, allowInsecureCodeUrl)
  2. CLI flags (--url, --github, --gist, --hash, --allow-insecure-code-url)
  3. Policy config (remoteCode in isol8.config.json)
code and codeUrl are mutually exclusive. Use one or the other per execution request.

Enable In Config

Remote URL fetching is disabled by default. Enable it in isol8.config.json:

CLI Usage

TypeScript API

Policy Fields

boolean
default:"false"
Enables remote source fetching. If false, codeUrl requests are rejected.
string[]
default:"[\"https\"]"
Allowed URL schemes for source fetches.
string[]
default:"[]"
Regex allowlist for hostnames. Empty means all hosts are allowed unless blocked.
string[]
default:"[localhost/private ranges/metadata]"
Regex blocklist for hostnames. Applied before execution to reduce SSRF risk.
number
default:"10485760"
Maximum source size in bytes. Fetch aborts if exceeded.
number
default:"30000"
Timeout for source download.
boolean
default:"false"
Requires codeHash on every URL-based execution.
boolean
default:"true"
Cache toggle for remote source policy.
number
default:"3600"
Cache TTL in seconds for remote source policy.

Security Model

Remote source fetching includes:
  • Scheme checks (https by default)
  • Host allow/block regex checks
  • DNS/IP checks that block loopback/private/link-local targets
  • Size limits and fetch timeout enforcement
  • UTF-8 decoding + binary-content rejection
  • SHA-256 integrity verification when codeHash is provided (or required)

Interaction With Runtime Network Flags

remoteCode controls pre-execution source download.
--net, --allow, and --deny control network access from code running inside the container.
They are separate controls and should be configured independently.

Server Mode

When using isol8 serve + RemoteIsol8, URL fetching happens on the server side.
The server policy (remoteCode in server config) is what enforces URL restrictions.
  1. remoteCode.enabled: true
  2. allowedSchemes: ["https"]
  3. Restrictive allowedHosts
  4. requireHash: true
  5. Conservative maxCodeSize and fetchTimeoutMs
  6. Use immutable references (commit SHAs/tags), not mutable branches