GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Windows sandbox does not deny reads of cloud credential stores · Issue #663 · Twigpine/zero

Windows sandbox does not deny reads of cloud credential stores #663

New issue
Copy link
New issue
Copy link
Closed
Closed
Windows sandbox does not deny reads of cloud credential stores#663
Copy link

Description

@euxarist
euxarist
opened on Jul 12, 2026
Issue body actions

Context

PR #660 added default deny-read rules so sandboxed commands cannot read well-known credential stores (~/.aws, ~/.config/gcloud, ~/.azure, and the file GOOGLE_APPLICATION_CREDENTIALS points to). The rules are injected at permission profile construction (credentialDenyReadPaths in internal/sandbox/profile.go) and enforced by the seatbelt backend on macOS (file-read* deny rules) and the Linux helper (unreadable binds).

Windows is deliberately exempted, so on Windows a sandboxed command can still read those credential files under the read-all workspace posture.

Why Windows was skipped

Windows deny-read is implemented via ACL deny entries applied against capability SIDs (planWindowsDenyReadPaths / windowsReadDenyCapabilitySIDs in internal/sandbox/windows_acl.go). Making the profile DenyRead list non-empty by default has two side effects:

  1. windowsReadDenyCapabilitySIDs stops returning nil, which moves the runner off the WRITE_RESTRICTED token path that fix(sandbox): use WRITE_RESTRICTED token when no DenyRead paths are configured #658 introduces for the no-deny-read case. The unelevated tier depends on that path; the full restricted-token path has a history of commands silently exiting 1 when unelevated.
  2. The ACL deny entries mutate filesystem ACLs on the user's real credential directories, which is a heavier and more persistent intervention than the process-scoped seatbelt/bwrap rules on the other platforms, and needs elevation in some configurations.

What needs deciding

  • Whether default credential deny-read on Windows should wait for the token/ACL model to settle (fix(sandbox): keep Windows restricted-token SIDs narrow (no Users broaden) #640, fix(sandbox): use WRITE_RESTRICTED token when no DenyRead paths are configured #658 are in flight), or whether a scoped mechanism exists that does not flip the token selection.
  • Whether ACL-based deny on real user directories is acceptable at all as a default, given it outlives the sandboxed process.
  • Whether the interim mitigation (env scrubbing of provider keys and GOOGLE_APPLICATION_CREDENTIALS, which does apply on Windows) is enough until then.

Pointer

The exemption and rationale are documented on credentialDenyReadPaths in internal/sandbox/profile.go ("Windows is skipped" comment). Remove the runtime.GOOS gate there once a Windows mechanism lands.

Activity

  1. Vasanthdev2004 commented on Jul 26, 2026

    @Vasanthdev2004
    Vasanthdev2004
    on Jul 26, 2026
    Collaborator
    More actions

    Closing as a duplicate of #662. The two were submitted 19 seconds apart with identical titles and byte-identical bodies, so this looks like an accidental double-submit rather than a second report.

    The underlying issue is real and stays open on #662, where the discussion should continue.

  2. Vasanthdev2004
    closed this as completedon Jul 26, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.