npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-code-security

v0.3.2

Published

DSH AI 代码安全审查插件:secure_scan/secure_diff/secure_fix_verify/secure_report/secure_export/secure_baseline/secure_deps/secure_policy_show/secure_policy_set 九工具,40+ 确定性规则、密钥熵检测、git diff/staged 审查、SARIF 导出、基线接受与 SBOM-lite,零运行时依赖。

Readme

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_deps | SBOM-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