DeepSHPlugins
dsh-code-security 项目预览
GITHUB / COMMUNITY PROJECT

dsh-code-security

Security & OperationsJavaScriptMIT

Deterministic code security review: 40+ rules, secret entropy detection, staged-diff review, SARIF export, baseline acceptance and SBOM-lite dependency inventory.

2 StarsSTARDUSTLC666 Updated 2026-09-05
Open GitHub repository
dsh-code-security 项目预览

About this project

Chinese

Deterministic code security review: 40+ rules, secret entropy detection, staged-diff review, SARIF export, baseline acceptance and SBOM-lite dependency inventory.

English

Deterministic code security review: 40+ rules, secret entropy detection, staged-diff review, SARIF export, baseline acceptance and SBOM-lite dependency inventory.

Project details & listing signals

Snapshot 2026-09-11
Creator / organization
STARDUSTLC666
Repository
STARDUSTLC666/dsh-code-security
GitHub Stars
2
Forks
0
Programming language
JavaScript
License
MIT
Last push
2026-09-05
Manifest
Declaration found in the catalog

A public repository does not automatically permit commercial use. Check the project's license and compatibility. Manifests and catalog scores are not security certifications.

Catalog score

58/ 100
Maintenance activity
97
Documentation & practical information
100
Community interest
14
Installation signals
75
Project declarations
100

近 6 天仍在更新;README 含完整安装与使用说明;关注度尚低(2)。

Scores use five dimensions of the catalog snapshot. They are browsing aids, not hands-on reviews or security assessments.

Install & use

The respective GitHub repositories define project information and licensing.

dsh plugin --profile web add dsh-code-security

Copying a command does not execute it. Read the repository documentation and check requirements and licensing first.

Project screenshots

Repository README

GitHub 原文

Saved repository documentation. Its capture date was not recorded and it may differ from the catalog description. Check the current repository before installing.

Repository documentation is preserved in its original language.

dsh-code-security

npm downloads license stars

让 agent 每次改完代码,先过一道本地安全扫描,修复完了才准交付。

DeepSeek Harness AI 代码安全审查插件:确定性规则引擎 + git diff 增量审查 + 修复闭环 + 策略门禁。借鉴 Codex 安全技能的方法论(漏洞分级、证据优先、供应链分层、Agent 安全),实现为可复现工具。零运行时依赖。

工具

工具作用写操作
secure_scan扫描文件/目录,输出 CWE/严重度/行号/代码片段证据写状态
secure_diff只审查 git diff 新增行写状态
secure_fix_verify修复后复扫:关闭 / 仍存在 / 新引入写状态
secure_report按规则/文件聚合 + 门禁结论否
secure_export导出 SARIF 2.1.0 / Markdown 报告写文件审批
secure_baseline接受当前已知问题为基线,之后只按新增判定审批门
secure_depsSBOM-lite:解析依赖清单与版本约束风险否
secure_policy_show查看 .code-security.json 策略否
secure_policy_set写入策略(排除/忽略/阈值)审批门

规则覆盖(40+)

  • 注入:eval / exec / shell=True / SQL 拼接 / innerHTML
  • 反序列化:pickle / yaml.load / ObjectInputStream / Marshal / unserialize
  • 加密:弱哈希、ECB、硬编码 IV/密钥、JWT none、TLS 校验关闭、Shell TLS 绕过(curl -k / wget --no-check-certificate / git sslVerify=false)
  • 凭据:硬编码密码、令牌、私钥、高熵密钥
  • 配置:chmod 777、Docker privileged / latest、npm audit=false、CORS *
  • 泄露:敏感日志、错误堆栈外发、路径穿越、SSRF

发现只包含客观证据与 CWE 编号,不附修复建议——修复方案由 agent 基于证据生成。

兼容性

在 @deepseek-ai/[email protected] 源码模式下验证(2026-09-02)。遵循 cordis 组合包补丁模型(cordis.patch.yml + dsh.bundle.patch),运行时不 import 任何 @deepseek-ai/* 内部模块。

安装

dsh plugin --profile web add dsh-code-security

卸载

dsh plugin --profile web remove dsh-code-security

卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile cordis.patch.yml 中覆盖的插件行。

使用

secure_scan { target: src }
secure_diff { base: HEAD }
secure_fix_verify { target: src }
secure_baseline { reason: 历史遗留 }
secure_deps { target: . }

策略示例(.code-security.json):

{
  "version": 1,
  "exclude": ["vendor/**", "generated/**"],
  "ignore": [{ "ruleId": "SEC-206", "file": "test/**", "reason": "非安全敏感" }],
  "failOn": "high"
}

工程

pnpm test       # 构建 + 24 个测试

MIT

License

MIT(见 LICENSE)

Before you begin

Check the current repository for installation, compatible versions and licensing. Stars and catalog scores are snapshot-based browsing signals.

Installation & troubleshooting · 项目问题反馈

Related projects