@fungi.computer/spore-native-linux-x64 0.2.0 → 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 CHANGED
@@ -7,12 +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 and seccomp filter, their SHA-256 sidecars and build
11
- provenance. Its unmodified upstream source is in `SOURCE.bubblewrap.tar.xz`;
10
+ Linux also carries the pinned bubblewrap engine, both permission-mode seccomp filters and build
11
+ provenance. The runtime verifies them against the digests embedded in Fungi's
12
+ built JS, never writable sidecars. Its unmodified upstream source is in `SOURCE.bubblewrap.tar.xz`;
12
13
  the recipe is in `bwrap-build-source`. Terms are in `LICENSE.bubblewrap`
13
14
  and `LICENSE.libcap`; the maintained filter generator's terms are in
14
15
  `LICENSE.sandbox-runtime`.
15
16
 
16
- Limits what the agent's commands can change to your project folder and blocks their network access. They can still read other files on this computer, and this is not a security boundary against a hostile program.
17
- 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.
18
18
 
Binary file
Binary file
@@ -12,7 +12,7 @@ RUN if [ "$TARGET" = linux-arm64 ]; then \
12
12
  fi && apt-get update && apt-get install -y --no-install-recommends \
13
13
  build-essential ca-certificates curl xz-utils python3-pip ninja-build \
14
14
  pkg-config patchelf libcap-dev libseccomp-dev \
15
- $(if [ "$TARGET" = linux-arm64 ]; then printf 'gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libcap-dev:arm64'; fi) \
15
+ $(if [ "$TARGET" = linux-arm64 ]; then printf 'gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libc6-dev-arm64-cross libcap-dev:arm64'; fi) \
16
16
  && rm -rf /var/lib/apt/lists/*
17
17
  # prefer_static is a maintained Meson option newer than Jammy's Meson.
18
18
  RUN pip3 install --no-cache-dir meson==1.10.2
@@ -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 config/hooks protection, a real allowed Git add/commit, private `/run` and
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, immovable Git directories,
83
- shell/direct command owners, process-group cleanup, hidden-run detachment,
84
- installed-package resolution and all affected gates still require qualification.
85
- The argv/digest unit tests do not establish any of these kernel properties. Even
86
- a passing backend probe alone does not authorize changing readiness.
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
- /** Unmodified maintained libseccomp generator; never locally assembled BPF. */
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
- "9dcde4aedc076fb44efc5cc8d843c7ba898f2a056b71931812d55ef99f1ed6b1",
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: { generator: seccompPin, sha256: seccompSha256 },
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, "namespaces") != 0) {
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
- rc = seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(socket), 1,
213
- SCMP_A0(SCMP_CMP_MASKED_EQ, 0xffffffff, AF_UNIX));
214
- if (rc < 0) {
215
- fprintf(stderr, "Error: Failed to add seccomp rule: %s\n", strerror(-rc));
216
- seccomp_release(ctx);
217
- return 1;
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": "9dcde4aedc076fb44efc5cc8d843c7ba898f2a056b71931812d55ef99f1ed6b1",
16
+ "sourceSha256": "1599d24097d5e0bac5a22c6d38de98cae990eb18ee28d6be5faccf6db80dcf24",
17
17
  "licenseSha256": "1210bc93eb85dd786c33192d5bcb7153a93922fa99fbc1512af6a7199cb41080"
18
18
  },
19
- "sha256": "38112f9cf994bed2ed962fae63e803c41874732ab032088b2c1ea3d713e51c11"
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.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Native engines for the Fungi CLI on linux-x64",
5
5
  "os": [
6
6
  "linux"
@@ -24,9 +24,8 @@
24
24
  "THIRD_PARTY_NOTICES",
25
25
  "README.md",
26
26
  "bin/fungi-bwrap",
27
- "bin/fungi-bwrap.sha256",
28
27
  "bin/fungi-seccomp.bpf",
29
- "bin/fungi-seccomp.bpf.sha256",
28
+ "bin/fungi-seccomp-workspace.bpf",
30
29
  "bwrap-build.json",
31
30
  "LICENSE.bubblewrap",
32
31
  "LICENSE.libcap",
@@ -1 +0,0 @@
1
- 035ac5ddfc70dd7d4a9b575b351944d47aa9d0bbafeb433fb72b2afb02cef7f4
@@ -1 +0,0 @@
1
- 38112f9cf994bed2ed962fae63e803c41874732ab032088b2c1ea3d713e51c11