@ship.zone/runner 5.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +15 -0
- package/dist_rust/runnerworkspace_linux_amd64_musl +0 -0
- package/dist_rust/runnerworkspace_linux_amd64_musl.tsrust-build.json +4 -4
- package/dist_rust/runnerworkspace_linux_arm64_musl +0 -0
- package/dist_rust/runnerworkspace_linux_arm64_musl.tsrust-build.json +4 -4
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/cli.js +8 -6
- package/dist_ts/config.js +8 -5
- package/dist_ts/egress-proxy.d.ts +28 -0
- package/dist_ts/egress-proxy.js +320 -1
- package/dist_ts/microvm-executor.d.ts +1 -0
- package/dist_ts/microvm-executor.js +54 -3
- package/dist_ts/runner.js +7 -1
- package/dist_ts/vsock-protocol.d.ts +6 -1
- package/dist_ts/vsock-protocol.js +5 -2
- package/package.json +1 -1
- package/rust/src/cpio.rs +15 -5
- package/rust/src/egress.rs +556 -0
- package/rust/src/guest.rs +128 -23
- package/rust/src/lib.rs +1 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/cli.ts +6 -5
- package/ts/config.ts +9 -4
- package/ts/egress-proxy.ts +355 -0
- package/ts/microvm-executor.ts +64 -2
- package/ts/runner.ts +6 -0
- package/ts/vsock-protocol.ts +8 -2
package/rust/src/guest.rs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
use crate::egress::{run_egress_tunnel, EGRESS_VSOCK_PORT};
|
|
1
2
|
use crate::oci_tar::{
|
|
2
3
|
normalize_tar_path, read_tar_entries, write_tar_entry, write_tar_trailer, TarEntry,
|
|
3
4
|
TarEntryKind,
|
|
@@ -13,6 +14,8 @@ use std::os::unix::ffi::OsStrExt;
|
|
|
13
14
|
use std::os::unix::fs::{MetadataExt, OpenOptionsExt, PermissionsExt};
|
|
14
15
|
use std::os::unix::net::UnixListener;
|
|
15
16
|
use std::path::{Component, Path, PathBuf};
|
|
17
|
+
use std::sync::atomic::{AtomicU16, Ordering};
|
|
18
|
+
use std::sync::Arc;
|
|
16
19
|
use std::time::{Duration, Instant};
|
|
17
20
|
|
|
18
21
|
pub const VSOCK_PORT: u32 = 1024;
|
|
@@ -71,6 +74,8 @@ enum GuestRequest {
|
|
|
71
74
|
mode: Option<String>,
|
|
72
75
|
#[serde(default, rename = "npmrcContent")]
|
|
73
76
|
npmrc_content: Option<String>,
|
|
77
|
+
#[serde(default, rename = "enableEgress")]
|
|
78
|
+
enable_egress: bool,
|
|
74
79
|
},
|
|
75
80
|
ImportTar {
|
|
76
81
|
#[serde(rename = "maximumBytes")]
|
|
@@ -89,6 +94,8 @@ enum GuestRequest {
|
|
|
89
94
|
gid: u32,
|
|
90
95
|
#[serde(default, rename = "rootMode")]
|
|
91
96
|
root_mode: bool,
|
|
97
|
+
#[serde(default, rename = "egressEnabled")]
|
|
98
|
+
egress_enabled: bool,
|
|
92
99
|
#[serde(rename = "timeoutMs")]
|
|
93
100
|
timeout_ms: u64,
|
|
94
101
|
#[serde(rename = "memoryBytes")]
|
|
@@ -134,6 +141,8 @@ enum GuestRequest {
|
|
|
134
141
|
export_cache_dir: Option<String>,
|
|
135
142
|
#[serde(default, rename = "buildctlPath")]
|
|
136
143
|
buildctl_path: Option<String>,
|
|
144
|
+
#[serde(default, rename = "egressProxyUrl")]
|
|
145
|
+
egress_proxy_url: Option<String>,
|
|
137
146
|
},
|
|
138
147
|
ExportTar {
|
|
139
148
|
selections: Vec<String>,
|
|
@@ -164,6 +173,8 @@ struct HelloResponse {
|
|
|
164
173
|
#[serde(rename_all = "camelCase")]
|
|
165
174
|
struct SimpleOkResponse {
|
|
166
175
|
ok: bool,
|
|
176
|
+
#[serde(skip_serializing_if = "Option::is_none")]
|
|
177
|
+
egress_proxy_port: Option<u16>,
|
|
167
178
|
}
|
|
168
179
|
|
|
169
180
|
#[derive(Serialize)]
|
|
@@ -207,6 +218,7 @@ struct GuestContext {
|
|
|
207
218
|
workspace_dir: PathBuf,
|
|
208
219
|
npmrc_dir: Option<PathBuf>,
|
|
209
220
|
step_counter: u64,
|
|
221
|
+
egress_proxy_port: Arc<AtomicU16>,
|
|
210
222
|
}
|
|
211
223
|
|
|
212
224
|
fn read_frame<R: Read>(reader: &mut R) -> io::Result<Option<(u8, Vec<u8>)>> {
|
|
@@ -328,6 +340,7 @@ fn handle_connection<S: Read + Write + AsRawFd>(
|
|
|
328
340
|
gid,
|
|
329
341
|
mode,
|
|
330
342
|
npmrc_content,
|
|
343
|
+
enable_egress,
|
|
331
344
|
} => match prepare_workspace(
|
|
332
345
|
ctx,
|
|
333
346
|
workspace_size_bytes,
|
|
@@ -338,7 +351,31 @@ fn handle_connection<S: Read + Write + AsRawFd>(
|
|
|
338
351
|
npmrc_content.as_deref(),
|
|
339
352
|
) {
|
|
340
353
|
Ok(()) => {
|
|
341
|
-
let
|
|
354
|
+
let egress_proxy_port = if enable_egress {
|
|
355
|
+
let deadline = Instant::now() + Duration::from_secs(5);
|
|
356
|
+
let mut port = ctx.egress_proxy_port.load(Ordering::Acquire);
|
|
357
|
+
while port == 0 && Instant::now() < deadline {
|
|
358
|
+
std::thread::sleep(Duration::from_millis(10));
|
|
359
|
+
port = ctx.egress_proxy_port.load(Ordering::Acquire);
|
|
360
|
+
}
|
|
361
|
+
if port == 0 {
|
|
362
|
+
let _ = send_error(
|
|
363
|
+
stream,
|
|
364
|
+
"egress proxy tunnel was not established on vsock port 1025",
|
|
365
|
+
);
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
Some(port)
|
|
369
|
+
} else {
|
|
370
|
+
None
|
|
371
|
+
};
|
|
372
|
+
let _ = send_json(
|
|
373
|
+
stream,
|
|
374
|
+
&SimpleOkResponse {
|
|
375
|
+
ok: true,
|
|
376
|
+
egress_proxy_port,
|
|
377
|
+
},
|
|
378
|
+
);
|
|
342
379
|
}
|
|
343
380
|
Err(msg) => {
|
|
344
381
|
let _ = send_error(stream, msg);
|
|
@@ -387,6 +424,7 @@ fn handle_connection<S: Read + Write + AsRawFd>(
|
|
|
387
424
|
uid,
|
|
388
425
|
gid,
|
|
389
426
|
root_mode,
|
|
427
|
+
egress_enabled,
|
|
390
428
|
timeout_ms,
|
|
391
429
|
memory_bytes,
|
|
392
430
|
cpus,
|
|
@@ -408,6 +446,7 @@ fn handle_connection<S: Read + Write + AsRawFd>(
|
|
|
408
446
|
uid,
|
|
409
447
|
gid,
|
|
410
448
|
root_mode,
|
|
449
|
+
egress_enabled,
|
|
411
450
|
timeout_ms,
|
|
412
451
|
memory_bytes,
|
|
413
452
|
cpus,
|
|
@@ -443,6 +482,7 @@ fn handle_connection<S: Read + Write + AsRawFd>(
|
|
|
443
482
|
import_cache_dir,
|
|
444
483
|
export_cache_dir,
|
|
445
484
|
buildctl_path,
|
|
485
|
+
egress_proxy_url,
|
|
446
486
|
} => {
|
|
447
487
|
match execute_image_build(
|
|
448
488
|
stream,
|
|
@@ -464,6 +504,7 @@ fn handle_connection<S: Read + Write + AsRawFd>(
|
|
|
464
504
|
import_cache_dir,
|
|
465
505
|
export_cache_dir,
|
|
466
506
|
buildctl_path,
|
|
507
|
+
egress_proxy_url,
|
|
467
508
|
},
|
|
468
509
|
) {
|
|
469
510
|
Ok(res) => {
|
|
@@ -508,7 +549,13 @@ fn handle_connection<S: Read + Write + AsRawFd>(
|
|
|
508
549
|
}
|
|
509
550
|
},
|
|
510
551
|
GuestRequest::Shutdown => {
|
|
511
|
-
let _ = send_json(
|
|
552
|
+
let _ = send_json(
|
|
553
|
+
stream,
|
|
554
|
+
&SimpleOkResponse {
|
|
555
|
+
ok: true,
|
|
556
|
+
egress_proxy_port: None,
|
|
557
|
+
},
|
|
558
|
+
);
|
|
512
559
|
return Ok(true);
|
|
513
560
|
}
|
|
514
561
|
}
|
|
@@ -952,6 +999,7 @@ struct StepSpec {
|
|
|
952
999
|
uid: u32,
|
|
953
1000
|
gid: u32,
|
|
954
1001
|
root_mode: bool,
|
|
1002
|
+
egress_enabled: bool,
|
|
955
1003
|
timeout_ms: u64,
|
|
956
1004
|
memory_bytes: u64,
|
|
957
1005
|
cpus: f64,
|
|
@@ -1115,17 +1163,21 @@ unsafe fn setup_pid1_step_sandbox(
|
|
|
1115
1163
|
spec: &StepSpec,
|
|
1116
1164
|
) -> Result<(), &'static str> {
|
|
1117
1165
|
let oci_rootfs = target_rootfs;
|
|
1118
|
-
// Isolate mount, IPC, UTS, and
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1166
|
+
// Isolate mount, IPC, UTS, and (unless host-proxied egress is enabled) network namespaces.
|
|
1167
|
+
// Even with egress enabled, the Firecracker microVM has no NIC — only loopback (`lo`) —
|
|
1168
|
+
// so the step can reach only the guest-init loopback proxy backed by host vsock port 1025.
|
|
1169
|
+
let unshare_flags = if spec.egress_enabled {
|
|
1170
|
+
libc::CLONE_NEWNS | libc::CLONE_NEWIPC | libc::CLONE_NEWUTS
|
|
1171
|
+
} else {
|
|
1172
|
+
libc::CLONE_NEWNS | libc::CLONE_NEWIPC | libc::CLONE_NEWUTS | libc::CLONE_NEWNET
|
|
1173
|
+
};
|
|
1174
|
+
if unsafe { libc::unshare(unshare_flags) } != 0 {
|
|
1125
1175
|
return Err("unshare failed");
|
|
1126
1176
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1177
|
+
if !spec.egress_enabled {
|
|
1178
|
+
unsafe {
|
|
1179
|
+
bring_up_loopback();
|
|
1180
|
+
}
|
|
1129
1181
|
}
|
|
1130
1182
|
|
|
1131
1183
|
// Make all mounts private so our changes never leak back.
|
|
@@ -1276,21 +1328,31 @@ unsafe fn setup_pid1_step_sandbox(
|
|
|
1276
1328
|
}
|
|
1277
1329
|
}
|
|
1278
1330
|
|
|
1279
|
-
//
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1331
|
+
// Switch root into oci_rootfs inside our private mount namespace.
|
|
1332
|
+
// Note: pivot_root(2) returns EINVAL when current / is initramfs (rootfs), so use the
|
|
1333
|
+
// standard Linux switch_root sequence: chdir(new_root) -> mount(".", "/", MS_MOVE) -> chroot(".").
|
|
1334
|
+
if unsafe { libc::chdir(rootfs_c.as_ptr()) } != 0 {
|
|
1335
|
+
return Err("chdir oci_rootfs failed");
|
|
1336
|
+
}
|
|
1337
|
+
let dot = CString::new(".").unwrap();
|
|
1338
|
+
if unsafe {
|
|
1339
|
+
libc::mount(
|
|
1340
|
+
dot.as_ptr(),
|
|
1341
|
+
slash.as_ptr(),
|
|
1342
|
+
std::ptr::null(),
|
|
1343
|
+
libc::MS_MOVE,
|
|
1344
|
+
std::ptr::null(),
|
|
1345
|
+
)
|
|
1346
|
+
} != 0
|
|
1347
|
+
{
|
|
1348
|
+
return Err("mount MS_MOVE rootfs failed");
|
|
1349
|
+
}
|
|
1350
|
+
if unsafe { libc::chroot(dot.as_ptr()) } != 0 {
|
|
1351
|
+
return Err("chroot rootfs failed");
|
|
1285
1352
|
}
|
|
1286
1353
|
if unsafe { libc::chdir(slash.as_ptr()) } != 0 {
|
|
1287
1354
|
return Err("chdir / failed");
|
|
1288
1355
|
}
|
|
1289
|
-
let old_in_new = CString::new("/tmp/.oldroot").unwrap();
|
|
1290
|
-
unsafe {
|
|
1291
|
-
libc::umount2(old_in_new.as_ptr(), libc::MNT_DETACH);
|
|
1292
|
-
}
|
|
1293
|
-
let _ = fs::remove_dir("/tmp/.oldroot");
|
|
1294
1356
|
|
|
1295
1357
|
if !spec.root_mode {
|
|
1296
1358
|
// OCI mode: remount root filesystem read-only and drop all privileges to numeric uid:gid.
|
|
@@ -1666,6 +1728,7 @@ struct ImageBuildSpec {
|
|
|
1666
1728
|
import_cache_dir: Option<String>,
|
|
1667
1729
|
export_cache_dir: Option<String>,
|
|
1668
1730
|
buildctl_path: Option<String>,
|
|
1731
|
+
egress_proxy_url: Option<String>,
|
|
1669
1732
|
}
|
|
1670
1733
|
|
|
1671
1734
|
fn base64_encode(input: &[u8]) -> String {
|
|
@@ -1872,10 +1935,18 @@ fn execute_image_build<S: Read + Write + AsRawFd>(
|
|
|
1872
1935
|
.iter()
|
|
1873
1936
|
.map(|a| CString::new(a.as_bytes()).map_err(|_| "buildctl arg contains NUL".to_owned()))
|
|
1874
1937
|
.collect::<Result<_, _>>()?;
|
|
1875
|
-
let env_pairs = [
|
|
1938
|
+
let mut env_pairs = vec![
|
|
1876
1939
|
format!("DOCKER_CONFIG={}", docker_config_dir.display()),
|
|
1877
1940
|
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin".to_owned(),
|
|
1878
1941
|
];
|
|
1942
|
+
if let Some(ref proxy_url) = spec.egress_proxy_url {
|
|
1943
|
+
env_pairs.push(format!("HTTP_PROXY={proxy_url}"));
|
|
1944
|
+
env_pairs.push(format!("HTTPS_PROXY={proxy_url}"));
|
|
1945
|
+
env_pairs.push(format!("http_proxy={proxy_url}"));
|
|
1946
|
+
env_pairs.push(format!("https_proxy={proxy_url}"));
|
|
1947
|
+
env_pairs.push("NO_PROXY=localhost,127.0.0.1,::1".to_owned());
|
|
1948
|
+
env_pairs.push("no_proxy=localhost,127.0.0.1,::1".to_owned());
|
|
1949
|
+
}
|
|
1879
1950
|
let envp: Vec<CString> = env_pairs
|
|
1880
1951
|
.iter()
|
|
1881
1952
|
.map(|e| CString::new(e.as_bytes()).unwrap())
|
|
@@ -2106,6 +2177,38 @@ pub fn run_pid1() -> Result<(), Error> {
|
|
|
2106
2177
|
);
|
|
2107
2178
|
}
|
|
2108
2179
|
|
|
2180
|
+
#[cfg(target_os = "linux")]
|
|
2181
|
+
unsafe {
|
|
2182
|
+
bring_up_loopback();
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
let egress_proxy_port = Arc::new(AtomicU16::new(0));
|
|
2186
|
+
if let Ok(egress_listener) = listen_vsock(EGRESS_VSOCK_PORT) {
|
|
2187
|
+
let port_for_thread = Arc::clone(&egress_proxy_port);
|
|
2188
|
+
std::thread::spawn(move || loop {
|
|
2189
|
+
let client_fd = unsafe {
|
|
2190
|
+
libc::accept4(
|
|
2191
|
+
egress_listener.as_raw_fd(),
|
|
2192
|
+
std::ptr::null_mut(),
|
|
2193
|
+
std::ptr::null_mut(),
|
|
2194
|
+
libc::SOCK_CLOEXEC,
|
|
2195
|
+
)
|
|
2196
|
+
};
|
|
2197
|
+
if client_fd < 0 {
|
|
2198
|
+
if io::Error::last_os_error().kind() == io::ErrorKind::Interrupted {
|
|
2199
|
+
continue;
|
|
2200
|
+
}
|
|
2201
|
+
std::thread::sleep(Duration::from_millis(20));
|
|
2202
|
+
continue;
|
|
2203
|
+
}
|
|
2204
|
+
let writer_file = unsafe { File::from_raw_fd(client_fd) };
|
|
2205
|
+
let Ok(reader_file) = writer_file.try_clone() else {
|
|
2206
|
+
continue;
|
|
2207
|
+
};
|
|
2208
|
+
run_egress_tunnel(reader_file, writer_file, Arc::clone(&port_for_thread), 18080);
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2109
2212
|
let listener = listen_vsock(VSOCK_PORT)?;
|
|
2110
2213
|
let mut ctx = GuestContext {
|
|
2111
2214
|
pid1_mode: true,
|
|
@@ -2114,6 +2217,7 @@ pub fn run_pid1() -> Result<(), Error> {
|
|
|
2114
2217
|
workspace_dir: PathBuf::from("/workspace"),
|
|
2115
2218
|
npmrc_dir: None,
|
|
2116
2219
|
step_counter: 0,
|
|
2220
|
+
egress_proxy_port,
|
|
2117
2221
|
};
|
|
2118
2222
|
|
|
2119
2223
|
loop {
|
|
@@ -2166,6 +2270,7 @@ pub fn serve_unix_socket(
|
|
|
2166
2270
|
workspace_dir: workspace_dir.to_path_buf(),
|
|
2167
2271
|
npmrc_dir: None,
|
|
2168
2272
|
step_counter: 0,
|
|
2273
|
+
egress_proxy_port: Arc::new(AtomicU16::new(0)),
|
|
2169
2274
|
};
|
|
2170
2275
|
println!("listening");
|
|
2171
2276
|
let _ = io::stdout().flush();
|
package/rust/src/lib.rs
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/cli.ts
CHANGED
|
@@ -37,7 +37,7 @@ interface IParsedArguments {
|
|
|
37
37
|
|
|
38
38
|
const cliInvocation = 'ship-zone-runner';
|
|
39
39
|
|
|
40
|
-
const BOOLEAN_FLAGS = new Set<string>(['allow-insecure-loopback', 'from-systemd']);
|
|
40
|
+
const BOOLEAN_FLAGS = new Set<string>(['allow-insecure-loopback', 'allow-egress', 'from-systemd']);
|
|
41
41
|
const VALUE_OPTIONS = new Set<string>([
|
|
42
42
|
'config',
|
|
43
43
|
'control-plane',
|
|
@@ -59,8 +59,8 @@ const VALUE_OPTIONS = new Set<string>([
|
|
|
59
59
|
const usage = `ship.zone runner ${runnerVersion} (Firecracker microVM · ci-spec ${runnerSpecVersion})
|
|
60
60
|
|
|
61
61
|
Usage:
|
|
62
|
-
${cliInvocation} enroll --control-plane <url> [--config <path>] [--name <name>] [--labels <a,b>] [--kernel-path <path>] [--builder-rootfs-path <path> | --builder-image <ref@sha256:...>] [--smartvm-socket <path>]
|
|
63
|
-
${cliInvocation} init --control-plane <url> [--config <path>] [--name <name>] [--labels <a,b>] [--kernel-path <path>] [--builder-rootfs-path <path> | --builder-image <ref@sha256:...>] [--smartvm-socket <path>]
|
|
62
|
+
${cliInvocation} enroll --control-plane <url> [--config <path>] [--name <name>] [--labels <a,b>] [--allow-egress] [--kernel-path <path>] [--builder-rootfs-path <path> | --builder-image <ref@sha256:...>] [--smartvm-socket <path>]
|
|
63
|
+
${cliInvocation} init --control-plane <url> [--config <path>] [--name <name>] [--labels <a,b>] [--allow-egress] [--kernel-path <path>] [--builder-rootfs-path <path> | --builder-image <ref@sha256:...>] [--smartvm-socket <path>]
|
|
64
64
|
${cliInvocation} register [--config <path>]
|
|
65
65
|
${cliInvocation} run [--config <path>]
|
|
66
66
|
${cliInvocation} once [--config <path>]
|
|
@@ -99,9 +99,9 @@ export const parseArguments = (arguments_: string[]): IParsedArguments => {
|
|
|
99
99
|
'--profile was removed in 5.0.0; one unified microVM runner executes oci, vm, and oci-image jobs',
|
|
100
100
|
);
|
|
101
101
|
}
|
|
102
|
-
if (name === 'allow-
|
|
102
|
+
if (name === 'allow-network') {
|
|
103
103
|
throw new ConfigurationError(
|
|
104
|
-
`--${name} is not supported
|
|
104
|
+
`--${name} is not supported; use --allow-egress to enable host-enforced egress`,
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
throw new ConfigurationError(`Unknown option: --${name}`);
|
|
@@ -226,6 +226,7 @@ const buildConfigFromOptions = (
|
|
|
226
226
|
const helperPath = singleOption(options, 'workspace-helper-path');
|
|
227
227
|
if (helperPath) config.oci.workspaceHelperPath = helperPath;
|
|
228
228
|
if (flags.has('allow-insecure-loopback')) config.allowInsecureLoopback = true;
|
|
229
|
+
if (flags.has('allow-egress')) config.oci.allowedNetworks = ['none', 'egress'];
|
|
229
230
|
const blockedCidrs = listOption(options, 'egress-blocked-cidr');
|
|
230
231
|
if (blockedCidrs) config.oci.egressBlockedCidrs = blockedCidrs;
|
|
231
232
|
validateRunnerConfig(config);
|
package/ts/config.ts
CHANGED
|
@@ -188,13 +188,18 @@ const validTimestamp = (value: string): boolean => {
|
|
|
188
188
|
/**
|
|
189
189
|
* Network modes enforceable by the Firecracker microVM runner:
|
|
190
190
|
* - `none`: isolated guest namespace with loopback only.
|
|
191
|
-
*
|
|
192
|
-
* advertising `egress` is rejected fail-closed instead of silently running egress jobs offline.
|
|
191
|
+
* - `egress`: host-enforced DNS/IP/port/SNI/Host allowlist proxy tunneled over Firecracker AF_VSOCK.
|
|
193
192
|
*/
|
|
194
193
|
const requireEnforceableNetworks = (networks: readonly string[]): void => {
|
|
195
|
-
|
|
194
|
+
const valid = new Set(['none', 'egress']);
|
|
195
|
+
if (
|
|
196
|
+
networks.length === 0 ||
|
|
197
|
+
networks.length > 2 ||
|
|
198
|
+
new Set(networks).size !== networks.length ||
|
|
199
|
+
networks.some((entry) => !valid.has(entry))
|
|
200
|
+
) {
|
|
196
201
|
throw new ConfigurationError(
|
|
197
|
-
'oci.allowedNetworks must be ["none"
|
|
202
|
+
'oci.allowedNetworks must be a non-empty subset of ["none", "egress"]',
|
|
198
203
|
);
|
|
199
204
|
}
|
|
200
205
|
};
|