dsh-plugin-allcrash: Enforcing "No Plugins" on Hosts with Hard Constraints

Preface

In DSH (DeepSeek Harness), plugin lists for profiles often rely on convention or manual verification: certain packages are forbidden from being installed or enabled. A single missed check allows banned plugins to enter the runtime environment via the Web Market, CLI, or manual composition edits. Below, we introduce the community Host plugin dsh-plugin-allcrash (maintained by YV3507). It terminates the Host process immediately and leaves a crash report when a configured list is matched, transforming “verbal prohibitions” into machine-enforced guards. The design references the Minecraft Forge mod allcrash; it is categorized as admin-security on SkillHub.

What is this

dsh-plugin-allcrash is a DSH Host plugin in Cordis bundle form: once a plugin on the list is loaded, enabled, installed, or being attempted to be installed, it triggers a Host crash and generates a report under the default mode: crash. The implementation has zero dependencies (Node built-in modules only) and uses the same code for Windows / macOS / Linux; the judgment logic is separated from the crash chain to facilitate unit testing and isolated subprocess end-to-end verification.

The runtime environment must start the Host via boot() from @deepseek-ai/dsh-app-boot (applicable to both DSH Desktop and the dsh CLI). Crashes preferentially use the fail-loud installed by boot; if not installed, the plugin’s built-in 3-second fallback process.exit(1) will still terminate the process.

Core Features

Correspondence with Forge allcrash

Prototype (Forge) This Plugin (DSH)
crash_mod in config/allcrash-common.toml crash_plugin in ${DSH_HOME}/allcrash.json
Throws exception during mod loading Uncaught exception → fail-loud → process.exit(1)
crash-reports/crash-*.txt ${DSH_HOME}/crash-reports/allcrash-<local time>-<pid>.txt
Server distributes list, intercepts client tools/pre-execute intercepts plugin_manager install/enable and guard self-removal

Detection Channels

  1. L1: tools/pre-execute, intercepts the installation or enabling of banned plugins, or the shutdown/uninstallation of the guard itself before plugin_manager execution; control is not returned to the toolchain upon a hit.
  2. L2: Listens to plugin-manager/changed, install-state, app-boot/config-reload, hmr/reload; rescans immediately after profile changes.
  3. L3: Watchdog (default 5s) and scans at 0 / 250 / 1000ms after boot startup, covering paths like manual patch edits that do not trigger events.
  4. L4: agentPresets.compositionInventory(), covering rows attached to agent presets that are not on the loader tree.
  5. L5 (Optional): plugin-manager/install-log, monitoring pnpm output (requires enabling crash_on_install_log).

The judgment compares package name/path, loader row id, and plugin declared name (fiber.runtime.name) simultaneously; a hit on any one counts.

Response Modes

Global or entry-level mode adopts the stricter value:

Value Interceptable Actions (Install/Enable/Dismantle Guard) Already Loaded Plugins
crash (default) Crash Host Crash Host
deny Reject tool call, Host survives Degrade to warn
warn Alert and allow (dry-run) Alert + Audit

warn hits write to ${DSH_HOME}/.allcrash/would-crash-<time>-<pid>.txt, not into crash-reports/ (that directory indicates “actually crashed”).

Configuration and Anti-Bypass

  • The scope for the list and audit log is DSH_HOME (shared by default across profiles on the same machine); if a specific profile requires a different list, config can be written in the composition row (row configuration has higher priority; restart required after changes).
  • Deleting the config file does not turn off the guard: if a valid list was read previously and the file disappears, it will reuse the last list, write it back to the file, and alert; to disable, explicitly set "crash_plugin": [].
  • Upon parsing failure, it reuses the last valid configuration and alerts, never silently falling back to a placeholder list.

Installation and Activation

Install from GitHub (live profiles take effect immediately after installation; startup profiles require a restart):

plugin_manager  action=install_bundle  target=github:YV3507/dsh-plugin-allcrash
dsh plugin --profile <profile> add github:YV3507/dsh-plugin-allcrash

Install from local directory (development/personal use):

plugin_manager  action=install_bundle  target=<absolute path of this directory>
dsh plugin --profile <profile> add <absolute path of this directory>

After installation, dsh-plugin-allcrash (enabled) should appear in the manifest. The first run generates default configuration at ${DSH_HOME}/allcrash.json (default ~/.dsh/allcrash.json); the default list is the placeholder ["example-plugin"], which will not trigger a crash at this time.

The repository package.json current version is 1.1.0, requires Node >=20, License MIT.

Typical Usage

1. Edit the Ban List

Modify crash_plugin in ${DSH_HOME}/allcrash.json. It takes effect on the next scan (default ≤ 5 seconds) without restarting the Host. Example structure:

{
  "crash_plugin": [
    "example-plugin",
    "dshmarket@1.66.0",
    "bad-plugin@<2.0.0",
    { "name": "risky-plugin", "version": ">=2.0.0", "mode": "deny", "reason": "2.x changes data format" }
  ],
  "mode": "crash",
  "crash_on_install_attempt": true,
  "guard_self_removal": true,
  "watch_interval_ms": 5000,
  "audit_log": true
}

Names can be package names, loader row ids, or declared names; supports name@version and semver approximate constraints (= > >= < <= ^ ~ etc., does not support || or - ranges). If the version cannot be obtained, it does not count as a hit (fail-open), and records a policy-note in the audit; scans after installation will obtain the exact version for judgment.

2. Trial the List with warn First

Set the global mode to warn, observe would-crash in .allcrash/would-crash-*.txt and watch.log, confirm the target objects, then change to crash or deny.

3. Override Configuration in Composition

When a specific profile needs a dedicated list (priority higher than global json, restart required after modification):

- insert:
    - id: allcrash
      name: 'dsh-plugin-allcrash'
      config:
        crash_plugin: ['dshmarket']

4. Troubleshooting After a Crash

Under default mode: crash, after the Host (Electron utility process) exits, the Desktop may prompt DSH Host exited (1); restart the application to reconnect. The report path is ${DSH_HOME}/crash-reports/allcrash-<local time>-<pid>.txt, containing sections like Detected, Plugin tree, Environment, Recovery; for audits, you can grep CRASH, would-crash, DENY in ${DSH_HOME}/.allcrash/watch.log.

Use Cases and Notes

Who it is for: Administrators who need to write “plugins that must never appear” as auditable, interceptable policies on team or personal machines; working with the DSH “everything is a plugin” ecosystem, using Host-side guards to fill the gap left by manual checks.

Please be aware before use:

  • The plugin runs with the permissions of the current DSH Host process. Before installation, please read the GitHub Source Code and the MIT License, and assess the risks yourself.
  • deny cannot stop banned plugins that are “already loaded”; in this case, only warn or change back to crash and uninstall the violating plugin.
  • crash_on_install_log defaults to false; for installation channels not passing through plugin_manager, enable it as needed and understand the “Known Behaviors” description in the README.
  • The SkillHub directory page and GitHub are maintained by the community and have no official affiliation with DeepSeek / High-Flyer; metadata such as stars is subject to the display at the time on each site.

Conclusion

dsh-plugin-allcrash turns the banned plugin list into L1–L5 multi-layer detection and optional crash/deny/warn responses, and uses fail-loud and crash reports to secure the violation scene under the default crash mode. To view the introduction and classification, open the SkillHub Directory Page; for installation commands, configuration fields, and behavioral details, refer to the GitHub README.

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

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

Xiaoye