{"id":50727186,"url":"https://github.com/jarkkojs/landstrip","last_synced_at":"2026-06-13T16:01:16.370Z","repository":{"id":361779890,"uuid":"1255794238","full_name":"jarkkojs/landstrip","owner":"jarkkojs","description":"A sandbox for coding agents with parametrized state.","archived":false,"fork":false,"pushed_at":"2026-06-10T01:33:18.000Z","size":242,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-10T05:23:04.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jarkkojs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE-2.0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-01T07:14:36.000Z","updated_at":"2026-06-10T01:33:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jarkkojs/landstrip","commit_stats":null,"previous_names":["jarkkojs/landstrip"],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/jarkkojs/landstrip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkkojs%2Flandstrip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkkojs%2Flandstrip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkkojs%2Flandstrip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkkojs%2Flandstrip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarkkojs","download_url":"https://codeload.github.com/jarkkojs/landstrip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarkkojs%2Flandstrip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34290348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-10T05:01:40.327Z","updated_at":"2026-06-13T16:01:16.363Z","avatar_url":"https://github.com/jarkkojs.png","language":"Rust","funding_links":[],"categories":["Sandboxing \u0026 Isolation"],"sub_categories":[],"readme":"# landstrip\n\n`landstrip` runs a tool in an OS-level sandbox using Landlock LSM on Linux,\nSeatbelt on macOS, and LPAC AppContainer on Windows.  It accepts the Anthropic\nSandbox Runtime JSON subset as the policy, in JSON or YAML syntax.\n\n## Installation\n\n### npm\n\n```sh\nnpm install --save-dev @jarkkojs/landstrip\n```\n\n```sh\nnpx landstrip -p policy.json cargo test\n```\n\nThe npm package installs a small Node.js wrapper and a platform-specific native\nbinary package.\n\n## Platforms\n\n| Area         | macOS                    | Linux                        | Windows                         |\n| ------------ | ------------------------ | ---------------------------- | ------------------------------- |\n| Policy       | path based rules         | file based rules             | access control list (ACL)       |\n| Timing       | dynamic subset of paths  | file based static ruleset    | persistent ACLs                 |\n| TCP          | localhost proxy ports    | loopback proxy ports         | unsupported                     |\n| Unix sockets | allowlist                | allowlist via seccomp broker | unsupported                     |\n\nWindows uses an AppContainer. The platform grants the generated AppContainer SID\naccess to the lowered read and write roots, so Windows policies must use\nexplicit read allowlists. Fine-grained TCP and Unix socket policies are rejected\nuntil Windows enforcement exists.\n\n## Policy Format\n\nJSON is the default policy format. Use `--format yaml` for YAML policy files or\nYAML read from standard input.\n\n```sh\nlandstrip --format yaml -p policy.yaml cargo test\n```\n\nYAML path fields can use normal lists or one statement per line:\n\n```yaml\nfilesystem:\n  allowWrite: |\n    .\n    ~/.cargo\n  denyRead: |\n    ~/.ssh\n  allowRead: |\n    ~/.ssh/config\nnetwork:\n  allowNetwork: true\n```\n\n## Network Policy\n\nSandbox mode denies direct network access by default. Proxy ports, local binding,\nand Unix sockets can be allowed with the Anthropic Sandbox Runtime network fields.\n\nFor a filesystem-only sandbox with unrestricted direct network access, set:\n\n```json\n{\n  \"network\": {\n    \"allowNetwork\": true\n  }\n}\n```\n\nOn Linux and macOS, `allowNetwork` disables landstrip network enforcement while\nleaving filesystem policy enforcement in place. Windows rejects unrestricted\nnetwork policies until Windows network support exists.\n\n## Error Output\n\nFailures reported by `landstrip` are printed as `field: value` lines on standard\nerror, one line per field. Fields with no value are omitted.  This covers\npolicy, tool launch, platform, and system errors. Usage errors are not formatted\nresponses; they remain on standard error and exit with status 2.\n\n```\nreason: Other\nfile: policy.json\nsource: expected value at line 1 column 1\n```\n\n```\nreason: LaunchFailed\nprogram: cargo\ntype: launch\nsource: No such file or directory\n```\n\nThe `reason` field describes the error kind (e.g. `Other`, `LaunchFailed`,\n`SetupFailed`, `Usage`). The `file` field is present when a policy error is tied\nto a policy file. The `program` field is present when landstrip could not start\nor encode a tool. The `type` field is present for policy or tool errors and is\neither `filesystem`, `network`, or `platform` for policy errors, or `launch`\n(failed to start the tool) or `encoding` (failed to encode the command line) for\ntool errors.\n\nLogs and sandboxed tool output are not part of the response. Normal successful\ntool execution does not print a landstrip response because standard error\nbelongs to landstrip; standard output belongs to the sandboxed tool.\n\n## Development\n\n### Commit messages\n\n- **`\u003csubsystem\u003e: \u003cmessage\u003e`**\n- Long description for non-trivial changes.\n- Kernel style commit messages.\n- **`Signed-off-by`**\n\n### Documenting errors\n\nThe following snippet demonstrates the recommended pattern for documenting\nthe return values on error:\n\n```\n/// # Errors\n///\n/// Returns [`\u003cvariant's unqualified name\u003e`](\u003cvariant's unqualified name\u003e)\n/// Returns ...\n```\n\n## Licensing\n\nThe JavaScript npm wrapper is licensed under `Apache-2.0`. The Rust source and\nnative binaries are licensed under `LGPL-2.1-or-later`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarkkojs%2Flandstrip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarkkojs%2Flandstrip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarkkojs%2Flandstrip/lists"}