Community plugin

Lee2277-t / dsh-repo-audit

Pre-publish audit for a project directory: credential-shaped strings, leaked local paths, missing docs and oversized files, with line-accurate findings.

  • JavaScript
  • AGPL-3.0-only
  • 0 stars
  • Nov 21, 2026

About this plugin

Written by the registry from verified metadata, not from the README.

dsh-repo-audit is a DSH plugin published from the Lee2277-t/dsh-repo-audit repository.

  • Listing statusManifest verified
  • Manifest checkedNov 21, 2026
  • Packagedsh-repo-audit
  • Package version1.0.0
  • Source commit894fa9d
  • Repository createdNov 21, 2026

Capabilities and topics

dsh-pluginsecurityauditpublish
From the repository README

README

Everything below this line is the repository's own document, cached here. This site did not write or review it.

dsh-repo-audit

把一个目录推到公开仓库之前,先机器扫一遍。

为什么

发布前最容易漏的不是功能,是顺带提交的东西:一个 .env、一段带令牌的调试代码、 自己机器上的绝对路径、一个 80 MB 的视频。这些一旦进了 git 历史就很难彻底清掉。

工具

repo_audit

全量体检,给一个判定:

repo_audit({ path: "D:/work/my-project" })
repo_audit D:\work\my-project
142 files scanned · verdict: BLOCK

## credentials (1)
- GitHub token  src/config.js:12
    const token = "ghp_AAAA..."   // TODO 换掉

## local paths in publishable text (2)
- docs/setup.md:8  C:/Users/someone/project

## docs (missing LICENSE)
- README: yes
- LICENSE: NO
- .gitignore: yes

## large files (1, >= 5 MB)
- assets/demo.mp4  82.4 MB

> BLOCK: 命中凭据特征。这些文件在删除或改为占位符之前不要公开。
> 命中不等于泄漏——逐条看 sample,确认是真凭据还是示例/正则。

判定规则:命中凭据 → BLOCK;文档缺两项以上 → NEEDS-WORK;否则 OK。

secret_scan

只扫凭据,返回 JSON,适合放进 CI:

secret_scan({ path: "." })
{
  "filesScanned": 142,
  "findings": 1,
  "hits": [{ "kind": "GitHub token", "file": "src/config.js", "line": 12, "sample": "const token = \"ghp_AAAA...\"" }]
}

设计取舍

只报能用一句话解释清楚的问题。 不做代码风格、不做依赖漏洞、不做许可证兼容—— 那些各有专门的工具,混在一起只会让报告没人看。

每条命中都带原文片段。 正则必然有误报,用户得能自己判断。报告里写死"这不是判定, 是线索"。

跳过 node_modules、dist、.git 等目录。 它们不该被审计,也不该被提交。

安装

dsh plugin add github:Lee2277-t/dsh-repo-audit

配置

largeFileMB: 5
maxFindings: 40

限制

  • 正则匹配,不认 base64 编码后的密钥。
  • 大文件按字节数判断,不看内容类型。
  • 不读 git 历史,只管工作区当前文件。

许可

AGPL-3.0-only。

Badge

Listed here? Link back with this badge — paste the snippet into your repository README.

Listed on DSH Plugin badge
[![Listed on DSH Plugin](https://dsh-plugin.com/badges/listed.svg)](https://dsh-plugin.com/plugins/Lee2277-t/dsh-repo-audit)
dsh-repo-audit — DSH Plugin