@landstrip/landstrip 0.18.27 → 0.18.28
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 +31 -148
- package/bin/landstrip.js +0 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,50 +1,46 @@
|
|
|
1
|
-
<!-- SPDX-License-Identifier:
|
|
1
|
+
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
|
2
2
|
<!-- Copyright (C) Jarkko Sakkinen 2026 -->
|
|
3
3
|
|
|
4
4
|
# landstrip
|
|
5
5
|
|
|
6
|
-
`landstrip` runs
|
|
7
|
-
macOS, and AppContainer or
|
|
6
|
+
`landstrip` runs commands in an OS-level sandbox using Landlock on Linux,
|
|
7
|
+
Seatbelt on macOS, and AppContainer or restricted users on Windows. Policies use
|
|
8
8
|
the supported subset of the Anthropic Sandbox Runtime format.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Installation
|
|
11
11
|
|
|
12
12
|
```sh
|
|
13
13
|
npm install --save-dev @landstrip/landstrip
|
|
14
14
|
npx landstrip run -p policy.json -- cargo test
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
The npm package
|
|
17
|
+
The npm package installs a Node.js wrapper and a native binary for the current
|
|
18
|
+
platform.
|
|
18
19
|
|
|
19
|
-
##
|
|
20
|
+
## Quick start
|
|
20
21
|
|
|
21
|
-
```
|
|
22
|
-
landstrip run
|
|
23
|
-
landstrip policy validate
|
|
24
|
-
landstrip policy resolve
|
|
22
|
+
```sh
|
|
23
|
+
landstrip run -p policy.json -- cargo test
|
|
24
|
+
landstrip policy validate -p policy.json
|
|
25
|
+
landstrip policy resolve -p policy.json
|
|
25
26
|
landstrip doctor
|
|
26
|
-
landstrip windows install [OPTIONS]
|
|
27
|
-
landstrip windows status
|
|
28
|
-
landstrip windows uninstall
|
|
29
27
|
```
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
Windows builds also provide `windows install`, `windows status`, and
|
|
30
|
+
`windows uninstall`. Full command reference: `landstrip --help` and the
|
|
31
|
+
[manual page](man/man1/landstrip.1).
|
|
32
|
+
|
|
33
|
+
### Agent extensions
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
```sh
|
|
36
|
+
pi install npm:pi-landstrip
|
|
37
|
+
opencode plugin install opencode-landstrip
|
|
38
|
+
```
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
policy attached to that executable. Executable policy is applied last from the
|
|
44
|
-
`user.landstrip.policy` extended attribute on Unix or the `landstrip.policy`
|
|
45
|
-
NTFS alternate data stream on Windows.
|
|
40
|
+
See [pi-landstrip](packages/pi-landstrip/README.md) and
|
|
41
|
+
[opencode-landstrip](packages/opencode-landstrip/README.md).
|
|
46
42
|
|
|
47
|
-
## Policy
|
|
43
|
+
## Policy sketch
|
|
48
44
|
|
|
49
45
|
```json
|
|
50
46
|
{
|
|
@@ -57,133 +53,20 @@ NTFS alternate data stream on Windows.
|
|
|
57
53
|
"network": {
|
|
58
54
|
"allowNetwork": false,
|
|
59
55
|
"httpProxyPort": 8080,
|
|
60
|
-
"socksProxyPort": 1080,
|
|
61
56
|
"allowLocalBinding": false,
|
|
62
|
-
"allowAllUnixSockets": false,
|
|
63
57
|
"allowUnixSockets": []
|
|
64
|
-
},
|
|
65
|
-
"windows": {
|
|
66
|
-
"appContainerMode": "lpac",
|
|
67
|
-
"allowLoopback": false
|
|
68
58
|
}
|
|
69
59
|
}
|
|
70
60
|
```
|
|
71
61
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`*`, `**`, `?`, and character-class globs.
|
|
75
|
-
|
|
76
|
-
### Filesystem
|
|
77
|
-
|
|
78
|
-
| Field | Default | Effect |
|
|
79
|
-
| --- | --- | --- |
|
|
80
|
-
| `allowWrite` | `[]` | Writable roots |
|
|
81
|
-
| `denyWrite` | `[]` | Hard write denials; takes precedence over `allowWrite` |
|
|
82
|
-
| `denyRead` | `[]` | Read restrictions; empty means unrestricted reads |
|
|
83
|
-
| `allowRead` | `[]` | Exceptions to `denyRead` |
|
|
84
|
-
|
|
85
|
-
When read rules overlap, the most specific rule wins. Concrete `denyWrite` paths
|
|
86
|
-
work on every platform. Linux and macOS also enforce glob denials at access time,
|
|
87
|
-
including for newly created files; Windows does not enforce glob `denyWrite`.
|
|
88
|
-
|
|
89
|
-
### Network
|
|
90
|
-
|
|
91
|
-
| Field | Default | Effect |
|
|
92
|
-
| --- | --- | --- |
|
|
93
|
-
| `allowNetwork` | `false` | Disables network enforcement when `true` |
|
|
94
|
-
| `httpProxyPort` | unset | Allows loopback connection to this port |
|
|
95
|
-
| `socksProxyPort` | unset | Allows loopback connection to this port |
|
|
96
|
-
| `allowLocalBinding` | `false` | Allows local TCP binding and loopback connections |
|
|
97
|
-
| `allowAllUnixSockets` | `false` | Allows every Unix socket |
|
|
98
|
-
| `allowUnixSockets` | `[]` | Allows listed pathname Unix sockets |
|
|
99
|
-
|
|
100
|
-
Landstrip does not start a proxy or filter domains. Direct TCP and new Unix
|
|
101
|
-
sockets are denied unless allowed by these fields.
|
|
102
|
-
|
|
103
|
-
### Windows
|
|
104
|
-
|
|
105
|
-
`windows.appContainerMode` is `"lpac"` by default; `"standard"` is weaker
|
|
106
|
-
because it can read resources granted to `ALL APPLICATION PACKAGES`.
|
|
107
|
-
`windows.allowLoopback` exposes every local loopback service in AppContainer;
|
|
108
|
-
without it, proxy ports are blocked. The removed `windows.backend` field is an
|
|
109
|
-
error.
|
|
110
|
-
|
|
111
|
-
Windows requires explicit read roots. ACL allow roots must exist when policy is
|
|
112
|
-
resolved; missing `allowRead` and `allowWrite` targets are omitted and remain
|
|
113
|
-
inaccessible. Windows does not support `allowLocalBinding` or Unix socket
|
|
114
|
-
policy.
|
|
115
|
-
|
|
116
|
-
Use `landstrip windows install` when software such as Git Bash cannot start in
|
|
117
|
-
AppContainer. It provisions restricted local users and activates that mode.
|
|
118
|
-
`windows uninstall` removes it. An unhealthy installation fails closed; inspect
|
|
119
|
-
it with `windows status`. Restricted-user mode permits proxy ports only from the
|
|
120
|
-
range selected at installation and does not support `windows.allowLoopback`.
|
|
121
|
-
|
|
122
|
-
## Platform enforcement
|
|
123
|
-
|
|
124
|
-
| Platform | Filesystem | Network |
|
|
125
|
-
| --- | --- | --- |
|
|
126
|
-
| Linux | Landlock and seccomp | TCP and Unix socket rules |
|
|
127
|
-
| macOS | Seatbelt | TCP and Unix socket rules |
|
|
128
|
-
| Windows | AppContainer or restricted user | AppContainer capabilities or account-scoped WFP |
|
|
129
|
-
|
|
130
|
-
## Agent extensions
|
|
131
|
-
|
|
132
|
-
[pi-landstrip](packages/pi-landstrip/README.md) and
|
|
133
|
-
[opencode-landstrip](packages/opencode-landstrip/README.md) integrate Landstrip
|
|
134
|
-
with coding agents.
|
|
135
|
-
|
|
136
|
-
- **Agent permissions** authorize tool dispatch.
|
|
137
|
-
- **Sandbox permissions** authorize filesystem and network access.
|
|
138
|
-
|
|
139
|
-
An agent approval does not bypass the sandbox. Each plugin documents its prompt
|
|
140
|
-
order, approval scopes, and configuration files.
|
|
141
|
-
|
|
142
|
-
```sh
|
|
143
|
-
pi install npm:pi-landstrip
|
|
144
|
-
opencode plugin install opencode-landstrip
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Traps
|
|
148
|
-
|
|
149
|
-
Landstrip failures and broker-reported denials are JSON objects with stable
|
|
150
|
-
`kind` and `code` fields. Completed records go to standard error.
|
|
151
|
-
|
|
152
|
-
On Unix, `--trap-fd FD` writes structured events to an already-open descriptor
|
|
153
|
-
numbered 3 or higher. On Linux, a socket trap descriptor can receive a
|
|
154
|
-
filesystem or network event with `state: "query"`; the operation waits for its
|
|
155
|
-
host to answer. Kernel-only and static-profile denials do not always emit a
|
|
156
|
-
per-access event. Trap kinds are `filesystem`, `network`, `launch`, `usage`, and
|
|
157
|
-
`internal`.
|
|
158
|
-
|
|
159
|
-
## Development
|
|
160
|
-
|
|
161
|
-
```sh
|
|
162
|
-
make ci
|
|
163
|
-
CI_MSRV=1 make ci
|
|
164
|
-
make package
|
|
165
|
-
make package PLATFORMS='linux-x64 win32-x64'
|
|
166
|
-
PACKAGE_STRICT=1 make package
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
`scripts/ci.sh` checks Rust and every agent-extension workspace, stages the host
|
|
170
|
-
binary, and smoke-tests the npm wrapper. Packaging uses `cross` and Docker for
|
|
171
|
-
cross targets. macOS targets build natively on macOS; Linux hosts require local
|
|
172
|
-
osxcross images. Windows Arm64 requires the local
|
|
173
|
-
`ghcr.io/cross-rs/aarch64-pc-windows-msvc-cross:local` image.
|
|
174
|
-
|
|
175
|
-
After `scripts/release.sh <version>` and pushing the tag:
|
|
176
|
-
|
|
177
|
-
```sh
|
|
178
|
-
make ci
|
|
179
|
-
PACKAGE_STRICT=1 make package
|
|
180
|
-
make publish
|
|
181
|
-
```
|
|
62
|
+
Pass policies with `-p, --policy <FILE>` (repeatable). Semantics, platform
|
|
63
|
+
limits, traps, and exit status are in the manual page.
|
|
182
64
|
|
|
183
|
-
|
|
184
|
-
archives from locally packaged artifacts.
|
|
65
|
+
## License
|
|
185
66
|
|
|
186
|
-
|
|
67
|
+
`landstrip` is free software under the GNU Lesser General Public License
|
|
68
|
+
version 2.1 or later (LGPL-2.1+). See [LICENSE-LGPL-2.1](LICENSE-LGPL-2.1).
|
|
187
69
|
|
|
188
|
-
The JavaScript wrapper is
|
|
189
|
-
|
|
70
|
+
The JavaScript npm wrapper is under the Apache License 2.0. See
|
|
71
|
+
[LICENSE-APACHE-2.0](LICENSE-APACHE-2.0). Corresponding source for each native
|
|
72
|
+
package is available from the matching repository tag.
|
package/bin/landstrip.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@landstrip/landstrip",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.28",
|
|
4
4
|
"description": "Sandbox runner using Landlock, Seatbelt, and AppContainer",
|
|
5
5
|
"license": "Apache-2.0 AND LGPL-2.1-or-later",
|
|
6
6
|
"homepage": "https://github.com/landstrip/landstrip#readme",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"LICENSE-LGPL-2.1"
|
|
31
31
|
],
|
|
32
32
|
"optionalDependencies": {
|
|
33
|
-
"@landstrip/landstrip-darwin-arm64": "0.18.
|
|
34
|
-
"@landstrip/landstrip-darwin-x64": "0.18.
|
|
35
|
-
"@landstrip/landstrip-linux-x64": "0.18.
|
|
36
|
-
"@landstrip/landstrip-linux-arm64": "0.18.
|
|
37
|
-
"@landstrip/landstrip-win32-x64": "0.18.
|
|
38
|
-
"@landstrip/landstrip-win32-arm64": "0.18.
|
|
33
|
+
"@landstrip/landstrip-darwin-arm64": "0.18.28",
|
|
34
|
+
"@landstrip/landstrip-darwin-x64": "0.18.28",
|
|
35
|
+
"@landstrip/landstrip-linux-x64": "0.18.28",
|
|
36
|
+
"@landstrip/landstrip-linux-arm64": "0.18.28",
|
|
37
|
+
"@landstrip/landstrip-win32-x64": "0.18.28",
|
|
38
|
+
"@landstrip/landstrip-win32-arm64": "0.18.28"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|