network:* capabilities gate outbound and inbound network access. They are enforced by the runtime preload (for node code running server-side) and by the Service Worker (for browser fetch() calls from the editor).
Capability table
| Capability | What it gates |
|---|---|
network:http | Outbound http.request() / https.request() / http.get() via the http/https built-in modules |
network:fetch | globalThis.fetch() |
network:socket | Outbound raw TCP/UDP/TLS via require('net').createConnection(), require('dgram').createSocket(), require('tls').connect() — these bypass network:http entirely |
network:dns | DNS lookups via require('dns') / require('dns/promises') / require('node:dns') |
network:listen | Inbound connections: http.createServer(), https.createServer(), net.createServer() — opens a listening port on the host (backdoor vector) |
Shorthand expansions
| Shorthand | Expands to |
|---|---|
network:all | network:http + network:fetch + network:socket + network:dns + network:listen |
The two-check model for HTTP and fetch
Fornetwork:http and network:fetch, two checks must both pass before the call is allowed:
- Capability gate — does the calling package hold
network:httpornetwork:fetch? - URL allowlist — is the target URL in
sentinel.networkPolicy.allowlist?
Blocked operation warning format
settings.js examples
Basic HTTP grant
HTTP grant with URL allowlist
Raw socket grant
DNS grant
Gap — network:socket has no allowlist equivalent
Gap — network:socket has no allowlist equivalent
The URL allowlist (
sentinel.networkPolicy.allowlist) only applies to network:http and network:fetch. A package granted network:socket can connect raw TCP/UDP to any host and port with no further restriction. A host/port allowlist for sockets is not yet designed.Gap — network:dns has no allowlist equivalent
Gap — network:dns has no allowlist equivalent
DNS queries go to the system resolver and cannot be restricted by the HTTP allowlist. DNS is a known data-exfiltration channel — subdomains can encode data as queries against an attacker-controlled nameserver. A domain allowlist for DNS would require a separate mechanism. Grant
network:dns only to packages with a genuine, audited need.