foldrun 17.1.0 → 17.1.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.
- package/docs/agents.md +20 -4
- package/docs/security.md +11 -0
- package/package.json +1 -1
package/docs/agents.md
CHANGED
|
@@ -524,7 +524,20 @@ snapshot beside the old one the first time the set is needed — the run log
|
|
|
524
524
|
then says `(apt, 30s, 1 snapshot did not fit this image)`. A snapshot is
|
|
525
525
|
rebuilt 14 days after it was made, so the packages in it pick up Debian's
|
|
526
526
|
fixes. The run log says `system packages ready: … (snapshot, 1s)` or
|
|
527
|
-
`(apt, 30s)`, or fails the step with apt's own reason.
|
|
527
|
+
`(apt, 30s)`, or fails the step with apt's own reason.
|
|
528
|
+
|
|
529
|
+
A snapshot is written into the account's runtime cache, which steps can
|
|
530
|
+
write — and it is restored as root. So it is **sealed**: the platform keeps a
|
|
531
|
+
key for each account that steps never see, and a snapshot is restored only if
|
|
532
|
+
its seal, made with that key when the start-up built it, matches the package
|
|
533
|
+
set, the image and every byte of the file. A snapshot a step rewrote, or one
|
|
534
|
+
whose seal does not match, is not restored; the step installs with apt and the
|
|
535
|
+
run log says why on the next line — `snapshot refused: its contents do not
|
|
536
|
+
match its seal`. Even a sealed snapshot can only put package files where
|
|
537
|
+
packages go (`/etc`, `/usr`, `/var`, `/opt`), never a setuid file, a device,
|
|
538
|
+
or anything through a link or a folder a step could change. A package set
|
|
539
|
+
that installs a setuid program is installed with apt every time
|
|
540
|
+
(`no snapshot kept: … is setuid or setgid`). On a laptop (`foldrun run` with no container) there is nothing to
|
|
528
541
|
install into: the list is reported as assumed present.
|
|
529
542
|
|
|
530
543
|
Manim, for one, needs all four of its kinds at once:
|
|
@@ -585,9 +598,12 @@ destroyed when the step ends.
|
|
|
585
598
|
The agent is never root. A Debian package is installed by a small helper the
|
|
586
599
|
container's root start-up leaves running before it drops to the agent user;
|
|
587
600
|
the agent can only ask it, by name, and each name is checked against Debian's
|
|
588
|
-
naming rule, so nothing but a package name reaches apt. It
|
|
589
|
-
|
|
590
|
-
|
|
601
|
+
naming rule, so nothing but a package name reaches apt. It restores the same
|
|
602
|
+
snapshots as `runtime: system:`, so a set the account's steps declare is back
|
|
603
|
+
in about a second; it never saves one, because it runs beside the agent's own
|
|
604
|
+
code, and only a step's start-up, before any of that code exists, seals a
|
|
605
|
+
snapshot. Declare a package in `runtime: system:` to have it from a snapshot.
|
|
606
|
+
pip and npm packages need no root
|
|
591
607
|
and are installed as the agent, into a directory of the step's own.
|
|
592
608
|
|
|
593
609
|
A pip or npm package runs none of its own code on the way in. npm installs
|
package/docs/security.md
CHANGED
|
@@ -17,6 +17,17 @@ Startup is under a second warm, so this is not the latency it sounds like;
|
|
|
17
17
|
it is the boundary that lets one account's agent and another's share a
|
|
18
18
|
machine.
|
|
19
19
|
|
|
20
|
+
What a sandbox keeps between steps is the account's runtime cache: the
|
|
21
|
+
environments its `runtime:` declares, built once and reused. Steps write it,
|
|
22
|
+
so nothing in it is trusted by the part of a step's start-up that runs as
|
|
23
|
+
root. That part installs `runtime: system:` packages before the drop to the
|
|
24
|
+
unprivileged agent user, in an environment with none of the step's variables
|
|
25
|
+
but the proxy's, and touches the cache only as the agent user. The package
|
|
26
|
+
snapshots it restores carry a seal made with a key per account that no step
|
|
27
|
+
ever holds; a snapshot that does not match its seal is not restored, and even
|
|
28
|
+
a sealed one can only write package files where packages go
|
|
29
|
+
([system packages](agents#where-it-runs)).
|
|
30
|
+
|
|
20
31
|
## What the network allows
|
|
21
32
|
|
|
22
33
|
A run pod may reach DNS, the egress proxy where its credentials are filled
|