dsh-workspace-acl-allow: Preset Windows ACL Authorization for Explicitly Declared Workspace Directories

Introduction

DeepSeek Harness (DSH) has included a Low-integrity label in the grantWrite feature since version 0.1.7, and raised the permission threshold from a simple DACL capability ACE to requiring WRITE_DAC and WRITE_OWNER. As a result, ordinary directories (with only inherited Modify permissions) are denied when writing, causing process launch failures and UAC elevation prompts.

This plugin operates within the host process and pre-populates a Windows ACL Full Control permission entry for workspace directories explicitly declared by the user (including the permission to change ownership), enabling dsh’s file sandbox to start restricted processes normally and avoiding temporary elevation of the session to full access.

Plugin Overview

Name: dsh-workspace-acl-allow
Maintainer: lovezi0
Category: admin-security
Open source license: MIT

This plugin provides a permission patch for DSH’s declarative workspace model. It does not take over the working directory of any session; permissions are relaxed only when the user explicitly expresses intent (adding a workspace or manually adding a path).

Core Features

  1. Automatic grant: When a workspace is added in dsh, the plugin automatically pre-populates the grant for that directory.
  2. Manual grant: Manually enter a directory path and add it in the “Workspace Grant Allowlist” on the plugin page.
  3. Status display: Displays grant status (granted, failed, protected, not found). Failed items can be inspected for the exit code and retried.
  4. Management features: Supports re-granting and removing records (only removes the entry from the plugin list; it does not revoke permissions that have already been applied).
  5. Built-in protections: Rejects grants for sensitive paths such as drive roots, system directories, and user profile root directories.
  6. Configuration options: Supports enabling recursive grants, setting a retry cooldown for failed grants, and adding exclusion paths.

Installation

Install it through the official plugin manager:

dsh plugin --profile web add dsh-workspace-acl-allow

After installation, the configuration layer is loaded together with the profile.

Usage

Grants occur only when you explicitly express intent. There are two entry points:

  1. Add a workspace: Add a workspace in dsh. The plugin completes the grant immediately after the record is written. Workspaces registered before plugin startup are granted during load.
  2. Manual addition: Open Plugin page → this plugin → “Workspace Grant Allowlist” at the bottom of the details page, enter a directory path, and add it.

If you encounter an “Access Denied” error, you can check the status in the list. If the status is “Grant Failed”, common causes are that the directory owner is not the current user, or that the current user does not have permission to modify the DACL.

Platforms and Limitations

  • Windows only: The plugin has no effect on non-Windows platforms.
  • Explicit declaration principle: The plugin does not take over the working directory of any session, nor does it silently relax permissions because a session is opened in a directory. Permission relaxation must be manually declared by the user on the plugin page.
  • Grant scope: The grant applies only to a single permission entry on the workspace root directory and does not recursively modify child item permissions (unless deepGrant is enabled in the configuration).
  • Side effects: For processed directories, the current user changes from “inherited modify” to “explicit full control”. Removing a list entry does not revoke permissions that have already been applied; this is managed by dsh’s own permission system.

Configuration

Configuration is written in the profile configuration layer.

Field Default value Description
watchWorkspaces true Whether to subscribe to workspace creation events. When disabled, only the manual addition entry point remains.
deepGrant false Whether to process child items recursively. Enable this only when child directory inheritance is broken.
retryCooldownMs 3600000 Cooldown period for failed grant entries (milliseconds); no repeated attempts are made during the cooldown.
excludePaths [] Additional exclusion patterns (supports * and **); only content not covered by built-in protections can be added.

Summary

By explicitly granting Full Control within the host process, this plugin resolves the permission threshold issue caused by the Low-integrity label introduced in DSH 0.1.7+. It uses a declarative design, avoiding UAC prompts when restricted processes are executed, and is suitable for scenarios that frequently use the dsh workspace sandbox on Windows.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye