dsh-precheck
开发工具 活跃维护

dsh-precheck

clawk2026/dsh-precheck

提供插件安装前的安全与信任校验能力,自动扫描插件潜在风险、核验来源可信度,无需复杂配置即可快速完成预检流程,有效保障插件使用安全。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
94 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:clawk2026/dsh-precheck
git clone https://github.com/clawk2026/dsh-precheck.git
git clone git@github.com:clawk2026/dsh-precheck.git
README.md main

DSH Precheck CLI

Pre-install trust check for DeepSeek Harness plugins.

Thin client only — resolves grades from public catalog / FC query API. No local rule engine.

Advisory, not a hard wall. By default this tool is a soft gate (fail-soft):
plugins that are missing, still scanning, errored, or otherwise ungraded are
allowed, and the report only states what is currently known. A brand-new
or unknown plugin therefore passes the check until it has been assessed
(which can take a few hours). If you need a hard boundary, use --strict.

Policy

Grade Default (advisory) With --strict
red Block install (--force to override) Block
orange Warn + confirm (--yes to skip prompt) Block
green / yellow Allow Allow
missing / network / pending / unknown Fail-soft — warn, allow Block

Exit codes

Code Meaning
0 allow
1 usage error / aborted
2 block (red, or --strict on unverified)
3 non-interactive confirm prompt without --yes

Install

npx github:clawk2026/dsh-precheck check github:owner/repo

# or link locally after clone
git clone https://github.com/clawk2026/dsh-precheck.git
cd dsh-precheck
npm install
npm run build
npm link

After editing anything under src/, rebuild with npm run build so the
committed dist/ stays in sync with the source. dist/ is not git-ignored
in this repo for exactly this reason.

Usage

# Advisory check (default)
dsh-precheck check github:liustack/modlens

# Fail-closed: refuse anything not positively verified
dsh-precheck check github:liustack/modlens --strict

# Wrap dsh plugin add
dsh-precheck plugin --profile web add github:liustack/modlens

# Shorthand (defaults --profile web)
dsh-precheck add github:liustack/modlens

# Dry run: resolve + decide, but don't invoke dsh
dsh-precheck plugin --profile web add github:liustack/modlens --dry-run

# Pinned ref: trust data covers the default branch only and cannot attest
# a specific commit — the report will say so, and --strict will block it.
dsh-precheck check github:liustack/modlens#v2

Ref handling (important)

The backend catalog is keyed at default-branch granularity. When you install
a pinned ref (e.g. github:owner/repo#v2), the trust check still looks up the
default branch, and the report will explicitly note that the pinned ref is not
separately assessed. In --strict mode a pinned non-default ref is blocked.

Timing

Submitting an unknown plugin only queues it. Production assessment runs on the scheduled pipeline (about every 3 hours), then catalog export. Grades are not ready in a few minutes — check back in a few hours (up to ~3 hours).