break
BREAK 业务风险枚举与规避知识库 — 查询业务安全风险、规避手段、攻击工具、威胁行为者、行业术语和典型案例,或基于知识库回答业务安全问题
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
Its scripts were only partly scanned.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/JDArmy/BREAK with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/JDArmy/BREAK'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/jdarmy--break)HTML
<a href="/listings/jdarmy--break"><img src="/api/listings/jdarmy--break/badge.svg" alt="findsafeskills safety rating" /></a>Install
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 247 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: break
- description: BREAK 业务风险枚举与规避知识库 — 查询业务安全风险、规避手段、攻击工具、威胁行为者、行业术语和典型案例,或基于知识库回答业务安全问题
- argument-hint: "[query] — 关键词、实体 ID(如 R0001)或安全问题描述"
- arguments: [query]
- allowed-tools: Bash
- ---
- # BREAK 知识库 Skill
- <!-- 2026-07-11:规避分类语义 key 内部迁移,无 Skill 可见调用流程变化。 -->
- BREAK (Business Risk Enumeration & Avoidance Knowledge) 是一个开放的业务风险枚举与规避知识框架,包含 3416 条业务安全风险知识条目,涵盖以下实体类型:
- | 类型 | 数量 | ID 格式 | 说明 |
- | ------------------------- | ---- | ------------------ | ---------------------- |
- | Risk(风险) | 400 | R0001, R0001-001 | 业务安全风险定义和影响 |
- | Avoidance(规避手段) | 350 | A0001, A0001-001 | 应对风险的防御措施 |
- | AttackTool(攻击工具) | 125 | AT0001, AT0001-001 | 黑灰产使用的工具 |
- | ThreatActor(威胁行为者) | 83 | TA0001, TA0001-001 | 实施攻击的人群 |
- | Term(术语) | 657 | T0001 | 业务安全领域术语 |
- | Case(案例) | 1781 | C0001 | 真实的安全事件案例 |
- | BusinessDomain(业务域) | 20 | BD00 | 行业/业务域分类 |
- 维护说明:本 Skill 的调用方式保持不变,实体统计与知识库案例事实、来源质量及数据关系补强同步更新。
- ## 调用方式
- 使用 Bash 执行搜索脚本。脚本路径位于 skill 目录下的 `break_search.mjs`。
- ### 基本命令格式
- ```bash
- node <skill_dir>/break_search.mjs "<query>" [options]
- ```
- 其中 `<skill_dir>` 为本 SKILL.md 所在的目录路径。
- ### 参数说明
- | 参数 | 说明 |
- | ---------------- | ------------------------------------------------------------------------------------ |
- | `<query>` | 必填。搜索关键词、实体 ID 或安全问题描述 |
- | `--lang zh\|en` | 语言。默认自动检测:含中文字符→zh,否则→en |
- | `--type <types>` | 逗号分隔的实体类型过滤(risks, avoidances, attackTools, threatActors, terms, cases) |
- | `--limit N` | 每类型最大返回数,默认 5 |
- | `--detail` | 详细模式,显示完整字段和关联关系 |
- ## 工作流程
- 收到 `$query` 后,按以下流程处理:
- ### 第一步:判断用户意图
- 1. **ID 查询**:`$query` 匹配实体 ID 格式(如 R0001、AT0034-001 等)→ 直接精确查询
- 2. **关键词查询**:`$query` 是简短的关键词或术语(如"验证码"、"DDoS")→ 搜索模式
- 3. **问题咨询**:`$query` 是一段描述性问题(如"我们网站被爬虫爬了怎么办")→ 问答模式
- ### 第二步:执行搜索
- #### ID 查询
- 直接执行:
- ```bash
- node <skill_dir>/break_search.mjs "<ID>" --lang zh
- ```
- 返回该条目的完整详情,包括关联关系展开。直接呈现给用户。
- #### 关键词搜索
- ```bash
- node <skill_dir>/break_search.mjs "<关键词>" --lang zh
- ```
- 如需限定范围:
- ```bash
- node <skill_dir>/break_search.mjs "<关键词>" --type risks,avoidances --lang zh
- ```
- 将搜索结果整理后呈现给用户。
- #### 问题咨询(核心场景)
- 这是最重要的使用模式。用户描述业务安全问题时:
- **步骤 1:提取关键词**
- 从用户问题中提取 1~3 组搜索关键词。例如:
- - "我们公司网站被爬虫爬了" → 关键词:"爬虫"、"数据爬取"、"反爬"
- - "用户账号总是被盗" → 关键词:"账号盗用"、"撞库"、"凭证填充"
- - "有人在我们平台薅羊毛" → 关键词:"薅羊毛"、"营销欺诈"、"黑产"
- **步骤 2:多轮搜索**
- 对每组关键词分别调用搜索脚本。可以多次调用:
- ```bash
- # 第一轮:直接搜索问题关键词
- node <skill_dir>/break_search.mjs "爬虫" --lang zh
- # 第二轮:搜索相关风险和防御手段
- node <skill_dir>/break_search.mjs "反爬" --type avoidances --lang zh
- # 第三轮:如有需要,搜索其他相关领域
- node <skill_dir>/break_search.mjs "数据泄露" --type risks,cases --lang zh
- ```
- **步骤 3:深入查询**
- 从搜索结果中找到最相关的条目 ID,进行精确查询以获取详细信息:
- ```bash
- # 查看爬虫风险的详情和关联规避手段
- node <skill_dir>/break_search.mjs R0027 --lang zh
- # 查看具体规避手段的详情
- node <skill_dir>/break_search.mjs A0003 --lang zh
- ```
- **步骤 4:综合回答**
- 基于所有检索到的知识,给出结构化回答:
- ```
- ## 问题分析
- 根据 BREAK 知识库,你描述的问题涉及以下风险:
- - **[R0027] 爬虫风险**:...(引用定义和描述)
- - **[R0027-001] xxx**:...
- ## 防御建议
- 针对上述风险,BREAK 推荐以下规避手段:
- 1. **[A0003] 云端反爬**:...(引用定义)
- 2. **[A0004] 频率限制**:...
- 3. ...
- ## 可能涉及的攻击工具
- - **[AT0005] 爬虫工具**:...
- ## 相关案例
- - **[C0xxx] xxx案例**:...
- > 以上信息来源于 BREAK 知识库 (https://break.jd.army/)
- ```
- ## 重要原则
- 1. **永远先检索再回答**:不要凭记忆回答业务安全问题,必须通过搜索脚本查询 BREAK 知识库
- 2. **引用来源**:回答中必须标注具体的 BREAK 条目 ID(如 R0027、A0003)
- 3. **多次检索**:如果第一轮搜索结果不足或不够精确,换关键词再搜
- 4. **关系展开**:找到相关风险后,查看其 avoidances 字段获取防御手段;找到攻击工具后,查看其 directCauseRisks 字段了解关联风险
- 5. **中英文适配**:如果用户使用中文提问,用 `--lang zh` 检索并用中文回答;反之亦然
- ## 文档新鲜度门禁
- 当 `scripts/skill/` 搜索 / 打包脚本、导出的中英文数据包、实体字段 / 关系结构、Skill 调用参数或搜索结果格式发生变化时,必须同步更新 `SKILL.md` 与 `SKILL_en.md`。`npm run validate:docs-freshness` 已接入 `npm run validate:data`,会在相关变更缺少 Skill 文档更新时阻断。
- 数据治理改动也会影响 Skill 检索结果。修复 Case 的 `references` / `summary` 事实核验问题或调整 Risk 的 `avoidances` 关系时,应同步维护英文翻译文件,并确保前两条 Case references 尽量指向可抓取正文的稳定页面,避免 Skill 返回的案例事实无法被复核。
- Term 分类使用集中注册表 key;分类修正只改中文结构源并同步实体版本,Skill 的搜索与展示会在运行时合并英文文本,无需在英文实体文件重复写入 `category`。
- 2026-07-10 的 ThreatActor 覆盖治理新增物流套利、恶意物流从业者、市场操纵、恶意量化交易、AI 智能体攻击、平台规则滥用经营和通信资源滥用服务角色,并用 `audit:risk-threat-actor-coverage` 区分待补关系与明确豁免风险;不改变 Skill 调用参数、搜索字段或返回格式。
- 2026-07-10 的 ThreatActor 引用审计将 Wikipedia 降为二手背景来源,标记机构首页、新闻索引和研究栏目等通用占位链接,并补强威胁行为者的政府、司法、学术及原始安全研究证据;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的实体粒度复核清理了 R0285 的无关 Term 关系及 R0159 的重复 Avoidance 引用;该维护不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的原子化治理将 A0124 拆分为 Rug Pull 链上实时检测与损失赔付/资金恢复,合并删除重复的 A0142/A0160,并删除不满足具体工具准入边界的 AT0093;关系已迁移到现有原子实体,不改变 Skill 调用参数和返回格式。
- 清理 Case 事实待办时,`summary` 只保留来源正文直接支撑的主体、时间、行为、处置和影响信息;抓取失败、仅有标题支撑或来源未覆盖的金额、数量、判决结果、监管措施等细节,应补充稳定来源后再保留,或收敛为更保守的事实表述。
- 补强高价值 Case references 时,优先查找执法机关、法院、检察院、监管机构、厂商公告等一手来源;若公开原始页面不可得,应使用可抓取的权威媒体、地方政法/公安频道或稳定转载交叉验证,并在 `summary` 中避免写入只有失效原文才支撑的细节。经检索确认原始来源不可得且已有多源支撑的项,可在待办吸纳清单中记录,不为满足门禁编造来源。
- 2026-07-09 的 Case P1 引用质量维护仅补强 C0066、C0130、C0248 的 references / summary 与英文翻译;未改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- Case 事实核验使用抓取正文送入 LLM。`review-case-fact.mjs` 优先使用 Scrapingdog 抓取,失败或正文为空时回退本地直连抓取,并按页面声明处理 UTF-8 / GBK / GB18030;维护该脚本时需保证送审片段足够覆盖正文关键段落。大批量清理 P2 待办时按约 100 个改动设置 checkpoint,先跑 `validate:data` / `review:changed` 再提交,避免长时间积累未验证变更。
- 2026-07-09 的 Case P2 事实核验维护仅补强或收敛案例 `summary` / `references` / 英文翻译,不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-09 的第二批 Case P2 事实核验 checkpoint 继续收敛 C0249、C0310、C0401、C0588、C0595、C0635、C0687、C0697、C0705、C0715、C0753、C0755、C0766、C0796、C0797、C0803、C0805、C0819、C0821、C0833、C0948 的 `summary`、`incidentTime`、`references` 与英文翻译;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的 C0354 案例维护补充法院系统来源,并将案例分类调整为更贴近事实属性的安全事件;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的 C0446 案例维护补充石门县人民法院官方微信原文,并同步英文翻译;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的第三批 Case P2 事实核验 checkpoint 继续补强或收敛 C0463、C0521、C0522、C0558、C0565、C0571、C0577、C0579、C0593、C0630、C0642-C0720、C0728、C0735、C0744、C0749、C0772、C0781、C0785、C0791 等案例的 `summary`、`references`、`incidentTime` 与英文翻译,并补充 R0290 的规避手段覆盖;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的第四批 Case P2 事实核验维护继续收敛 C0654、C0657、C0684、C1160、C1198、C1235 等案例的 `summary`、`incidentTime` 与英文翻译,并将已由现有稳定来源支撑的 C0226、C0410、C0792、C0798 等项纳入待办吸纳清单;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的 P1 引用质量与后续 P2 事实核验维护补强 R0081、R0196、TA0030 及 C0484、C0493、C0502、C0508、C0518、C0538、C0802、C0810、C0812、C0813、C0816、C0851、C0878、C0938、C0996、C1050、C1061、C1062、C1075、C1079、C1084、C1090、C1160、C1198 等条目的 `references`、`summary`、`incidentTime` 与英文翻译,并同步修正 A0225、R0267 的来源与规避关系;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的 P1 引用质量补强继续替换或补充 AT0076、A0124、A0270、R0168、R0177、TA0058 的权威来源,移除 R0168 的论坛弱来源,并同步英文翻译;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的 AI 数据投毒关系复核校正了 AT0108 对 R0273 的直接因果关系,移除与数据投毒无关的规避手段和 TA0058 案例/风险归因,并统一 TA0058 的训练、反馈与检索知识链路描述;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的后续 Case P2 事实核验维护继续补强 C1056、C1060、C1064、C1067、C1069、C1077、C1100、C1102 等案例的可抓取来源、`summary`、`incidentTime` 与英文翻译;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-10 的 Case P2 事实核验 checkpoint 继续修订 C1482、C1484、C1485、C1488、C1490、C1493、C1495、C1498、C1500、C1501、C1504、C1505、C1511、C1512、C1518、C1519、C1521、C1523、C1528、C1531 的 `summary`、`references`、`incidentTime`、关系与英文翻译,并为 A0222-001 补充电商平台商品抽检专项来源;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-11 的 P2 清理批次修订 C1190、C1251、C1287、C1366、C1377、C1380、C1384、C1386、C1391、C1392、C1393、C1396、C1400、C1401、C1404、C1406、C1407、C1412、C1414、C1416 的事实摘要与来源,修复 5 个行为者一致性和 5 个风险-规避关系待办,并新增人肉刷、呼死你、溯源、DEX、隐私币、零样本语音克隆、PII、社交工程、洗号、Tor 等术语;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-07-11 的后续 P1 引用质量维护补强 C1377、C1384、C1401、C1406、C1414、C1416 的官方或事件专项来源,并将 C1384 收敛为可由来源支持的供应链篡改风险表述;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-09-02 的术语 T0621(清结算)引用维护将 references 从中国人民银行清算总中心(cncc.cn)替换为中国人民银行条法司发布的《支付结算办法》(银发〔1997〕393号)官方页面,并同步英文翻译;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- 2026-10-22 的案例 C0422 内容替换将原「浙江泰隆银行泰惠收APP被工信部通报」案例整条替换为「滴滴因过度收集个人信息被网信办处以80.26亿元罚款」(同为 R0074 隐私合规风险的行政执法案例,来源为网信办官网两条一手页面),并同步英文翻译;不改变 Skill 调用参数、搜索字段、返回格式或实体结构。
- `review:should-extract` 会用全库实体 title、keywords、aliases 以及当前实体已引用关系识别已覆盖的候选实体;维护该脚本时,应保持重复抽取建议被降噪,避免 Skill 检索结果中出现语义重复的新增实体。
- ## 实体关系图谱
- 理解实体间的关联关系有助于给出更完整的回答:
- ```
- ThreatActor(谁)
- ├── buildAttackTools → AttackTool(自建工具)
- ├── useAttackTools → AttackTool(使用工具)
- ├── directCauseRisks → Risk(直接造成的风险)
- └── indirectSupportRisks → Risk(间接支持的风险)
- AttackTool(用什么工具)
- ├── directCauseRisks → Risk(直接造成的风险)
- ├── indirectSupportRisks → Risk(间接支持的风险)
- └── avoidances → Avoidance(可被什么手段规避)
- Risk(什么风险)
- └── avoidances → Avoidance(如何规避)
- Case(案例)
- ├── relatedRisks → Risk
- ├── relatedAttackTools → AttackTool
- └── relatedThreatActors → ThreatActor
- Term(术语)
- └── related* → 所有其他实体类型
- BusinessDomain(业务域)
- ├── riskDimensions → RiskScene(按业务风险域组织风险场景)
- └── riskScenes → Risk(场景下的风险列表;父风险可代表其子风险)
- ```
README.md · README · 208 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # JDArmy BREAK - Business Risk Enumeration & Avoidance Knowledge Framework
- English | [中文](./README_CN.md)
- <!-- 2026-07-11: Internal Avoidance-category key migration; no visible README workflow change. -->
- ## Online: <https://break.jd.army/>
- ## Introduction
- JDArmy BREAK stands for **Business Risk Enumeration & Avoidance Knowledge** — an open framework for enumerating and mitigating business risks. By systematically classifying, describing, and cataloguing a wide range of business risks, it provides a comprehensive risk landscape and offers practical avoidance guidance to help organizations build security capabilities and reduce business risk.
- > BREAK is created, owned, and managed by JD.Army — a professional red team focused on identifying and resolving enterprise security operational risks. JD.Army reserves the right to update BREAK and this documentation periodically at its sole discretion. The project is available to the public under the Apache License 2.0.
- ## Background
- As information security capabilities increasingly cover business operations and business demands for security deepen, limiting security to the traditional network security domain — merely discovering and patching vulnerabilities — is clearly insufficient to ensure normal business security operations or meet higher business security requirements.
- Drawing on years of experience and accumulated understanding of business security, JDArmy introduces BREAK — the _Business Risk Enumeration & Avoidance Knowledge Framework_ — to provide guidance and a reference basis for enterprise blue teams conducting business security assessments. The business risk avoidance knowledge in the framework also serves as a guide for building security capabilities, running business security operations, and improving risk control.
- ## Methodology
- The framework is organized around **business domains**, **risk dimensions**, **risk scenarios**, and **risk items**. A business domain represents an industry or business area. A risk dimension is a business risk domain that groups risk scenarios into stable areas such as transaction and entitlement, content and ecosystem governance, account and identity, platform/interface automation abuse, data/algorithm/model, virtual assets and emerging technology, device/physical infrastructure, and internal supply-chain compliance. Each risk scenario contains multiple risk items.
- The current framework catalogues 400 risk items, 350 avoidance measures, 125 attack tools, 83 threat actors, 657 industry terms, 20 business domains, 4 avoidance categories, and 1781 cases, with ongoing additions, upgrades, and adjustments based on developments and feedback. Each risk item consists of: a risk ID, risk title, risk definition, risk description, risk complexity, risk influence, avoidance measures, references, and associated attack tools. Risk IDs follow the format `R00xx` for unique identification (modeled after MITRE ATT&CK) to facilitate communication and intelligence sharing. Attack descriptions guide blue teams in security capability assessments, while avoidance measures help red teams and business risk control to strengthen security capabilities and reduce business risk.
- **Important note:** Business risks and vulnerabilities are not the same thing. Vulnerabilities are generally caused by coding defects and can be fixed by modifying code to remove the defect. Business risks, however, are largely not caused by coding defects — they are unintended exploitations of normal business logic by attackers. As a result, it is usually impossible to completely eliminate business risks; they can only be reduced to an acceptable level. Instead of direct code fixes, business risks typically require added security capabilities and risk control models to slow attacks, reduce attack ROI, and shrink the attack surface.
- ### BREAK Skill
- The repository also provides a Claude Code / Codex Skill definition for local knowledge-base search:
- - `SKILL.md` — Chinese Skill definition
- - `SKILL_en.md` — English Skill definition
- - `scripts/skill/break_search.mjs` — zero-dependency Node.js search engine
- - `scripts/skill/export_en_data.mjs` — English static data export
- - `scripts/skill/package_skill.sh` — packaging script for a distributable Skill directory
- Use it directly in this repository:
- ```shell
- npm run export:data
- npm run export:data-en
- node scripts/skill/break_search.mjs "credential stuffing" --lang en
- node scripts/skill/break_search.mjs R0001 --lang en --detail
- node scripts/skill/break_search.mjs "爬虫" --lang zh --type risks,avoidances
- ```
- Package it as a distributable Skill directory:
- ```shell
- scripts/skill/package_skill.sh
- ```
- The default output is `dist/break-skill`. Copy that directory into the target agent's Skill directory. The packaged Skill contains `SKILL.md`, `SKILL_en.md`, `break_search.mjs`, and the generated Chinese/English data bundles.
- ## Collaboration & Contribution
- The framework is described in JSON format under the `/src/BREAK` directory:
- - `basic-info` — basic information about the framework
- - `risks` — risk item catalogue
- - `avoidances` — avoidance measures catalogue
- - `avoidance-categories` — avoidance measure categories
- - `business-domains` — business domains
- - `riskDimensions` field: business risk domains covered by the domain, with the risk scene IDs under each domain
- - `riskScenes` field: risk scenarios and associated risk items for the domain; do not list a parent risk and its sub-risk in the same risk scene because the frontend expands parent risks into sub-risks
- - `attack-tools` — attack tool catalogue
- - `threat-actors` — threat actor catalogue
- - `terms` — industry terms and slang glossary
- Term categories use stable semantic keys from the centralized registry. When classification review finds a mismatch, update `category` only in the Chinese structural source and refresh the entity `updated`/`version`; English files do not duplicate structural fields.
- - `termCategories` — semantic Term category registry and localized display metadata
- - `cases` — typical case catalogue (real cases linked to risks)
- Case entries may be replaced wholesale when the original case subject raises a takedown or compliance request. A replacement keeps the same ID and `relatedRisks`, uses another well-documented incident of the same category, and sources primary official pages; both Chinese and English files are updated together.
- - `utils.ts` — common data loading utility functions
- Contributors are welcome to collaborate by directly editing the JSON files. Data changes should pass schema validation, i18n synchronization, and tests before submission.
- ### Acknowledgements
- - Thanks to 团长 and we1h0 for their valuable suggestions
- ## Links
- - GitHub: <https://github.com/JDArmy/BREAK>
- - License: [Apache License 2.0](./LICENSE)
- ## Documentation
- - Online manual: <https://break.jd.army/#/docs>
- - [Contribution guide](./CONTRIBUTING.md)
- - [Security reporting](./SECURITY.md)
- - [Data Schema](./DATA_SCHEMA.md)
- - [Admission Standard](./ADMISSION-STANDARD.md)
- - [Quality Governance](./QUALITY-GOVERNANCE.md)
- - [STIX 2.1 Mapping](./STIX_MAPPING.md)
- ## Development
- Requires Node.js 24.0+. Use the version declared in `.nvmrc` when possible.
- ```shell
- npm ci
- npm run dev
- ```
- Install Chromium before running the Playwright browser checks:
- ```shell
- npx playwright install chromium
- ```
- LLM semantic reviews and web scraping are optional maintenance capabilities. See [`.env.example`](./.env.example) and [`scripts/llm/README.md`](./scripts/llm/README.md) for their environment variables. Normal site development, data validation, and unit tests do not require these credentials.
- The LLM endpoint uses HTTPS by default, and process environment variables override local `.env` values. When the commit gate is skipped because the service is unavailable, the recorded rerun command performs a forced full-scope review limited to the affected entity keys, so it remains reproducible after the commit.
- ### Validation
- ```shell
- npm run validate:data
- npm run validate:docs-freshness
- npm run audit:metrics
- npm run audit:references
- npm run audit:risk-threat-actor-coverage
- npm run audit:maintenance
- npm run test
- npm run test:coverage
- npm run validate:schema-docs
- npm run schema:docs:write
- npm run validate:docs
- npm run export:data
- npm run export:data-en
- npm run export:stix
- npm run export:jsonld
- npm run validate:stix
- npm run entity:version:bump
- npm run version:sync -- --bump=patch --note="description"
- npm run export:data-package
- npm run validate:data-export
- npm run validate:data-package
- npm run test:smoke
- npm run test:performance
- npm run test:visual-review
- npm run test:relation-stability
- npm run test:lighthouse
- npm run build
- npm run audit:bundle
- npm run audit:bundle:check
- npm run build-only
- npm run lint
- npm run type-check
- ```
- `npm run validate:data` runs JSON Schema validation, i18n key synchronization, relationship coverage auditing, business domain checks, reference coverage, content quality checks, and generated schema documentation checks. The BusinessDomain sub-risk check only blocks duplicate display cases where a parent risk and its sub-risk are listed in the same `riskScene`.
- `npm run audit:references` treats Wikipedia as secondary background material and flags confirmed organization homepages, news indexes, and research-directory placeholder links. References should point to specific pages whose titles match and whose content directly supports the entity behavior or fact.
- `npm run validate:docs-freshness` blocks documentation drift: when routes, UI components, schemas, validation scripts, public commands, export pipelines, or Skill data/search behavior change, the matching user manual, README, and Skill docs must be updated in the same change.
- `npm run review:changed` runs semantic review on changed entities; `review:should-extract` indexes existing entity titles, keywords, aliases, and current relations so already-covered extraction suggestions are suppressed instead of producing duplicate-modeling noise. The extraction reviewer also normalizes structured `new*` suggestion objects before deciding whether a finding is actionable. `review:case-fact` uses Scrapingdog first and falls back to direct local fetching with a browser user agent, a 30-second timeout, Chinese-page charset detection, short-body retry, and article-focused snippet selection. If PDFs, dynamic pages, or empty bodies remain unusable, it uses search-result titles and snippets derived from the reference title and URL as evidence context. Scrape caches are versioned so fallback upgrades do not reuse stale empty files or PDF gibberish.
- `npm run build` performs English-data generation, code checks, data and documentation validation, unit and coverage tests, changelog and multi-format exports, site compilation, service-worker version injection, data-package evaluation, and output validation. The `build` script in `package.json` is authoritative.
- `npm run test:coverage` enforces the core logic coverage baseline for relation analysis, Sankey attack paths, root/path insights, search, safe i18n, and BREAK data utilities.
- `npm run validate:schema-docs` checks [DATA_SCHEMA.md](./DATA_SCHEMA.md) against `src/validation/breakSchema.ts`.
- `npm run schema:docs:write` regenerates [DATA_SCHEMA.md](./DATA_SCHEMA.md) after schema changes.
- `npm run validate:home-counts` checks that the entity counts in `src/BREAK/home.ts` match the actual data; `npm run generate:home-counts` regenerates them (also run automatically via a pre-commit hook).
- `npm run export:data` writes the Chinese static data bundle to `public/data/break-data.json`, `public/data/break-manifest.json`, and `public/data/quality-report.json`.
- `npm run export:data-en` writes the English static data bundle to `public/data/break-data-en.json` by merging the Chinese structure source with English translation files.
- `npm run export:stix` exports STIX 2.1 Bundles (`public/data/break-stix-zh.json` and `public/data/break-stix-en.json`) mapping all BREAK entities and relationships to STIX SDOs/SROs with Extension Definitions for BREAK-specific fields.
- `npm run export:jsonld` exports JSON-LD documents (`public/data/break-ld-zh.jsonld` and `public/data/break-ld-en.jsonld`) for semantic web and knowledge graph consumption, with `stixId` cross-references to the STIX Bundle.
- `npm run validate:stix` runs three-layer STIX validation (structural schema, referential integrity, business-rule cross-checks) plus JSON-LD expansion validation.
- `npm run entity:version:bump` detects substantive entity changes via `git diff`, increments each entity's `version`, and updates `updated`.
- `npm run version:sync -- --bump=patch|minor|major --note="description"` synchronizes `package.json`, `src/BREAK/basic-info/main.json`, and `CHANGELOG.md`. `version:bump` is only a compatibility alias for this project-version command.
- `npm run export:data-package` writes an npm package evaluation artifact to `dist/break-data-package`.
- `npm run validate:data-export` checks the public data bundle, manifest hash, entity counts, version, and copied GitHub Pages artifacts.
- `npm run validate:data-package` checks the npm package boundary, runtime entry, type declarations, README, manifest hash, and version alignment.
- `npm run test:smoke`, `npm run test:performance`, `npm run test:visual-review`, `npm run test:relation-stability`, and `npm run test:lighthouse` validate the generated static site with Playwright/Chromium. The current PR CI runs all five browser checks on every pull request. Deploy does not rerun Playwright/Lighthouse.
- `npm run audit:quality-report` regenerates the frontend-consumable quality report JSON.
- `npm run audit:metrics` generates the content trust, relation coverage, category distribution, and business domain coverage baseline.
- `npm run audit:risk-threat-actor-coverage` reports Risk-ThreatActor coverage and separates actionable gaps from explicitly exempt compliance, technology-evolution, and functional-safety risks.
- `npm run audit:bundle` checks the generated `dist/assets` bundle against the current performance budget.
- `npm run audit:maintenance` refreshes the audit reports and writes a unified maintenance summary.
- ### Static Data
- - Manifest: <https://break.jd.army/data/break-manifest.json>
- - Chinese data bundle: <https://break.jd.army/data/break-data.json>
- - English data bundle: <https://break.jd.army/data/break-data-en.json>
- - Chinese STIX 2.1 Bundle: <https://break.jd.army/data/break-stix-zh.json>
- - English STIX 2.1 Bundle: <https://break.jd.army/data/break-stix-en.json>
- - Chinese JSON-LD: <https://break.jd.army/data/break-ld-zh.jsonld>
- - English JSON-LD: <https://break.jd.army/data/break-ld-en.jsonld>
- - Quality report: <https://break.jd.army/data/quality-report.json>
- The static bundle exposes the current BREAK data with version, generation metadata, counts, byte size, SHA-256 checksum, and quality report for downstream tools. The Chinese bundle remains the canonical structure source; the English bundle keeps the same structure and replaces only translatable text fields.
- ### Standardized Interoperability (STIX 2.1 & JSON-LD)
- BREAK provides standardized export formats for integration with external CTI/SIEM platforms and semantic web tools:
- **STIX 2.1** — All 7 entity types (Risk, Avoidance, AttackTool, ThreatActor, Term, Case, BusinessDomain) are mapped to STIX SDOs with deterministic UUID v5 identifiers. Cross-entity and intra-entity relationships are mapped to STIX Relationship SROs. BREAK-specific fields are preserved through 7 Extension Definitions. Chinese and English Bundles share the same UUIDs, differing only in text content. See [STIX_MAPPING.md](./STIX_MAPPING.md) for the full mapping specification.
- **JSON-LD** — Entities are exported as a `@graph` of linked data nodes using `schema.org` vocabulary and BREAK-specific terms. Each entity carries a `stixId` field for bidirectional cross-referencing with the STIX Bundle. Entity URIs follow the pattern `https://break.jd.army/entity/{ID}`.
- **Entity Version** — All knowledge entities carry an integer `version` field (default `1`) that auto-increments on substantive content changes. This enables downstream consumers to detect and track entity-level evolution. Run `npm run entity:version:bump` before committing entity changes.
- ### npm Data Package Evaluation
- `npm run export:data-package` creates `dist/break-data-package` as an evaluation artifact for a future `@jdarmy/break-data` package. The artifact is data-only: it excludes the Vue app, ECharts runtime, and browser UI code, and includes `data/break-data.json`, `data/break-manifest.json`, `data/quality-report.json`, STIX 2.1 Bundles (`data/break-stix-zh.json`, `data/break-stix-en.json`), JSON-LD documents (`data/break-ld-zh.jsonld`, `data/break-ld-en.jsonld`), `index.js`, `index.d.ts`, and its own README.
- The package version mirrors the BREAK application version. The generated manifest keeps the same SHA-256 checksum and entity counts as the GitHub Pages static data bundle, so downstream users can evaluate npm consumption without changing the canonical data source.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.