Skip to content

fix(session): enforce owner-only ACL for managed tool output on Windows #1385

Open

Description

@LivXue

The managed tool output file is created with os.open(..., 0o600) and
chmod(0o700); on Windows those calls only toggle the read-only
attribute, so the file inherits the workspace directory's ACL. On POSIX
the file and directory are owner-only. #1375 documents the POSIX-only
guarantee; this issue tracks the Windows hardening.

A real owner-only file on Windows needs a restricted DACL at creation.
raven/utils/atomic_io.py has a _create_with_dacl_of helper, but it
copies an existing file's DACL; a new managed file has no like source.

Acceptance: a Windows test proves a non-owner cannot read the managed
file, and the write path sets the DACL before or at creation.

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions