DSH Plugins Marketplace

DSH Plugins

Plugins

/

Security & Audit

/

dsh-plugin-safe-route

d

dsh-plugin-safe-route

Manifest valid

Read-only DSH command that audits which model routes a session used and flags calls outside a configurable allowlist.

hasBundlePatch

dsh-plugin-safe-route

One command tells you which models your DSH session actually used — and flags any route outside your allowlist.

Cost/context plugins display spending after the fact. safe-route judges the route against a policy you control, so a paid-model slip is visible in one keystroke. It is read-only: it reads provider/model names from session events, never prompts, tool bodies, or file contents, and it makes no network calls.

Install

dsh plugin --profile web add dsh-plugin-safe-route

Requires Node ^22.19.0 || >=24 and DSH >=0.2.0-rc.2 <0.3.0.

30-second demo

  1. Use DSH normally for a few turns.
  2. In any session, type /route-check.
  3. You get a compact scorecard:
[route-check] 1/3 calls outside allowlist · score 67/100 · REVIEW
  opencode-go/hy4-flash-free         2 call(s)  ALLOWED
  deepseek-official/deepseek-v4-pro  1 call(s)  UNKNOWN
Fix: switch the default model to an allowed route, or update the allowlist in cordis.patch.yml.

Use /route-check --json for machine-readable output (CI, scripts, dashboards).

Configuration

The bundle patch seeds an allowlist of free routes. Edit the row in your profile's cordis.patch.yml to change it:

- id: dsh-plugin-safe-route
  name: dsh-plugin-safe-route
  config:
    policy:
      allow:
        - provider: opencode-go
          model: hy4-flash-free
        - provider: opencode-go
          model: longcat-2.5-free
      deny:
        - provider: opencode-go
          model: hy4            # paid sibling — flag explicitly
KeyTypeDefaultMeaning
policy.allow{provider, model?}[]the two free opencode-go routesRoutes counted as ALLOWED. Omit model (or use *) to match the whole provider.
policy.deny{provider, model?}[][]Routes counted as DENIED. Deny wins over allow.

An invalid or empty allow falls back to the default free-route list, so a typo cannot silently disable the check.

Scoring

score = round(100 × allowed calls / all observed model calls). An empty session scores 100. verdict is clean (no out-of-policy routes), review (some unknown), or violation (any denied).

Privacy & safety

  • Only provider and model strings are read from request/header and request/context events.
  • No prompt, reasoning, tool result, file, or credential is read or stored.
  • No network calls, no telemetry, no file writes.
  • Report text is passed through a redaction filter before display.

Compatibility

ComponentSupported
DSH>=0.2.0-rc.2 <0.3.0
Node^22.19.0 || >=24.0.0
Cordis>=4.0.0 <5
Surfaceheadless and web (command registry only)

Troubleshooting

SymptomCauseFix
/route-check not foundBundle row not installedRe-run dsh plugin --profile web add dsh-plugin-safe-route, then restart DSH.
Score is 100 but I used a paid modelThe route isn't in allow or denyAdd an explicit deny rule for it.
no model calls observedNo request/* events in this session yetUse the session once, then re-run.
Wrong allowlistProfile cordis.patch.yml overrides the bundle rowThe last write wins — edit the profile row, not the package.

Development

npm install
npm test
npm pack --dry-run

Tests are fully offline: synthetic event fixtures, no model or network calls.

License

MIT

Demo

Demo

Listed in

Related plugins

Comments

Loading…

Similar plugins

dsh-loose-review

by IFIAnder

Reviews destructive shell commands with a model before they run, asks you to confirm or blocks them, and aborts a running command once it has deleted too many files.

Security & AuditManifest valid

★ 0

MIT

JavaScript

Oct 29, 2026

dsh plugin --profile web add dsh-loose-review

by Mengshang-spec

Read-only DSH plugin auditor with static scanning, current-session model review, and confirmation gates.

Security & AuditDevelopment & InfrastructureManifest valid

★ 1

MIT

JavaScript

Aug 27, 2026

dsh plugin --profile web add dsh-plugin-trustlens

Static and runtime security guard for dsh: rule-based scans for malicious code, prompt injection and token waste, runtime interception of dangerous tool calls, /scan command, plugin_scan tool, web pan

Security & AuditDevelopment & InfrastructureManifest valid

★ 0

dsh plugin --profile web add dsh-security-guard

by tancheng33

Runtime security gate on the tool pipeline: denies calls naming hosts outside an egress allowlist, redacts credentials from results at the canonical value rather than only the rendered content, and ap

Security & AuditDevelopment & InfrastructureManifest valid

★ 1

↓ 95/wk

MIT

TypeScript

Sep 22, 2026

dsh plugin --profile web add dsh-egress-guard

String-matches tool-call input arguments, blocks dangerous tool calls (deny) or allows them with an injected warning (warn), and ships a full rules-management panel.

Security & AuditDevelopment & InfrastructureManifest valid

★ 0

dsh plugin --profile web add @jypjypjypjyp/dsh-guardrail

Pre-execute hook that denies writes under a read-only result zone of protected roots; every other path passes through.

Security & AuditManifest valid

★ 0

dsh plugin --profile web add dsh-staging-guard