mxc 0.4.0 → 0.4.1
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/Cargo.lock +2 -2
- data/README.md +2 -0
- data/ext/mxc/Cargo.toml +2 -2
- data/lib/mxc/sandbox.rb +6 -3
- data/lib/mxc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b22a8e3054e56f63421b06b11d5db03c5a4d2a78302759b069207b6f57e0881
|
|
4
|
+
data.tar.gz: 2425c817778256ec3bb937d9587f8d7513d8aa4106cd3727c9163806893b8d26
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad1387eafb7076d2a18e954e94cc5641a4a7bb9be532ffbba8ad3e496ca0021f7693e41d3fd4301108454d2863c469e415f6f8c6b9a1045cbd1c0ce4e1305544
|
|
7
|
+
data.tar.gz: 200a97933411bf815af791fb136f94c53d3270ff409318e0364a78fe9a7007fcf709d7eadfcae5a59054e53a088ce9af80fc563585b07b4f58f185135b2bed23
|
data/Cargo.lock
CHANGED
|
@@ -593,7 +593,7 @@ dependencies = [
|
|
|
593
593
|
|
|
594
594
|
[[package]]
|
|
595
595
|
name = "mxc"
|
|
596
|
-
version = "0.4.
|
|
596
|
+
version = "0.4.1"
|
|
597
597
|
dependencies = [
|
|
598
598
|
"magnus",
|
|
599
599
|
"mxc-sdk",
|
|
@@ -605,7 +605,7 @@ dependencies = [
|
|
|
605
605
|
[[package]]
|
|
606
606
|
name = "mxc-sdk"
|
|
607
607
|
version = "1.0.0"
|
|
608
|
-
source = "git+https://github.com/crmne/microsoft-mxc?rev=
|
|
608
|
+
source = "git+https://github.com/crmne/microsoft-mxc?rev=d7ba62b299fbcd7bdd4d7876cefcd68ada9a469b#d7ba62b299fbcd7bdd4d7876cefcd68ada9a469b"
|
|
609
609
|
dependencies = [
|
|
610
610
|
"anyhow",
|
|
611
611
|
"base64",
|
data/README.md
CHANGED
|
@@ -128,6 +128,8 @@ MXC.backends # => [#<MXC::Backend name=:bubblewrap ...>]
|
|
|
128
128
|
|
|
129
129
|
On Windows, a single String runs through `cmd.exe` instead of `sh`. See [Running Commands](https://crmne.github.io/mxc/running-commands/#windows) and [Policies](https://crmne.github.io/mxc/policies/#windows) for what else differs.
|
|
130
130
|
|
|
131
|
+
A sandbox controls files, network, and resources. It does not always hide other processes: on some backends a command can read their command lines, and on macOS the environment your application started with. [Policies](https://crmne.github.io/mxc/policies/#what-the-command-can-see-of-other-processes) lists what each backend shows.
|
|
132
|
+
|
|
131
133
|
Docker blocks the namespaces Bubblewrap needs by default, so a default container runs sandboxes on Landlock. [Running in Docker](https://crmne.github.io/mxc/running-in-docker/) shows what that gives up, and the smallest set of changes that makes Bubblewrap work, with a seccomp profile and a Kamal configuration for a job role.
|
|
132
134
|
|
|
133
135
|
## Documentation
|
data/ext/mxc/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "mxc"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.1"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
authors = ["Carmine Paolino <carmine@paolino.me>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -13,7 +13,7 @@ crate-type = ["cdylib"]
|
|
|
13
13
|
magnus = "0.8.2"
|
|
14
14
|
# A fork of mxc-sdk 1.0.0 that adds resource limits (microsoft/mxc#1498) and
|
|
15
15
|
# a Landlock backend (microsoft/mxc#1494), until MXC releases them.
|
|
16
|
-
mxc-sdk = { git = "https://github.com/crmne/microsoft-mxc", rev = "
|
|
16
|
+
mxc-sdk = { git = "https://github.com/crmne/microsoft-mxc", rev = "d7ba62b299fbcd7bdd4d7876cefcd68ada9a469b" }
|
|
17
17
|
rb-sys = { version = "0.9.130", features = ["stable-api-compiled-fallback"] }
|
|
18
18
|
serde_json = "1"
|
|
19
19
|
|
data/lib/mxc/sandbox.rb
CHANGED
|
@@ -177,7 +177,8 @@ module MXC
|
|
|
177
177
|
add_paths(:readable, paths)
|
|
178
178
|
end
|
|
179
179
|
|
|
180
|
-
# Adds paths the command can read and write.
|
|
180
|
+
# Adds paths the command can read and write. A path that is also #readable is writable,
|
|
181
|
+
# whichever was added first. A readable path inside a writable one stays read-only.
|
|
181
182
|
def with_writable(*paths)
|
|
182
183
|
add_paths(:writable, paths)
|
|
183
184
|
end
|
|
@@ -470,9 +471,11 @@ module MXC
|
|
|
470
471
|
|
|
471
472
|
def request(arguments)
|
|
472
473
|
Preflight.check!(network:, denied:, resources:, backend:)
|
|
474
|
+
readwrite = expand(writable)
|
|
473
475
|
{
|
|
474
|
-
|
|
475
|
-
|
|
476
|
+
# MXC resolves a path in both lists to read-only.
|
|
477
|
+
readonly: (expand(readable) | library_files(arguments)) - readwrite,
|
|
478
|
+
readwrite:,
|
|
476
479
|
denied: expand(denied) | hidden_resolver_sockets,
|
|
477
480
|
environment:,
|
|
478
481
|
working_directory:,
|
data/lib/mxc/version.rb
CHANGED