@yottameta/yotta-chain 0.1.2 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/LICENSE +20 -20
- package/README.md +7 -5
- package/README.zh-CN.md +7 -5
- package/SKILL.md +9 -7
- package/bin/install.js +336 -163
- package/install.sh +327 -132
- package/package.json +5 -2
- package/references/rules.md +10 -5
- package/scripts/yotta_chain.py +307 -24
- package/scripts/test_yotta_chain.py +0 -616
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.1.5 (2026-10-01)
|
|
4
|
+
|
|
5
|
+
- 安装器卫生批次:`bin/install.js` / `install.sh` 统一(未知参数报错 exit 2、`--help` / `--version`、残留清理白名单、嵌套载荷保留);由模板单一真源渲染,接入漂移门禁。
|
|
6
|
+
|
|
7
|
+
## v0.1.4 (2026-09-18)
|
|
8
|
+
|
|
9
|
+
- JSON 输出新增 `scannedFiles`,显式列出实际读取的 package manifest / lock 文件;`files` 继续只表示产生发现的文件,消除 `files: []` 被误读成“未读取锁文件”的歧义。
|
|
10
|
+
- 统一 stdout / stderr UTF-8 编码,并补程序化捕获回归;补充自洽 yarn 夹具与缺失条目 high finding 回归。
|
|
11
|
+
|
|
12
|
+
## v0.1.3 (2026-09-17)
|
|
13
|
+
|
|
14
|
+
- npm 生态新增 `yarn.lock` / `pnpm-lock.yaml` / `bun.lock` 基础解析,锁文件存在时不再误报 `missing_lockfile`;`bun.lockb` 明确标记 `lockfile_parse_unsupported`,不做不可靠的二进制猜测。
|
|
15
|
+
- Python 生态新增 `uv.lock` 识别与基础一致性校验;`pyproject.toml` 无锁文件提示统一覆盖 `poetry.lock` / `uv.lock`。
|
|
16
|
+
- 新增 5 项锁文件格式回归;版本对齐到 `0.1.3`。
|
|
17
|
+
|
|
3
18
|
## v0.1.2 (2026-08-29)
|
|
4
19
|
|
|
5
20
|
- 安装方式统一为四方式(对齐发布规范 §3.3.1):方式一 `npx -y @yottameta/yotta-chain --agent <name>` / `--dir <dir>`(推荐,走 npm 源);方式二 `git clone https://github.com/YottaMeta/yotta-chain.git`;方式三 GitHub Download ZIP;方式四 `bash install.sh --agent/--dir/--list`。移除 `npx skills` 与 `-g` 推荐;中英双 README 安装节同步。
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 YottaMeta
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 YottaMeta
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -144,12 +144,14 @@ The agent runs the engine, reports findings by severity, and explains each rule
|
|
|
144
144
|
| `typosquat` | low | Name within edit distance 2 of a well-known package — review manually |
|
|
145
145
|
| `snapshot` | low | Maven dependency uses a SNAPSHOT version |
|
|
146
146
|
|
|
147
|
-
## Supported ecosystems (v0.1.
|
|
147
|
+
## Supported ecosystems (v0.1.4)
|
|
148
148
|
|
|
149
|
-
- **npm** — `package.json` + `package-lock.json` (v1 / v2 / v3) / `npm-shrinkwrap.json` + `.npmrc` (per-scope registries);
|
|
150
|
-
- **Python** — `requirements*.txt` (with `--index-url` / `--extra-index-url` / `-r` recursion), `pyproject.toml` (PEP 621 / poetry), `poetry.lock`, `Pipfile` / `Pipfile.lock`;
|
|
149
|
+
- **npm** — `package.json` + `package-lock.json` (v1 / v2 / v3) / `npm-shrinkwrap.json` / `yarn.lock` / `pnpm-lock.yaml` / `bun.lock` + `.npmrc` (per-scope registries);
|
|
150
|
+
- **Python** — `requirements*.txt` (with `--index-url` / `--extra-index-url` / `-r` recursion), `pyproject.toml` (PEP 621 / poetry), `poetry.lock`, `uv.lock`, `Pipfile` / `Pipfile.lock`;
|
|
151
151
|
- **Maven** — `pom.xml` (basic: unpinned / SNAPSHOT / suspicious repository URLs / property + dependencyManagement resolution).
|
|
152
|
-
- `
|
|
152
|
+
- `bun.lockb` is recognized but not deeply parsed; `go.mod` / `Cargo.lock` are not yet supported.
|
|
153
|
+
|
|
154
|
+
JSON scan output contains both `scannedFiles` (inputs actually read) and `files` (files with findings). A clean scan can have `files: []` while `scannedFiles` still lists the manifest and lock file.
|
|
153
155
|
|
|
154
156
|
## Boundaries
|
|
155
157
|
|
|
@@ -171,4 +173,4 @@ Version history lives in [CHANGELOG.md](./CHANGELOG.md).
|
|
|
171
173
|
|
|
172
174
|
## License
|
|
173
175
|
|
|
174
|
-
[MIT](./LICENSE)
|
|
176
|
+
[MIT](./LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -144,12 +144,14 @@ bash install.sh --list # 列出智能体 -> 默认目录
|
|
|
144
144
|
| `typosquat` | low | 名字与知名包编辑距离 ≤ 2,疑似拼写仿冒 |
|
|
145
145
|
| `snapshot` | low | Maven 依赖使用 SNAPSHOT 版本 |
|
|
146
146
|
|
|
147
|
-
## 支持的生态(v0.1.
|
|
147
|
+
## 支持的生态(v0.1.4)
|
|
148
148
|
|
|
149
|
-
- **npm** — `package.json` + `package-lock.json`(v1 / v2 / v3)/ `npm-shrinkwrap.json` + `.npmrc`(作用域仓库映射);
|
|
150
|
-
- **Python** — `requirements*.txt`(含 `--index-url` / `--extra-index-url` / `-r` 递归)、`pyproject.toml`(PEP 621 / poetry)、`poetry.lock`、`Pipfile` / `Pipfile.lock`;
|
|
149
|
+
- **npm** — `package.json` + `package-lock.json`(v1 / v2 / v3)/ `npm-shrinkwrap.json` / `yarn.lock` / `pnpm-lock.yaml` / `bun.lock` + `.npmrc`(作用域仓库映射);
|
|
150
|
+
- **Python** — `requirements*.txt`(含 `--index-url` / `--extra-index-url` / `-r` 递归)、`pyproject.toml`(PEP 621 / poetry)、`poetry.lock`、`uv.lock`、`Pipfile` / `Pipfile.lock`;
|
|
151
151
|
- **Maven** — `pom.xml`(基础:未固定版本 / SNAPSHOT / 可疑仓库 URL / 属性与 dependencyManagement 解析)。
|
|
152
|
-
- `
|
|
152
|
+
- `bun.lockb` 只识别不深度解析;`go.mod` / `Cargo.lock` 暂不支持。
|
|
153
|
+
|
|
154
|
+
JSON 扫描结果同时包含 `scannedFiles`(实际读取输入)与 `files`(产生发现的文件)。干净扫描可以出现 `files: []`,但 `scannedFiles` 仍会列出清单与锁文件。
|
|
153
155
|
|
|
154
156
|
## 边界
|
|
155
157
|
|
|
@@ -171,4 +173,4 @@ python3 scripts/test_yotta_chain.py # 52/52
|
|
|
171
173
|
|
|
172
174
|
## License
|
|
173
175
|
|
|
174
|
-
[MIT](./LICENSE)
|
|
176
|
+
[MIT](./LICENSE)
|
package/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yotta-chain
|
|
3
|
-
version: 0.1.
|
|
4
|
-
description: 元链 —— 跨智能体的供应链依赖校验技能:零依赖自研引擎本地解析 npm(package.json / package-lock v1-v3 / .npmrc)与 Python(requirements / pyproject.toml / poetry.lock / Pipfile)及 Maven pom.xml,检测依赖混淆(私有包名被公共仓库同名抢占 / 混合仓库 / 可疑仓库 URL / extra-index 回退)、lockfile 与清单不一致、缺失锁文件、未固定版本、typo-squat 仿冒命名,并生成 SBOM-lite(CycloneDX 1.5 子集)。触发:用户要在构建 / 发布 / CI 前检查项目依赖是否存在供应链风险、核对锁文件与清单是否一致、排查依赖混淆风险或生成 SBOM 时。边界:纯本地离线解析,不做在线 CVE 比对、不查询公共包仓库、不发送任何数据;结果只是「需人工复核的风险信号」,是否真实需人工核实;仅用于已获授权 / 自有资产 / 教学环境。
|
|
3
|
+
version: 0.1.5
|
|
4
|
+
description: 元链 —— 跨智能体的供应链依赖校验技能:零依赖自研引擎本地解析 npm(package.json / package-lock v1-v3 / yarn.lock / pnpm-lock.yaml / bun.lock / .npmrc)与 Python(requirements / pyproject.toml / poetry.lock / uv.lock / Pipfile)及 Maven pom.xml,检测依赖混淆(私有包名被公共仓库同名抢占 / 混合仓库 / 可疑仓库 URL / extra-index 回退)、lockfile 与清单不一致、缺失锁文件、未固定版本、typo-squat 仿冒命名,并生成 SBOM-lite(CycloneDX 1.5 子集)。触发:用户要在构建 / 发布 / CI 前检查项目依赖是否存在供应链风险、核对锁文件与清单是否一致、排查依赖混淆风险或生成 SBOM 时。边界:纯本地离线解析,不做在线 CVE 比对、不查询公共包仓库、不发送任何数据;结果只是「需人工复核的风险信号」,是否真实需人工核实;仅用于已获授权 / 自有资产 / 教学环境。
|
|
5
5
|
license: MIT
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ license: MIT
|
|
|
17
17
|
## 何时使用
|
|
18
18
|
|
|
19
19
|
- 构建 / 发布 / CI 前检查项目依赖是否存在供应链风险;
|
|
20
|
-
- 核对 package-lock.json / poetry.lock / Pipfile.lock 与清单是否一致;
|
|
20
|
+
- 核对 package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock / poetry.lock / uv.lock / Pipfile.lock 与清单是否一致;
|
|
21
21
|
- 排查依赖混淆暴露面(私有包名 / 混合仓库 / extra-index 公共回退);
|
|
22
22
|
- 生成 SBOM-lite 用于依赖清单审计与合规留痕。
|
|
23
23
|
|
|
@@ -77,13 +77,15 @@ python3 scripts/yotta_chain.py version
|
|
|
77
77
|
|
|
78
78
|
完整规则、判定逻辑与修复指引见 `references/rules.md`。
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
JSON 输出同时给出 `scannedFiles`(实际读取的清单 / 锁文件)与 `files`(产生发现的文件);无发现时 `files` 可以为空,但 `scannedFiles` 仍会列出已读取输入。
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
## 支持的生态(v0.1.4)
|
|
83
|
+
|
|
84
|
+
- **npm**:package.json + package-lock.json(v1 / v2 / v3)/ npm-shrinkwrap.json / yarn.lock / pnpm-lock.yaml / bun.lock + .npmrc(作用域仓库映射);
|
|
83
85
|
- **Python**:requirements*.txt(含 --index-url / --extra-index-url / -r 递归)、pyproject.toml(PEP 621 / poetry)、
|
|
84
|
-
poetry.lock、Pipfile / Pipfile.lock;
|
|
86
|
+
poetry.lock、uv.lock、Pipfile / Pipfile.lock;
|
|
85
87
|
- **Maven**:pom.xml(基础:未固定版本 / SNAPSHOT / 可疑仓库 URL / dependencyManagement 属性解析)。
|
|
86
|
-
-
|
|
88
|
+
- bun.lockb 会识别为锁文件但不做深度解析;go.mod / Cargo.lock 暂不支持。
|
|
87
89
|
|
|
88
90
|
## 与家族协同
|
|
89
91
|
|