microsandbox-rb 0.10.0 → 0.11.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +95 -0
- data/Cargo.lock +74 -95
- data/README.md +12 -9
- data/ext/microsandbox/Cargo.toml +4 -4
- data/ext/microsandbox/src/error.rs +4 -0
- data/ext/microsandbox/src/image.rs +38 -0
- data/ext/microsandbox/src/sandbox.rs +165 -37
- data/ext/microsandbox/src/snapshot.rs +79 -35
- data/lib/microsandbox/errors.rb +4 -0
- data/lib/microsandbox/image.rb +38 -0
- data/lib/microsandbox/network.rb +139 -31
- data/lib/microsandbox/root_disk.rb +58 -0
- data/lib/microsandbox/sandbox.rb +108 -22
- data/lib/microsandbox/snapshot.rb +87 -37
- data/lib/microsandbox/version.rb +2 -2
- data/lib/microsandbox.rb +1 -0
- data/sig/microsandbox.rbs +32 -11
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 05d5b2e1200b6aff7dc7801259558a202064a01cac529ea55f2390790b7f84bb
|
|
4
|
+
data.tar.gz: d4d357393a51e2b642dd9d6fc6e899a6a92a3895bf98495a01714fbdbb76c0ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 994d487f8a606de2664566519ba28964fcc1053e9277b768945472dfac105d34a48479b1677d8598fde596b4d5c9f37a31970d2cf3e3a2065f98a12fdfe85322
|
|
7
|
+
data.tar.gz: c0d57191ef9fc97845c773216dd19194dbad4dd0c58f3525989d16df0c37088749fe880ccd89b53d71f9f9454c149429886de208b36cda2de4210f23b4bc05f8
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,101 @@ All notable changes to this gem are documented here. The format is based on
|
|
|
6
6
|
microsandbox runtime it embeds; each release notes the upstream runtime tag it
|
|
7
7
|
wraps, and the README's Versioning section keeps the full gem→runtime map.
|
|
8
8
|
|
|
9
|
+
## [0.11.0] - 2026-07-27
|
|
10
|
+
|
|
11
|
+
Adopts upstream runtime **`v0.6.6` → `v0.6.7`** and mirrors its breaking SDK
|
|
12
|
+
surface, keeping parity with the Python/Node SDKs (which ship the same renames
|
|
13
|
+
without compatibility aliases). The bundled runtime also carries the fix for
|
|
14
|
+
**GHSA-4vq3-cjpp-v7fg** (`msb copy` symlink traversal: a sandboxed workload
|
|
15
|
+
could make a later CLI copy-out overwrite an arbitrary host file — the SDK
|
|
16
|
+
`fs`/`copy_to_host` paths were not affected).
|
|
17
|
+
|
|
18
|
+
### Breaking
|
|
19
|
+
|
|
20
|
+
- **Network presets `public_only`/`non_local` are removed** (upstream #1198),
|
|
21
|
+
replaced by composable **profiles** `:public` / `:private` / `:host`:
|
|
22
|
+
`network: [:public, :private]`, single-profile sugar `network: :public`, or
|
|
23
|
+
`NetworkPolicy.from_profiles(:public, :host)`. Any non-empty profile set
|
|
24
|
+
automatically allows gateway DNS. The replacements are rule-for-rule
|
|
25
|
+
equivalent (`public_only` ≡ `[:public]`, which is still the default policy;
|
|
26
|
+
`non_local` ≡ `[:public, :private]`); the removed spellings (and
|
|
27
|
+
`NetworkPolicy.public_only`/`.non_local`) now raise an `ArgumentError` with
|
|
28
|
+
that migration guidance. `network: :none`/`:allow_all` (and their aliases)
|
|
29
|
+
and `network: :default` keep working unchanged. In the Hash form,
|
|
30
|
+
`profiles:` composes with `rules:`/`default_egress:`/`default_ingress:`/deny
|
|
31
|
+
lists; explicit `rules:` are evaluated **before** the profile expansion
|
|
32
|
+
(matching the upstream CLI), so a narrower override such as
|
|
33
|
+
`Rule.deny_dns` wins over a profile's allows under first-match-wins.
|
|
34
|
+
- **`Snapshot.create` is re-keyed by the snapshot's own name** (upstream
|
|
35
|
+
#1118): `Snapshot.create(name, from_sandbox:, dest_dir:, labels:, force:,
|
|
36
|
+
record_integrity:, resumable:)` — the positional argument is now the
|
|
37
|
+
snapshot name (was: the source sandbox), `from_sandbox:` is required, and
|
|
38
|
+
`path:` is replaced by `dest_dir:`, a **parent directory** (the artifact
|
|
39
|
+
always lands at `dest_dir/<name>`). `record_integrity:` is now a no-op
|
|
40
|
+
(schema-1 descriptors always record integrity); `resumable:` is accepted and
|
|
41
|
+
raises `UnsupportedError` until VM pause/resume lands upstream.
|
|
42
|
+
- **`Snapshot.export`/`Snapshot.import` are renamed `Snapshot.save`/
|
|
43
|
+
`Snapshot.load`** (same parameters), matching the Python/Node rename.
|
|
44
|
+
- **`SandboxHandle#snapshot_to` is removed** (deleted upstream). Use
|
|
45
|
+
`Snapshot.create(name, from_sandbox: handle_name, dest_dir: dir)` for
|
|
46
|
+
explicit placement.
|
|
47
|
+
- **`SnapshotVerifyReport#not_recorded?` is removed** and `#status` is always
|
|
48
|
+
`:verified`: integrity is now mandatory at snapshot-create time, so the
|
|
49
|
+
"not recorded" outcome no longer exists (a mismatch raises
|
|
50
|
+
`SnapshotIntegrityError` as before).
|
|
51
|
+
- **`SnapshotInfo#size_bytes`/`#format`/`#fstype` are now nilable** — nil for
|
|
52
|
+
the new checkpoint-state snapshots (file-state snapshots, the only kind
|
|
53
|
+
producible today, still populate all three).
|
|
54
|
+
|
|
55
|
+
### Added
|
|
56
|
+
|
|
57
|
+
- **Structured root disk** (upstream #1165) — `Sandbox.create(root_disk:)`
|
|
58
|
+
configures the OCI sandbox's writable layer: an Integer (managed ext4 upper
|
|
59
|
+
size cap in MiB, the old `oci_upper_size:` meaning), or a `RootDisk` factory
|
|
60
|
+
Hash: `RootDisk.managed(8192)`, `RootDisk.tmpfs(2048)` (RAM-backed, pristine
|
|
61
|
+
rootfs on every boot; size ≤ sandbox memory; not snapshot/patchable), or
|
|
62
|
+
`RootDisk.disk("./scratch.img", format:, fstype:)` (user-supplied image
|
|
63
|
+
attached writable; never created/resized/deleted by the runtime).
|
|
64
|
+
`oci_upper_size:` remains as a deprecated alias (warns; conflicts with
|
|
65
|
+
`root_disk:`).
|
|
66
|
+
- **`Image.load` / `Image.save`** (upstream #1151/#1174) — move OCI images in
|
|
67
|
+
and out of the local cache as `docker save`-style or OCI Image Layout
|
|
68
|
+
archives: `Image.load("./app.tar", tag: "app:dev")` (pass `"-"` to read
|
|
69
|
+
stdin; returns the loaded `ImageInfo`s) and
|
|
70
|
+
`Image.save("alpine:latest", output_path: "./alpine.tar", format: :docker)`.
|
|
71
|
+
- **`Rule.allow_dns` / `Rule.deny_dns`** — the gateway-DNS rule pair the
|
|
72
|
+
profiles expand to (egress → group `:host`, udp+tcp, port 53), for use in
|
|
73
|
+
custom policies (`deny_dns` upstream #1198).
|
|
74
|
+
- **Snapshot descriptor metadata** on `SnapshotInfo`: `#scope` (`:disk` /
|
|
75
|
+
`:resumable`), `#state_kind` (`"file"`/`"checkpoint"`), `#checkpoint_id`,
|
|
76
|
+
`#checkpoint_manifest_digest`, and the index columns `#locality`,
|
|
77
|
+
`#availability`, `#migration_state`, `#migration_error_code`.
|
|
78
|
+
- **`SnapshotMigrationError`** — raised when the automatic v0.6.6→v0.6.7
|
|
79
|
+
snapshot-descriptor migration is blocked and needs repair (new core
|
|
80
|
+
`SnapshotMigration` variant, upstream #1200).
|
|
81
|
+
- **`follow_root_symlinks:` volume flag** — per-mount opt-out of the runtime's
|
|
82
|
+
new default-on mount-root symlink protection (upstream #1149; bind/named
|
|
83
|
+
mounts only). The Rust SDK exposes the same switch; Python/Node defer it.
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
|
|
87
|
+
- **Snapshot artifacts migrate on first use** (upstream #1200): the runtime
|
|
88
|
+
rewrites each v0.6.6 `manifest.json` descriptor to the v0.6.7
|
|
89
|
+
`snapshot.json` (keeping the old file as `.manifest.json.legacy`) at backend
|
|
90
|
+
connect, after which gems ≤ 0.10.x can no longer read those artifacts —
|
|
91
|
+
rolling back requires the upstream `msb self downgrade` tooling.
|
|
92
|
+
- **Bind/named mount roots refuse symlinked roots by default** (upstream
|
|
93
|
+
#1149) — opt out per mount with `follow_root_symlinks: true`.
|
|
94
|
+
- **DNS rebind protection is fail-closed for unspecified addresses** (upstream
|
|
95
|
+
#1198): `0.0.0.0`/`::` no longer classify as `public`, so a `public`-profile
|
|
96
|
+
sandbox can't be steered to them via DNS answers.
|
|
97
|
+
- `ModificationPlan` change/conflict entries for the managed upper now report
|
|
98
|
+
`field: "root_disk_size"` (was `"oci_upper_size"`) — the runtime's canonical
|
|
99
|
+
field name, passed through verbatim as always.
|
|
100
|
+
- Duplicate secret placeholders across secret entries are now allowed
|
|
101
|
+
(upstream #1178); snapshotting a tmpfs or disk-image root disk fails with a
|
|
102
|
+
purposeful `InvalidConfigError` (upstream #1169).
|
|
103
|
+
|
|
9
104
|
## [0.10.0] - 2026-07-09
|
|
10
105
|
|
|
11
106
|
Ruby bindings for the additive `v0.6.6` SDK surface (upstream #1099 / #1128),
|
data/Cargo.lock
CHANGED
|
@@ -1552,24 +1552,6 @@ version = "1.1.1"
|
|
|
1552
1552
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1553
1553
|
checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"
|
|
1554
1554
|
|
|
1555
|
-
[[package]]
|
|
1556
|
-
name = "endian-type"
|
|
1557
|
-
version = "0.1.2"
|
|
1558
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1559
|
-
checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
|
|
1560
|
-
|
|
1561
|
-
[[package]]
|
|
1562
|
-
name = "enum-as-inner"
|
|
1563
|
-
version = "0.6.1"
|
|
1564
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1565
|
-
checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc"
|
|
1566
|
-
dependencies = [
|
|
1567
|
-
"heck 0.5.0",
|
|
1568
|
-
"proc-macro2",
|
|
1569
|
-
"quote",
|
|
1570
|
-
"syn",
|
|
1571
|
-
]
|
|
1572
|
-
|
|
1573
1555
|
[[package]]
|
|
1574
1556
|
name = "enum_dispatch"
|
|
1575
1557
|
version = "0.3.13"
|
|
@@ -1616,7 +1598,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1616
1598
|
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
|
1617
1599
|
dependencies = [
|
|
1618
1600
|
"libc",
|
|
1619
|
-
"windows-sys 0.
|
|
1601
|
+
"windows-sys 0.59.0",
|
|
1620
1602
|
]
|
|
1621
1603
|
|
|
1622
1604
|
[[package]]
|
|
@@ -1906,11 +1888,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
1906
1888
|
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
|
1907
1889
|
dependencies = [
|
|
1908
1890
|
"cfg-if",
|
|
1909
|
-
"js-sys",
|
|
1910
1891
|
"libc",
|
|
1911
1892
|
"r-efi 5.3.0",
|
|
1912
1893
|
"wasip2",
|
|
1913
|
-
"wasm-bindgen",
|
|
1914
1894
|
]
|
|
1915
1895
|
|
|
1916
1896
|
[[package]]
|
|
@@ -2095,48 +2075,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
2095
2075
|
checksum = "e712f64ec3850b98572bffac52e2c6f282b29fe6c5fa6d42334b30be438d95c1"
|
|
2096
2076
|
|
|
2097
2077
|
[[package]]
|
|
2098
|
-
name = "hickory-
|
|
2099
|
-
version = "0.26.
|
|
2078
|
+
name = "hickory-net"
|
|
2079
|
+
version = "0.26.1"
|
|
2100
2080
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2101
|
-
checksum = "
|
|
2081
|
+
checksum = "e2295ed2f9c31e471e1428a8f88a3f0e1f4b27c15049592138d1eebe9c35b183"
|
|
2102
2082
|
dependencies = [
|
|
2083
|
+
"async-trait",
|
|
2084
|
+
"bytes",
|
|
2103
2085
|
"cfg-if",
|
|
2104
2086
|
"data-encoding",
|
|
2105
2087
|
"futures-channel",
|
|
2088
|
+
"futures-io",
|
|
2106
2089
|
"futures-util",
|
|
2107
2090
|
"hickory-proto",
|
|
2108
|
-
"
|
|
2109
|
-
"
|
|
2110
|
-
"
|
|
2091
|
+
"idna",
|
|
2092
|
+
"ipnet",
|
|
2093
|
+
"jni 0.22.4",
|
|
2094
|
+
"rand 0.10.2",
|
|
2095
|
+
"rustls",
|
|
2111
2096
|
"thiserror 2.0.18",
|
|
2097
|
+
"tinyvec",
|
|
2112
2098
|
"tokio",
|
|
2099
|
+
"tokio-rustls",
|
|
2113
2100
|
"tracing",
|
|
2101
|
+
"url",
|
|
2114
2102
|
]
|
|
2115
2103
|
|
|
2116
2104
|
[[package]]
|
|
2117
2105
|
name = "hickory-proto"
|
|
2118
|
-
version = "0.26.
|
|
2106
|
+
version = "0.26.1"
|
|
2119
2107
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2120
|
-
checksum = "
|
|
2108
|
+
checksum = "0bab31817bfb44672a252e97fe81cd0c18d1b2cf892108922f6818820df8c643"
|
|
2121
2109
|
dependencies = [
|
|
2122
|
-
"async-trait",
|
|
2123
|
-
"bytes",
|
|
2124
|
-
"cfg-if",
|
|
2125
2110
|
"data-encoding",
|
|
2126
|
-
"enum-as-inner",
|
|
2127
|
-
"futures-channel",
|
|
2128
|
-
"futures-io",
|
|
2129
|
-
"futures-util",
|
|
2130
2111
|
"idna",
|
|
2131
2112
|
"ipnet",
|
|
2113
|
+
"jni 0.22.4",
|
|
2132
2114
|
"once_cell",
|
|
2133
|
-
"rand 0.
|
|
2115
|
+
"rand 0.10.2",
|
|
2134
2116
|
"ring",
|
|
2135
|
-
"rustls",
|
|
2136
2117
|
"thiserror 2.0.18",
|
|
2137
2118
|
"tinyvec",
|
|
2138
|
-
"tokio",
|
|
2139
|
-
"tokio-rustls",
|
|
2140
2119
|
"tracing",
|
|
2141
2120
|
"url",
|
|
2142
2121
|
]
|
|
@@ -2975,8 +2954,8 @@ dependencies = [
|
|
|
2975
2954
|
|
|
2976
2955
|
[[package]]
|
|
2977
2956
|
name = "microsandbox"
|
|
2978
|
-
version = "0.6.
|
|
2979
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
2957
|
+
version = "0.6.7"
|
|
2958
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
2980
2959
|
dependencies = [
|
|
2981
2960
|
"anyhow",
|
|
2982
2961
|
"astral-tokio-tar",
|
|
@@ -3023,6 +3002,7 @@ dependencies = [
|
|
|
3023
3002
|
"tokio-tungstenite",
|
|
3024
3003
|
"tracing",
|
|
3025
3004
|
"typed-builder",
|
|
3005
|
+
"typed-path",
|
|
3026
3006
|
"which",
|
|
3027
3007
|
"windows-sys 0.61.2",
|
|
3028
3008
|
"zeroize",
|
|
@@ -3030,8 +3010,8 @@ dependencies = [
|
|
|
3030
3010
|
|
|
3031
3011
|
[[package]]
|
|
3032
3012
|
name = "microsandbox-agent-client"
|
|
3033
|
-
version = "0.6.
|
|
3034
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3013
|
+
version = "0.6.7"
|
|
3014
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3035
3015
|
dependencies = [
|
|
3036
3016
|
"ciborium",
|
|
3037
3017
|
"microsandbox-protocol",
|
|
@@ -3043,8 +3023,8 @@ dependencies = [
|
|
|
3043
3023
|
|
|
3044
3024
|
[[package]]
|
|
3045
3025
|
name = "microsandbox-db"
|
|
3046
|
-
version = "0.6.
|
|
3047
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3026
|
+
version = "0.6.7"
|
|
3027
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3048
3028
|
dependencies = [
|
|
3049
3029
|
"async-trait",
|
|
3050
3030
|
"sea-orm",
|
|
@@ -3055,8 +3035,8 @@ dependencies = [
|
|
|
3055
3035
|
|
|
3056
3036
|
[[package]]
|
|
3057
3037
|
name = "microsandbox-filesystem"
|
|
3058
|
-
version = "0.6.
|
|
3059
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3038
|
+
version = "0.6.7"
|
|
3039
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3060
3040
|
dependencies = [
|
|
3061
3041
|
"libc",
|
|
3062
3042
|
"microsandbox-utils",
|
|
@@ -3068,11 +3048,12 @@ dependencies = [
|
|
|
3068
3048
|
|
|
3069
3049
|
[[package]]
|
|
3070
3050
|
name = "microsandbox-image"
|
|
3071
|
-
version = "0.6.
|
|
3072
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3051
|
+
version = "0.6.7"
|
|
3052
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3073
3053
|
dependencies = [
|
|
3074
3054
|
"astral-tokio-tar",
|
|
3075
3055
|
"async-compression",
|
|
3056
|
+
"chrono",
|
|
3076
3057
|
"futures",
|
|
3077
3058
|
"hex",
|
|
3078
3059
|
"libc",
|
|
@@ -3094,8 +3075,8 @@ dependencies = [
|
|
|
3094
3075
|
|
|
3095
3076
|
[[package]]
|
|
3096
3077
|
name = "microsandbox-metrics"
|
|
3097
|
-
version = "0.6.
|
|
3098
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3078
|
+
version = "0.6.7"
|
|
3079
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3099
3080
|
dependencies = [
|
|
3100
3081
|
"chrono",
|
|
3101
3082
|
"libc",
|
|
@@ -3106,8 +3087,8 @@ dependencies = [
|
|
|
3106
3087
|
|
|
3107
3088
|
[[package]]
|
|
3108
3089
|
name = "microsandbox-migration"
|
|
3109
|
-
version = "0.6.
|
|
3110
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3090
|
+
version = "0.6.7"
|
|
3091
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3111
3092
|
dependencies = [
|
|
3112
3093
|
"sea-orm-migration",
|
|
3113
3094
|
"serde_json",
|
|
@@ -3115,8 +3096,8 @@ dependencies = [
|
|
|
3115
3096
|
|
|
3116
3097
|
[[package]]
|
|
3117
3098
|
name = "microsandbox-network"
|
|
3118
|
-
version = "0.6.
|
|
3119
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3099
|
+
version = "0.6.7"
|
|
3100
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3120
3101
|
dependencies = [
|
|
3121
3102
|
"base64",
|
|
3122
3103
|
"bytes",
|
|
@@ -3124,7 +3105,7 @@ dependencies = [
|
|
|
3124
3105
|
"crossbeam-queue",
|
|
3125
3106
|
"dirs",
|
|
3126
3107
|
"futures",
|
|
3127
|
-
"hickory-
|
|
3108
|
+
"hickory-net",
|
|
3128
3109
|
"hickory-proto",
|
|
3129
3110
|
"httlib-hpack",
|
|
3130
3111
|
"httparse",
|
|
@@ -3159,8 +3140,8 @@ dependencies = [
|
|
|
3159
3140
|
|
|
3160
3141
|
[[package]]
|
|
3161
3142
|
name = "microsandbox-protocol"
|
|
3162
|
-
version = "0.6.
|
|
3163
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3143
|
+
version = "0.6.7"
|
|
3144
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3164
3145
|
dependencies = [
|
|
3165
3146
|
"chrono",
|
|
3166
3147
|
"ciborium",
|
|
@@ -3174,8 +3155,8 @@ dependencies = [
|
|
|
3174
3155
|
|
|
3175
3156
|
[[package]]
|
|
3176
3157
|
name = "microsandbox-runtime"
|
|
3177
|
-
version = "0.6.
|
|
3178
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3158
|
+
version = "0.6.7"
|
|
3159
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3179
3160
|
dependencies = [
|
|
3180
3161
|
"bytes",
|
|
3181
3162
|
"chrono",
|
|
@@ -3206,10 +3187,11 @@ dependencies = [
|
|
|
3206
3187
|
|
|
3207
3188
|
[[package]]
|
|
3208
3189
|
name = "microsandbox-types"
|
|
3209
|
-
version = "0.6.
|
|
3210
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3190
|
+
version = "0.6.7"
|
|
3191
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3211
3192
|
dependencies = [
|
|
3212
3193
|
"chrono",
|
|
3194
|
+
"ipnetwork",
|
|
3213
3195
|
"serde",
|
|
3214
3196
|
"serde_json",
|
|
3215
3197
|
"sha2 0.11.0",
|
|
@@ -3219,8 +3201,8 @@ dependencies = [
|
|
|
3219
3201
|
|
|
3220
3202
|
[[package]]
|
|
3221
3203
|
name = "microsandbox-utils"
|
|
3222
|
-
version = "0.6.
|
|
3223
|
-
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.
|
|
3204
|
+
version = "0.6.7"
|
|
3205
|
+
source = "git+https://github.com/superradcompany/microsandbox?tag=v0.6.7#0c54fd12acf7740f68d5bcd38e58a9fe82d51a45"
|
|
3224
3206
|
dependencies = [
|
|
3225
3207
|
"dirs",
|
|
3226
3208
|
"libc",
|
|
@@ -3232,7 +3214,7 @@ dependencies = [
|
|
|
3232
3214
|
|
|
3233
3215
|
[[package]]
|
|
3234
3216
|
name = "microsandbox_rb"
|
|
3235
|
-
version = "0.
|
|
3217
|
+
version = "0.11.0"
|
|
3236
3218
|
dependencies = [
|
|
3237
3219
|
"chrono",
|
|
3238
3220
|
"futures",
|
|
@@ -3491,15 +3473,6 @@ dependencies = [
|
|
|
3491
3473
|
"zstd",
|
|
3492
3474
|
]
|
|
3493
3475
|
|
|
3494
|
-
[[package]]
|
|
3495
|
-
name = "nibble_vec"
|
|
3496
|
-
version = "0.1.0"
|
|
3497
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3498
|
-
checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
|
|
3499
|
-
dependencies = [
|
|
3500
|
-
"smallvec",
|
|
3501
|
-
]
|
|
3502
|
-
|
|
3503
3476
|
[[package]]
|
|
3504
3477
|
name = "nix"
|
|
3505
3478
|
version = "0.29.0"
|
|
@@ -4248,15 +4221,16 @@ dependencies = [
|
|
|
4248
4221
|
|
|
4249
4222
|
[[package]]
|
|
4250
4223
|
name = "quinn-proto"
|
|
4251
|
-
version = "0.11.
|
|
4224
|
+
version = "0.11.16"
|
|
4252
4225
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4253
|
-
checksum = "
|
|
4226
|
+
checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560"
|
|
4254
4227
|
dependencies = [
|
|
4255
4228
|
"aws-lc-rs",
|
|
4256
4229
|
"bytes",
|
|
4257
|
-
"getrandom 0.
|
|
4230
|
+
"getrandom 0.4.2",
|
|
4258
4231
|
"lru-slab",
|
|
4259
|
-
"rand 0.
|
|
4232
|
+
"rand 0.10.2",
|
|
4233
|
+
"rand_pcg",
|
|
4260
4234
|
"ring",
|
|
4261
4235
|
"rustc-hash",
|
|
4262
4236
|
"rustls",
|
|
@@ -4303,16 +4277,6 @@ version = "6.0.0"
|
|
|
4303
4277
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4304
4278
|
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
4305
4279
|
|
|
4306
|
-
[[package]]
|
|
4307
|
-
name = "radix_trie"
|
|
4308
|
-
version = "0.2.1"
|
|
4309
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4310
|
-
checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
|
|
4311
|
-
dependencies = [
|
|
4312
|
-
"endian-type",
|
|
4313
|
-
"nibble_vec",
|
|
4314
|
-
]
|
|
4315
|
-
|
|
4316
4280
|
[[package]]
|
|
4317
4281
|
name = "rand"
|
|
4318
4282
|
version = "0.8.6"
|
|
@@ -4389,6 +4353,15 @@ version = "0.10.1"
|
|
|
4389
4353
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4390
4354
|
checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
|
|
4391
4355
|
|
|
4356
|
+
[[package]]
|
|
4357
|
+
name = "rand_pcg"
|
|
4358
|
+
version = "0.10.2"
|
|
4359
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
4360
|
+
checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a"
|
|
4361
|
+
dependencies = [
|
|
4362
|
+
"rand_core 0.10.1",
|
|
4363
|
+
]
|
|
4364
|
+
|
|
4392
4365
|
[[package]]
|
|
4393
4366
|
name = "rb-sys"
|
|
4394
4367
|
version = "0.9.128"
|
|
@@ -4766,7 +4739,7 @@ dependencies = [
|
|
|
4766
4739
|
"errno",
|
|
4767
4740
|
"libc",
|
|
4768
4741
|
"linux-raw-sys",
|
|
4769
|
-
"windows-sys 0.
|
|
4742
|
+
"windows-sys 0.59.0",
|
|
4770
4743
|
]
|
|
4771
4744
|
|
|
4772
4745
|
[[package]]
|
|
@@ -4834,7 +4807,7 @@ dependencies = [
|
|
|
4834
4807
|
"security-framework 3.7.0",
|
|
4835
4808
|
"security-framework-sys",
|
|
4836
4809
|
"webpki-root-certs",
|
|
4837
|
-
"windows-sys 0.
|
|
4810
|
+
"windows-sys 0.59.0",
|
|
4838
4811
|
]
|
|
4839
4812
|
|
|
4840
4813
|
[[package]]
|
|
@@ -4855,7 +4828,7 @@ dependencies = [
|
|
|
4855
4828
|
"security-framework 3.7.0",
|
|
4856
4829
|
"security-framework-sys",
|
|
4857
4830
|
"webpki-root-certs",
|
|
4858
|
-
"windows-sys 0.
|
|
4831
|
+
"windows-sys 0.59.0",
|
|
4859
4832
|
]
|
|
4860
4833
|
|
|
4861
4834
|
[[package]]
|
|
@@ -5385,9 +5358,9 @@ checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
|
|
|
5385
5358
|
|
|
5386
5359
|
[[package]]
|
|
5387
5360
|
name = "simd_cesu8"
|
|
5388
|
-
version = "1.
|
|
5361
|
+
version = "1.2.0"
|
|
5389
5362
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
5390
|
-
checksum = "
|
|
5363
|
+
checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520"
|
|
5391
5364
|
dependencies = [
|
|
5392
5365
|
"rustc_version",
|
|
5393
5366
|
"simdutf8",
|
|
@@ -5875,7 +5848,7 @@ dependencies = [
|
|
|
5875
5848
|
"getrandom 0.4.2",
|
|
5876
5849
|
"once_cell",
|
|
5877
5850
|
"rustix",
|
|
5878
|
-
"windows-sys 0.
|
|
5851
|
+
"windows-sys 0.59.0",
|
|
5879
5852
|
]
|
|
5880
5853
|
|
|
5881
5854
|
[[package]]
|
|
@@ -6221,6 +6194,12 @@ dependencies = [
|
|
|
6221
6194
|
"syn",
|
|
6222
6195
|
]
|
|
6223
6196
|
|
|
6197
|
+
[[package]]
|
|
6198
|
+
name = "typed-path"
|
|
6199
|
+
version = "0.12.3"
|
|
6200
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
6201
|
+
checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e"
|
|
6202
|
+
|
|
6224
6203
|
[[package]]
|
|
6225
6204
|
name = "typenum"
|
|
6226
6205
|
version = "1.20.1"
|
data/README.md
CHANGED
|
@@ -39,7 +39,7 @@ them. Our deepest thanks to the maintainers and community. 🙏
|
|
|
39
39
|
- **Guest filesystem access** — read, write, list, copy, stat files inside a running sandbox
|
|
40
40
|
- **Metrics & logs** — CPU, memory, disk and network I/O; captured stdout/stderr/system logs
|
|
41
41
|
- **Rootfs patches** — inject files, dirs, and symlinks into the image before boot (`Microsandbox::Patch`)
|
|
42
|
-
- **Fine-grained networking** —
|
|
42
|
+
- **Fine-grained networking** — composable profiles (`:public`/`:private`/`:host`) *and* custom CIDR/domain/group allow-deny rules (`Microsandbox::NetworkPolicy`)
|
|
43
43
|
- **SSH & SFTP** — native in-process SSH client/server and file transfer (`Sandbox#ssh`)
|
|
44
44
|
- **Raw agent client** — byte-level access to the guest `agentd` protocol (`Microsandbox::AgentClient`)
|
|
45
45
|
- **Idiomatic Ruby** — keyword arguments, block-scoped lifecycle, a typed error hierarchy
|
|
@@ -160,7 +160,7 @@ Microsandbox::Sandbox.create(
|
|
|
160
160
|
workdir: "/app",
|
|
161
161
|
labels: { "team" => "research" },
|
|
162
162
|
ports: { 8080 => 80 }, # host => guest (TCP)
|
|
163
|
-
network:
|
|
163
|
+
network: [:public], # composable profiles; :none for airgapped
|
|
164
164
|
replace: true # replace an existing sandbox of the same name
|
|
165
165
|
) do |sb|
|
|
166
166
|
# ...
|
|
@@ -442,8 +442,8 @@ change diverged the two numbers — the gem version is **not** a reliable indica
|
|
|
442
442
|
of the embedded runtime version. To learn which runtime a build wraps, ask it:
|
|
443
443
|
|
|
444
444
|
```ruby
|
|
445
|
-
Microsandbox::VERSION # => "0.
|
|
446
|
-
Microsandbox.runtime_version # => "v0.6.
|
|
445
|
+
Microsandbox::VERSION # => "0.11.0" (the gem's own version)
|
|
446
|
+
Microsandbox.runtime_version # => "v0.6.7" (the embedded upstream runtime tag)
|
|
447
447
|
```
|
|
448
448
|
|
|
449
449
|
| Gem version | Upstream runtime | Notes |
|
|
@@ -464,6 +464,7 @@ Microsandbox.runtime_version # => "v0.6.6" (the embedded upstream runtime tag
|
|
|
464
464
|
| `0.9.2` | `v0.6.3` | adopts upstream `v0.6.3` (v4-only sandboxes stop advertising AAAA DNS answers — fixes guest gRPC/c-ares preferring unreachable IPv6; scoped upstream TLS verification); glue moves to `*_local` SDK variants — no Ruby surface change |
|
|
465
465
|
| `0.9.3` | `v0.6.6` | adopts upstream `v0.6.4`+`v0.6.6` (`v0.6.5` was yanked upstream): snapshot restore by pinned digest — fixes fatal restore-after-tag-republish bug, fragmented-UDP/PMTU relay fixes, exec kills the whole process group, ephemeral stop-wait tolerance, readdir RSS-leak fix; upstream API growth is additive-only — no Ruby surface change |
|
|
466
466
|
| `0.10.0` | `v0.6.6` | `v0.6.6` API parity: live `modify`/resize, `ping`/`touch`, create `max_cpus`/`max_memory` |
|
|
467
|
+
| `0.11.0` | `v0.6.7` | adopts upstream `v0.6.7` (**breaking**): network profiles replace `public_only`/`non_local`, structured `root_disk:` replaces `oci_upper_size:` (deprecated alias kept), snapshot descriptor contract (`create` re-keyed by name, `save`/`load` rename, `snapshot_to` removed, on-disk auto-migration), `Image.load`/`Image.save`, `follow_root_symlinks:`; runtime carries the GHSA-4vq3-cjpp-v7fg `msb copy` fix |
|
|
467
468
|
|
|
468
469
|
**Going forward** — the gem version moves on its own semver track and no longer
|
|
469
470
|
mirrors the upstream tag:
|
|
@@ -542,7 +543,7 @@ section. The binding covers the official-SDK surface: sandbox
|
|
|
542
543
|
lifecycle (the live `Sandbox` `stop`/`stop_and_wait`/`kill`/`drain`/`wait`/
|
|
543
544
|
`status`/`detach`/`owns_lifecycle?`, plus the `SandboxHandle` controls
|
|
544
545
|
`stop_with_timeout`/`request_stop`/`request_kill`/`request_drain`/
|
|
545
|
-
`wait_until_stopped`/`config`/`config_json`/`snapshot
|
|
546
|
+
`wait_until_stopped`/`config`/`config_json`/`snapshot` from
|
|
546
547
|
`Sandbox.get`, and label-filtered `list_with`),
|
|
547
548
|
backend routing (`set_default_backend`/`with_backend`/`default_backend_kind`),
|
|
548
549
|
`exec`/`shell` (collected and streaming), interactive `attach`/
|
|
@@ -550,10 +551,12 @@ backend routing (`set_default_backend`/`with_backend`/`default_backend_kind`),
|
|
|
550
551
|
`write_stream`), metrics (per-sandbox, `Microsandbox.all_sandbox_metrics`, and
|
|
551
552
|
streaming `metrics_stream`/`log_stream`), logs, OCI image-cache management,
|
|
552
553
|
named volumes (incl. host-side `Volume.fs`/`VolumeInfo#fs` read/write),
|
|
553
|
-
snapshots (create/open/list/list_dir/reindex/verify/
|
|
554
|
-
boot-from-snapshot),
|
|
555
|
-
(`Sandbox.create_with_progress` → `PullSession`),
|
|
556
|
-
(`Microsandbox::Patch`), **
|
|
554
|
+
snapshots (create/open/list/list_dir/reindex/verify/save/load +
|
|
555
|
+
boot-from-snapshot), image archives (`Image.load`/`Image.save`), streaming
|
|
556
|
+
image-pull progress (`Sandbox.create_with_progress` → `PullSession`),
|
|
557
|
+
**rootfs patches** (`Microsandbox::Patch`), the structured **root disk**
|
|
558
|
+
(`root_disk:` managed/tmpfs/disk via `Microsandbox::RootDisk`), **network
|
|
559
|
+
configuration** (composable profiles, custom per-rule
|
|
557
560
|
`Microsandbox::NetworkPolicy`/`Rule`/`Destination`, plus DNS, TLS interception,
|
|
558
561
|
IPv4/IPv6 pools, `max_connections`, `trust_host_cas`), **secrets** (multi-host /
|
|
559
562
|
wildcard allow-lists, injection toggles, per-secret + sandbox-level violation
|
data/ext/microsandbox/Cargo.toml
CHANGED
|
@@ -6,8 +6,8 @@ name = "microsandbox_rb"
|
|
|
6
6
|
description = "Ruby SDK native extension for microsandbox — secure, fast microVM-based sandboxing."
|
|
7
7
|
# Must equal Microsandbox::VERSION (lib/microsandbox/version.rb) — Native.version
|
|
8
8
|
# returns this via env!("CARGO_PKG_VERSION") and version_spec.rb asserts equality.
|
|
9
|
-
# The core-crate dependency below stays pinned at its own tag (v0.6.
|
|
10
|
-
version = "0.
|
|
9
|
+
# The core-crate dependency below stays pinned at its own tag (v0.6.7).
|
|
10
|
+
version = "0.11.0"
|
|
11
11
|
authors = ["Super Rad Company <development@superrad.company>"]
|
|
12
12
|
repository = "https://github.com/superradcompany/microsandbox"
|
|
13
13
|
license = "Apache-2.0"
|
|
@@ -35,8 +35,8 @@ rb-sys = "0.9"
|
|
|
35
35
|
# `.cargo/config.toml.example`). "ssh" matches the feature set the Python/Node
|
|
36
36
|
# SDKs ship with; default features add "prebuilt" (provisions msb + libkrunfw at
|
|
37
37
|
# build time), "net", and "keyring".
|
|
38
|
-
microsandbox = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.
|
|
39
|
-
microsandbox-network = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.
|
|
38
|
+
microsandbox = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.7", default-features = true, features = ["ssh"] }
|
|
39
|
+
microsandbox-network = { git = "https://github.com/superradcompany/microsandbox", tag = "v0.6.7" }
|
|
40
40
|
|
|
41
41
|
# Async core bridged to Ruby's synchronous API via a blocking tokio runtime.
|
|
42
42
|
tokio = { version = "1", features = ["rt-multi-thread", "sync", "time"] }
|
|
@@ -51,6 +51,10 @@ fn class_name(err: &MicrosandboxError) -> &'static str {
|
|
|
51
51
|
SnapshotSandboxRunning(_) => "SnapshotSandboxRunningError",
|
|
52
52
|
SnapshotImageMissing(_) => "SnapshotImageMissingError",
|
|
53
53
|
SnapshotIntegrity(_) => "SnapshotIntegrityError",
|
|
54
|
+
// v0.6.7 (#1200): the automatic v0.6.6→v0.6.7 snapshot-descriptor
|
|
55
|
+
// migration (run at backend connect / artifact open) failed and needs
|
|
56
|
+
// repair. Mirrors the Python `SnapshotMigrationError`.
|
|
57
|
+
SnapshotMigration { .. } => "SnapshotMigrationError",
|
|
54
58
|
// Give the already-defined-but-orphaned `NetworkPolicyError` a mapping:
|
|
55
59
|
// a builder parse/validation error from `network(|n| ...)`. The gem
|
|
56
60
|
// unconditionally enables the core's `net` feature (default-features),
|