Skip to content

Confine file writes of services to the repository (Landlock on Linux, low integrity on Windows) #2

Open

Description

@7schmiede

Deferred. ADR-0022 covers outbound network calls only. Writes outside the repository (a service or a build deleting or changing files elsewhere in the user's profile) are not covered by anything today.

What exists, without elevation

  • Linux: Landlock (kernel 5.13+ for the file system): the shim restricts a service's process tree to writing in the repository, the state directory, temp and named extra paths; reads stay allowed. Unprivileged, inherited by children.
  • Windows: a low-integrity token. A process at low integrity may write only to locations labelled low (%LOCALAPPDATA%Low, folders labelled with icacls /setintegritylevel low), which the owner can label without admin rights. Reads stay allowed. Much less invasive than an AppContainer (which also cuts loopback and registry access).

Open questions

  • Toolchains write to their caches (NuGet %USERPROFILE%\.nuget, npm cache, Go module cache, ~/.m2): label them or list them as allowed paths per stack?
  • Builds and services the same, or only services?
  • Opt-in per stack ([sandbox] files = "repo"?) and an audit mode first, like ADR-0022 stage 1?

Next step

A proposed ADR next to ADR-0022, with a spike on Windows: does a .NET and a Node service run at low integrity with their caches labelled?

Activity

  1. added
    enhancement
    on Oct 15, 2026
  2. added
    icebox
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementicebox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions