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

@liuhange/dsh-data-sensitivity-classification

v2.0.1

Published

Data sensitivity classification plugin: auto-identify sensitivity levels (Public/Internal/Confidential/Secret) and recommend masking strategies

Readme

@liuhange/dsh-data-sensitivity-classification

数据敏感度自动分级插件:自动识别数据字段敏感度等级(公开/内部/机密/绝密),并推荐相应脱敏策略。

Tool 接口

classify_sensitivity

自动识别数据文件中各字段的敏感度等级,生成分级报告和脱敏策略推荐。

参数:

  • filePath (string, 必填): 待分级数据文件路径
  • outputPathDir (string, 可选): 报告输出目录,默认数据文件所在目录
  • sampleSize (string, 可选): 样本大小,默认 100

输出:?

  • classification_report.json: 分级 JSON 报告
  • classification_report.md: 分级 Markdown 报告(首行 【数据敏感度分级报告】

敏感度等级

| 等级 | 说明 | 推荐策略 | |------|------|---------| | Public | 公开 | none(不脱敏) | | Internal | 内部 | partial(部分脱敏) | | Confidential | 机密 | full(完全脱敏) | | Secret | 绝密 | encrypt(加密脱敏) |

识别方法

  1. 字段名模式匹配:根据字段名正&则表达式匹配
  2. 字段值样本匹配:字段名未匹配时,取前 N 个样本值匹配正则
  3. 均未匹配时使用默认等级(Internal)

配置节点

business-rules.jsonsensitivityClassification 节点。缺失时使用默认规则。正则编译失败的规则自动跳过并记录。

v1.0 兼容性

本插件为 v2.0 新增,不影响 v1.0 功能。配置缺失时降级到默认分级规则。