Foreword¶
The DSH local environment hosts API keys, tokens, session content, and plugin loading boundaries. Misconfigurations such as services listening on public networks, overly permissive credential file permissions, untrusted plugin sources, and abnormal session file structures can all introduce real risks.
Existing tools have their own focuses: plugin-check only performs structural/compliance checks and does not assess credential exposure, dangerous capabilities, or path escapes; session-health only conducts health diagnostics and does not involve source trustworthiness or security risk adjudication; manual item-by-item checks are prone to omissions and difficult to document and reproduce.
The following introduces the community plugin omdsh-dev/dsh-security-audit: it audits the local DSH environment in a read-only manner, outputting sanitized, reproducible, and locatable risk reports. It does not automatically fix issues, connect to remote systems, execute audited plugins, or treat “not found” as “secure.”
What This Is¶
dsh-security-audit is a DSH local security audit plugin published by maintainer omdsh-dev, classified as admin-security. Its npm package name is @deepseek-ai/dsh-security-audit, row id is security-audit, and it is licensed under MIT.
The plugin registers a security_audit tool, uniformly outputting JSON text strings. The scan scope covers:
- DSH configuration, profile, env/credentials metadata
- Installed plugin sources and dangerous static capabilities
- Session directory permissions and file structures
- Listening configurations and network exposure
All action outputs include an envelope { tool, version, root, platform, ... }; scanning actions also include verdict/riskVerdict/coverageVerdict and summary.
Core Features¶
Security Model¶
The auditor itself has clear boundaries:
- Read-only: Does not modify or delete any files, does not execute audited plugin code, and does not actively connect to remote targets.
- Secret sanitization: Suspected secrets only return type, length, in-process random HMAC fingerprint, path, and line number; complete values do not appear in canonical output.
- Path fencing: Paths undergo lstat → realpath → containment checks;
rootis fixed to the$DSH_HOMEresolved at process startup (orallowedRootdeclared by an administrator), and parameters cannot expand the read scope. - Honest judgment: Four states: finding / pass /
skipped/error;skippedanderrorare not counted as pass, coverage is downgraded toincomplete;capability findingonly prompts for manual confirmation and does not adjudicate maliciousness. - Budget limits: Files ≤ 200, plugins ≤ 200, sessions ≤ 1,000, findings ≤ 1,000; single action 10s / report 30s.
Six Actions¶
| Action | Purpose |
|---|---|
scan_config |
Audits DSH configuration, profile, env/credentials metadata (secret presence, permissions, external endpoints) |
scan_plugins |
Checks installed plugin sources, paths, patches, dangerous static capabilities, install scripts, secret files |
scan_sessions |
Checks session directory permissions, symlink escapes, zstd frame structures (within decompression bomb budget) |
scan_network |
Parses listening configurations, URL classification, plaintext HTTP, proxy routing (does not actively network) |
report |
Aggregates four types of scans, outputs riskVerdict + coverageVerdict dual dimensions |
rules |
Lists rule directories and applicable platforms |
Common parameters:
| Parameter | Description |
|---|---|
action |
Required: scan_config / scan_plugins / scan_sessions / scan_network / report / rules |
root |
Root override; must equal $DSH_HOME or allowedRoot declared by an administrator |
profile |
Limits to a single profile (^[A-Za-z0-9._-]{1,64}$, paths not accepted) |
strict |
Strict mode: medium findings also fail, default false |
detail |
Detailed output, default true; sensitive evidence is always sanitized |
includeSourceScan |
Enables plugin static source capability scanning (slower, more false positives), default false |
Output Example¶
The typical output of the report action is as follows. Note that fingerprint and redacted:true are sanitization protocol fields, not truncation indicators:
{"tool":"security_audit","version":1,"root":"$DSH_HOME","platform":"win32","strict":false,
"verdict":"fail","riskVerdict":"fail","coverageVerdict":"complete",
"summary":{"critical":0,"high":1,"medium":0,"low":0},
"findings":[{"code":"secret-in-settings","severity":"high","state":"finding",
"evidence":{"path":"$DSH_HOME/.env","line":13,"secretKind":"api-key","secretLength":35,
"fingerprint":"b99e1887d861d7be","redacted":true}}],
"truncated":false}
Installation and Enabling¶
This plugin has completed full-link verification under DSH 0.1.0-rc.8 (npm). Under DSH 0.1.0-rc.8, plugins are installed via dsh plugin --profile <profile> add <source>, with source supporting GitHub repositories or npm pack tarballs.
Install from GitHub (Recommended)¶
Interactive web profiles and one-time headless profiles require separate installations:
# Interactive (web) profile
dsh plugin --profile web add github:omdsh-dev/dsh-security-audit
# One-time task (headless) profile —— dsh run uses headless by default
dsh plugin --profile headless add github:omdsh-dev/dsh-security-audit
Install from npm Pack Tarball¶
The npm pack product can be used directly as a source for installation:
dsh plugin --profile web add dsh-security-audit-*.tgz
The bundled dsh.bundle.patch will automatically add the plugin to the profile’s layer stack after installation (row id: security-audit). Missing peer dependencies (@deepseek-ai/cordis, @deepseek-ai/dsh-tools, @deepseek-ai/dsh-invariants) are provided by the profile’s healed profiles/node_modules fallback installation.
web and headless are different profiles: web installation does not automatically cover headless;
dsh runuses the headless profile by default. Windows paths use forward slashes (C:/...).
Verify Installation¶
dsh --profile web --dump-config | grep security-audit
Typical Usage¶
After installation, you can use natural language to have DSH call the audit tool:
dsh run "Run the report action of security_audit to check for security risks in the local DSH environment"
You can also execute each action step-by-step as needed, for example, first using scan_config to check configuration and credential metadata, then scan_plugins to verify plugin sources, and finally report to summarize. When stricter judgments are needed, pass strict: true; when checking plugin source code static capabilities, enable includeSourceScan (slower, more false positives).
Tool parameters are recorded in session logs; do not pass sensitive data when invoking.
Use Cases and Notes¶
Who is it for
- Developers storing API keys and tokens in their local DSH environment who need to regularly self-check configurations and credential exposure surfaces.
- After installing multiple community plugins, wanting to verify source trustworthiness and dangerous static capabilities.
- Needing reproducible, documentable security check records to replace scattered manual checks.
Pre-use notes
- The plugin runs with the current
dshprocess permissions; the readable scope depends on local permissions and the$DSH_HOMElayout. - Before installation, check the source code and MIT license: https://github.com/omdsh-dev/dsh-security-audit.
capability findingonly prompts for manual confirmation and does not adjudicate maliciousness;scan_networkstates are configuration-level inferences, and the actual listener state may be marked asunknown-listener-state.- This plugin does not automatically fix issues; after risks are discovered, manual handling is required.
The DSH ecosystem follows the “everything is a plugin” philosophy; the community directory SkillHub is an independent site with no official affiliation with DeepSeek or High-Flyer.
Links¶
- Directory page: https://www.skillhub.cn/plugins/omdsh-dev/dsh-security-audit
- GitHub: https://github.com/omdsh-dev/dsh-security-audit
After following these steps, you can perform a systematic read-only audit of the DSH configuration, plugins, sessions, and network exposure without modifying local files, obtaining a sanitized and locatable risk report.