@fungi.computer/spore-native-linux-x64 0.2.1 → 0.3.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/README.md +2 -3
- package/bin/fungi-apply-patch +0 -0
- package/bin/fungi-seccomp-workspace.bpf +0 -0
- package/bwrap-build-source/Dockerfile +2 -0
- package/bwrap-build-source/README.md +6 -6
- package/bwrap-build-source/pin.mjs +2 -2
- package/bwrap-build-source/record.mjs +12 -1
- package/bwrap-build-source/vendor/seccomp-unix-block.c +10 -7
- package/bwrap-build.json +3 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -7,13 +7,12 @@ Requires glibc 2.35 or newer.
|
|
|
7
7
|
The engine uses pinned Codex sources with Fungi's rooted invocation wrapper.
|
|
8
8
|
Upstream terms are in `LICENSE.codex` and `THIRD_PARTY_NOTICES`.
|
|
9
9
|
|
|
10
|
-
Linux also carries the pinned bubblewrap engine
|
|
10
|
+
Linux also carries the pinned bubblewrap engine, both permission-mode seccomp filters and build
|
|
11
11
|
provenance. The runtime verifies them against the digests embedded in Fungi's
|
|
12
12
|
built JS, never writable sidecars. Its unmodified upstream source is in `SOURCE.bubblewrap.tar.xz`;
|
|
13
13
|
the recipe is in `bwrap-build-source`. Terms are in `LICENSE.bubblewrap`
|
|
14
14
|
and `LICENSE.libcap`; the maintained filter generator's terms are in
|
|
15
15
|
`LICENSE.sandbox-runtime`.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
Pathname Unix sockets and datagram socketpair remain known v1 limits.
|
|
17
|
+
Workspace permits host networking and bounded writable package caches; Read-only blocks direct command networking and restricts writes to Agent temp. Commands can still read other files on this computer, and this is not a security boundary against a hostile program.
|
|
19
18
|
|
package/bin/fungi-apply-patch
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -37,6 +37,8 @@ RUN test "$(getconf GNU_LIBC_VERSION)" = "glibc 2.35" \
|
|
|
37
37
|
&& cc -O2 -Wall -Wextra -Werror /source/vendor/seccomp-unix-block.c -lseccomp -o /compiled/seccomp-generator \
|
|
38
38
|
&& /compiled/seccomp-generator /out/fungi-seccomp.bpf \
|
|
39
39
|
$(if [ "$TARGET" = linux-arm64 ]; then printf aarch64; else printf x86_64; fi) unix \
|
|
40
|
+
&& /compiled/seccomp-generator /out/fungi-seccomp-workspace.bpf \
|
|
41
|
+
$(if [ "$TARGET" = linux-arm64 ]; then printf aarch64; else printf x86_64; fi) workspace \
|
|
40
42
|
&& chmod 0755 /out/fungi-bwrap \
|
|
41
43
|
&& patchelf --print-needed /out/fungi-bwrap > /needed \
|
|
42
44
|
&& while read -r lib; do \
|
|
@@ -73,17 +73,17 @@ directory. Only controlled TCP/Unix listeners are created, and they close in
|
|
|
73
73
|
mutated.
|
|
74
74
|
|
|
75
75
|
The prepared probe checks confined writes, outside-write refusal, `.fungi` and
|
|
76
|
-
Git
|
|
76
|
+
Git administration write refusal (including add/commit), private `/run` and
|
|
77
77
|
external XDG runtime directory, absent session locators, and refusal to reach
|
|
78
78
|
the controlled host TCP/Unix listeners. Namespace denial must fail the proof,
|
|
79
79
|
not trigger bare execution or a skipped success.
|
|
80
80
|
|
|
81
81
|
This is a **direct backend proof fixture**, not foreground/background lifecycle
|
|
82
|
-
or Files acceptance. Linked-worktree Git protection,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
or Files acceptance. Linked-worktree Git protection, shell/direct command
|
|
83
|
+
owners, process-group cleanup, hidden-run detachment, installed-package
|
|
84
|
+
resolution and all affected gates still require qualification. The argv/digest
|
|
85
|
+
unit tests do not establish any of these kernel properties. Even a passing
|
|
86
|
+
backend probe alone does not authorize changing readiness.
|
|
87
87
|
|
|
88
88
|
## Exact remaining gap
|
|
89
89
|
|
|
@@ -9,13 +9,13 @@ export const bwrapPin = Object.freeze({
|
|
|
9
9
|
"0e85c8702248b8dd64144f594147553650cdd0e4c951690345faace79c217c4d",
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
/**
|
|
12
|
+
/** Retained libseccomp generator with a Workspace rule-set selector. */
|
|
13
13
|
export const seccompPin = Object.freeze({
|
|
14
14
|
repository: "https://github.com/anthropic-experimental/sandbox-runtime",
|
|
15
15
|
revision: "38d1aee29c72035f1dba1337ac89b03a2f655d26",
|
|
16
16
|
source: "vendor/seccomp-src/seccomp-unix-block.c",
|
|
17
17
|
sourceSha256:
|
|
18
|
-
"
|
|
18
|
+
"1599d24097d5e0bac5a22c6d38de98cae990eb18ee28d6be5faccf6db80dcf24",
|
|
19
19
|
licenseSha256:
|
|
20
20
|
"1210bc93eb85dd786c33192d5bcb7153a93922fa99fbc1512af6a7199cb41080",
|
|
21
21
|
});
|
|
@@ -19,6 +19,13 @@ await writeFile(
|
|
|
19
19
|
resolve(output, "fungi-seccomp.bpf.sha256"),
|
|
20
20
|
`${seccompSha256}\n`,
|
|
21
21
|
);
|
|
22
|
+
const workspaceSeccompSha256 = createHash("sha256")
|
|
23
|
+
.update(await readFile(resolve(output, "fungi-seccomp-workspace.bpf")))
|
|
24
|
+
.digest("hex");
|
|
25
|
+
await writeFile(
|
|
26
|
+
resolve(output, "fungi-seccomp-workspace.bpf.sha256"),
|
|
27
|
+
`${workspaceSeccompSha256}\n`,
|
|
28
|
+
);
|
|
22
29
|
await copyFile(
|
|
23
30
|
"/source/vendor/LICENSE.sandbox-runtime",
|
|
24
31
|
resolve(output, "LICENSE.sandbox-runtime"),
|
|
@@ -47,7 +54,11 @@ await writeFile(
|
|
|
47
54
|
platform,
|
|
48
55
|
upstream: bwrapPin,
|
|
49
56
|
sha256,
|
|
50
|
-
seccomp: {
|
|
57
|
+
seccomp: {
|
|
58
|
+
generator: seccompPin,
|
|
59
|
+
readOnlySha256: seccompSha256,
|
|
60
|
+
workspaceSha256: workspaceSeccompSha256,
|
|
61
|
+
},
|
|
51
62
|
packages: [
|
|
52
63
|
{
|
|
53
64
|
name: "sandbox-runtime-seccomp-generator",
|
|
@@ -157,7 +157,8 @@ int main(int argc, char *argv[]) {
|
|
|
157
157
|
const char *output_file = argv[1];
|
|
158
158
|
const char *arch_name = (argc >= 3) ? argv[2] : NULL;
|
|
159
159
|
const char *rule_set = (argc == 4) ? argv[3] : "unix";
|
|
160
|
-
if (strcmp(rule_set, "unix") != 0 && strcmp(rule_set, "
|
|
160
|
+
if (strcmp(rule_set, "unix") != 0 && strcmp(rule_set, "workspace") != 0 &&
|
|
161
|
+
strcmp(rule_set, "namespaces") != 0) {
|
|
161
162
|
fprintf(stderr, "Error: Unknown rule set '%s'\n", rule_set);
|
|
162
163
|
return 1;
|
|
163
164
|
}
|
|
@@ -209,12 +210,14 @@ int main(int argc, char *argv[]) {
|
|
|
209
210
|
* int, so the kernel ignores the upper 32 bits of the register. A plain
|
|
210
211
|
* SCMP_CMP_EQ would compare all 64 bits and miss calls where the upper bits
|
|
211
212
|
* are set. */
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
if (strcmp(rule_set, "unix") == 0) {
|
|
214
|
+
rc = seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(socket), 1,
|
|
215
|
+
SCMP_A0(SCMP_CMP_MASKED_EQ, 0xffffffff, AF_UNIX));
|
|
216
|
+
if (rc < 0) {
|
|
217
|
+
fprintf(stderr, "Error: Failed to add seccomp rule: %s\n", strerror(-rc));
|
|
218
|
+
seccomp_release(ctx);
|
|
219
|
+
return 1;
|
|
220
|
+
}
|
|
218
221
|
}
|
|
219
222
|
|
|
220
223
|
/* Add rule to block socket(AF_VSOCK, ...) */
|
package/bwrap-build.json
CHANGED
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
"repository": "https://github.com/anthropic-experimental/sandbox-runtime",
|
|
14
14
|
"revision": "38d1aee29c72035f1dba1337ac89b03a2f655d26",
|
|
15
15
|
"source": "vendor/seccomp-src/seccomp-unix-block.c",
|
|
16
|
-
"sourceSha256": "
|
|
16
|
+
"sourceSha256": "1599d24097d5e0bac5a22c6d38de98cae990eb18ee28d6be5faccf6db80dcf24",
|
|
17
17
|
"licenseSha256": "1210bc93eb85dd786c33192d5bcb7153a93922fa99fbc1512af6a7199cb41080"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"readOnlySha256": "38112f9cf994bed2ed962fae63e803c41874732ab032088b2c1ea3d713e51c11",
|
|
20
|
+
"workspaceSha256": "e46f1045f85fcf14f91fae8654bba6a0c87f57e3b92f60bfc16008dbf7dc87c8"
|
|
20
21
|
},
|
|
21
22
|
"packages": [
|
|
22
23
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/spore-native-linux-x64",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Native engines for the Fungi CLI on linux-x64",
|
|
5
5
|
"os": [
|
|
6
6
|
"linux"
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"README.md",
|
|
26
26
|
"bin/fungi-bwrap",
|
|
27
27
|
"bin/fungi-seccomp.bpf",
|
|
28
|
+
"bin/fungi-seccomp-workspace.bpf",
|
|
28
29
|
"bwrap-build.json",
|
|
29
30
|
"LICENSE.bubblewrap",
|
|
30
31
|
"LICENSE.libcap",
|