upstream-radar 0.26.0 → 0.27.0
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/README.md +22 -7
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/docs/README.zh-CN.md +22 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,7 +193,7 @@ This proof runs in CI on Node.js 22. See the executable [showcase contract](exam
|
|
|
193
193
|
Before wiring a project into a compatibility gate, run the offline rule benchmark:
|
|
194
194
|
|
|
195
195
|
```bash
|
|
196
|
-
pnpm dlx --package=upstream-radar@0.
|
|
196
|
+
pnpm dlx --package=upstream-radar@0.27.0 upstream-radar benchmark compatibility
|
|
197
197
|
```
|
|
198
198
|
|
|
199
199
|
It covers six contracts: a safe patch, a change that only needs project analysis, an incompatible DSH peer, a publisher-declared breaking release, a vulnerable candidate dependency, and an incomplete candidate graph. The command does not access the network, install a package, load a plugin, or start DSH. It checks the behavior of Radar's deterministic rules and the `breaking`/`any` gates; it is not a runtime compatibility proof.
|
|
@@ -206,7 +206,7 @@ When you have an exact plugin artifact and want to know whether one exact DSH re
|
|
|
206
206
|
# Pack an exact npm release without running its lifecycle scripts.
|
|
207
207
|
npm pack --ignore-scripts dsh-plugin@1.2.3
|
|
208
208
|
|
|
209
|
-
pnpm dlx --package=upstream-radar@0.
|
|
209
|
+
pnpm dlx --package=upstream-radar@0.27.0 upstream-radar probe dsh-load \
|
|
210
210
|
./dsh-plugin-1.2.3.tgz \
|
|
211
211
|
--dsh-version 0.1.0-rc.6
|
|
212
212
|
```
|
|
@@ -232,7 +232,7 @@ It exercises a loadable bundle, a bundle patch DSH rejects, and a package that r
|
|
|
232
232
|
To compare a plugin against more than one DSH release, use the matrix form:
|
|
233
233
|
|
|
234
234
|
```bash
|
|
235
|
-
pnpm dlx --package=upstream-radar@0.
|
|
235
|
+
pnpm dlx --package=upstream-radar@0.27.0 upstream-radar probe dsh-matrix \
|
|
236
236
|
./dsh-plugin-1.2.3.tgz \
|
|
237
237
|
--dsh-version 0.1.0-rc.3 \
|
|
238
238
|
--dsh-version 0.1.0-rc.6 \
|
|
@@ -243,12 +243,12 @@ The matrix runs versions one at a time in separate temporary profiles and evalua
|
|
|
243
243
|
|
|
244
244
|
## Run it in GitHub Actions
|
|
245
245
|
|
|
246
|
-
If your team wants a scheduled CI gate before wiring a machine to a live DSH profile, commit the reviewed `upstream-radar.config.json` and copy [the example workflow](examples/github-actions/upstream-radar.yml). The reusable Action keeps the workflow to two meaningful steps:
|
|
246
|
+
If your team wants a scheduled CI gate before wiring a machine to a live DSH profile, commit the reviewed `upstream-radar.config.json` and copy [the example workflow](examples/github-actions/upstream-radar.yml). The reusable Action keeps the workflow to two meaningful steps, with an optional third step for DSH load compatibility:
|
|
247
247
|
|
|
248
248
|
```yaml
|
|
249
249
|
steps:
|
|
250
250
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
251
|
-
- uses: MicroMilo/upstream-radar@v0.
|
|
251
|
+
- uses: MicroMilo/upstream-radar@v0.27.0
|
|
252
252
|
with:
|
|
253
253
|
config: upstream-radar.config.json
|
|
254
254
|
fail-on: high
|
|
@@ -256,16 +256,30 @@ steps:
|
|
|
256
256
|
fail-on-compatibility: breaking
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
The Action is a thin wrapper around `radar check --frozen --state :memory: --fail-on high --json`; when the optional compatibility input is enabled, it also passes `--fail-on-compatibility breaking` or `any`. `--frozen` is deliberate: it uses the graph in the reviewed config and does not try to read a developer's local DSH profile. Each run is independent, exits `2` when an active vulnerability or opted-in compatibility change meets its threshold, and exits `1` for an operational or source error. `breaking` catches confirmed or strong incompatibility signals; `any` catches every active compatibility event. The default is `never`, so vulnerability-only behavior stays unchanged. The Action does not deliver a DSH Agent task or modify a branch; the native DSH bundle remains the always-on analysis path. Pin the Action to a release tag such as `v0.
|
|
259
|
+
The Action is a thin wrapper around `radar check --frozen --state :memory: --fail-on high --json`; when the optional compatibility input is enabled, it also passes `--fail-on-compatibility breaking` or `any`. `--frozen` is deliberate: it uses the graph in the reviewed config and does not try to read a developer's local DSH profile. Each run is independent, exits `2` when an active vulnerability or opted-in compatibility change meets its threshold, and exits `1` for an operational or source error. `breaking` catches confirmed or strong incompatibility signals; `any` catches every active compatibility event. The default is `never`, so vulnerability-only behavior stays unchanged. The Action does not deliver a DSH Agent task or modify a branch; the native DSH bundle remains the always-on analysis path. Pin the Action to a release tag such as `v0.27.0`, and pin the checkout Action in your workflow according to your repository's policy.
|
|
260
260
|
|
|
261
261
|
The Action requires the caller to check out the repository first. It does not install the project's dependencies or run their lifecycle scripts; it only reads the committed graph and queries the configured upstream sources. For a fully explicit, lower-level invocation, the equivalent command is:
|
|
262
262
|
|
|
263
263
|
```bash
|
|
264
|
-
pnpm dlx --package=upstream-radar@0.
|
|
264
|
+
pnpm dlx --package=upstream-radar@0.27.0 upstream-radar radar check \
|
|
265
265
|
./upstream-radar.config.json --frozen --state :memory: --fail-on high \
|
|
266
266
|
--fail-on-compatibility breaking --json
|
|
267
267
|
```
|
|
268
268
|
|
|
269
|
+
To add the optional DSH load matrix for a published plugin, provide an exact npm package and at least two exact DSH versions:
|
|
270
|
+
|
|
271
|
+
```yaml
|
|
272
|
+
- uses: MicroMilo/upstream-radar@v0.27.0
|
|
273
|
+
id: radar
|
|
274
|
+
with:
|
|
275
|
+
config: upstream-radar.config.json
|
|
276
|
+
fail-on: high
|
|
277
|
+
probe-package: dsh-cloudflare-browser-run@0.1.1
|
|
278
|
+
probe-dsh-versions: 0.1.0-rc.3,0.1.0-rc.6
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
The Action packs the exact package with `--ignore-scripts`, runs `probe dsh-matrix`, exposes `probe-result`, and fails with the probe's exit code when the result is `incompatible` or `unknown`. This extra step downloads and loads the DSH bundle in temporary profiles; it is a compatibility signal, not a security sandbox or a capability test.
|
|
282
|
+
|
|
269
283
|
For a runnable consumer example using the real [`dsh-cloudflare-browser-run@0.1.1`](examples/github-actions/consumer/upstream-radar.config.json) graph, see the [consumer smoke README](examples/github-actions/consumer/README.md) and its [copyable workflow](examples/github-actions/consumer/upstream-radar.yml).
|
|
270
284
|
|
|
271
285
|
Run the same released Action locally from this repository with:
|
|
@@ -371,6 +385,7 @@ Advisories, release notes, links, package names, and repository strings remain u
|
|
|
371
385
|
- automatic selection of the only DSH profile with third-party bundles, plus a network-free `radar status` snapshot;
|
|
372
386
|
- commit-friendly `init` output that records the project workspace as `.` by default;
|
|
373
387
|
- a reusable GitHub Action that turns the reviewed graph into a two-step, frozen CI gate;
|
|
388
|
+
- an opt-in GitHub Action DSH load matrix for exact published plugin versions and exact DSH versions;
|
|
374
389
|
- a real DSH plugin consumer smoke that runs the published Action against 18 exact package versions;
|
|
375
390
|
- an actionable, network-free `radar status` summary with exact active paths, candidate signals, and next steps;
|
|
376
391
|
- a network-free `doctor` command that checks local DSH registration, overlay/config alignment, state readability, and dependency coverage;
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const TOOL_VERSION = "0.
|
|
1
|
+
export declare const TOOL_VERSION = "0.27.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const TOOL_VERSION = '0.
|
|
1
|
+
export const TOOL_VERSION = '0.27.0';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -181,7 +181,7 @@ pnpm run try:dsh
|
|
|
181
181
|
在把项目接入兼容性门禁前,可以先运行离线规则 benchmark:
|
|
182
182
|
|
|
183
183
|
```bash
|
|
184
|
-
pnpm dlx --package=upstream-radar@0.
|
|
184
|
+
pnpm dlx --package=upstream-radar@0.27.0 upstream-radar benchmark compatibility
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
它覆盖六类契约:安全补丁、只需要项目分析的变化、不兼容的 DSH peer、发布者明确声明 breaking、候选传递依赖漏洞,以及候选依赖图不完整。这个命令不会联网、安装包、加载插件或启动 DSH;它验证的是 Radar 的确定性规则以及 `breaking`/`any` 门禁行为,不是运行时兼容性证明。
|
|
@@ -194,7 +194,7 @@ pnpm dlx --package=upstream-radar@0.26.0 upstream-radar benchmark compatibility
|
|
|
194
194
|
# 打包精确版本,并明确不运行它的 lifecycle script。
|
|
195
195
|
npm pack --ignore-scripts dsh-plugin@1.2.3
|
|
196
196
|
|
|
197
|
-
pnpm dlx --package=upstream-radar@0.
|
|
197
|
+
pnpm dlx --package=upstream-radar@0.27.0 upstream-radar probe dsh-load \
|
|
198
198
|
./dsh-plugin-1.2.3.tgz \
|
|
199
199
|
--dsh-version 0.1.0-rc.6
|
|
200
200
|
```
|
|
@@ -220,7 +220,7 @@ pnpm run showcase:dsh-probe
|
|
|
220
220
|
如果要比较多个 DSH 版本,可以使用矩阵入口:
|
|
221
221
|
|
|
222
222
|
```bash
|
|
223
|
-
pnpm dlx --package=upstream-radar@0.
|
|
223
|
+
pnpm dlx --package=upstream-radar@0.27.0 upstream-radar probe dsh-matrix \
|
|
224
224
|
./dsh-plugin-1.2.3.tgz \
|
|
225
225
|
--dsh-version 0.1.0-rc.3 \
|
|
226
226
|
--dsh-version 0.1.0-rc.6 \
|
|
@@ -233,12 +233,12 @@ JSON 结果结构见[矩阵结果 schema](../schemas/dsh-load-matrix.schema.json
|
|
|
233
233
|
|
|
234
234
|
## 在 GitHub Actions 中运行
|
|
235
235
|
|
|
236
|
-
如果团队想先用定时 CI 检查,而不是马上在 runner 里安装 DSH,可以把审查过的 `upstream-radar.config.json` 提交到仓库,然后复制[示例 workflow](../examples/github-actions/upstream-radar.yml)。现在可以直接使用可复用的 GitHub Action,workflow
|
|
236
|
+
如果团队想先用定时 CI 检查,而不是马上在 runner 里安装 DSH,可以把审查过的 `upstream-radar.config.json` 提交到仓库,然后复制[示例 workflow](../examples/github-actions/upstream-radar.yml)。现在可以直接使用可复用的 GitHub Action,workflow 只需要两个关键步骤;需要时再增加一个 DSH 加载兼容性步骤:
|
|
237
237
|
|
|
238
238
|
```yaml
|
|
239
239
|
steps:
|
|
240
240
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
241
|
-
- uses: MicroMilo/upstream-radar@v0.
|
|
241
|
+
- uses: MicroMilo/upstream-radar@v0.27.0
|
|
242
242
|
with:
|
|
243
243
|
config: upstream-radar.config.json
|
|
244
244
|
fail-on: high
|
|
@@ -246,16 +246,30 @@ steps:
|
|
|
246
246
|
fail-on-compatibility: breaking
|
|
247
247
|
```
|
|
248
248
|
|
|
249
|
-
这个 Action 只是 `radar check --frozen --state :memory: --fail-on high --fail-on-compatibility breaking --json` 的薄封装。`--frozen` 是有意的:它只使用配置文件里的依赖图,不会尝试读取 runner 上不存在的本地 DSH profile。每次运行彼此独立;发现达到阈值的漏洞或选择的兼容性变化时返回 `2`,运行或漏洞源出错时返回 `1`。`breaking` 只拦截有 confirmed/strong 信号的兼容性事件,`any` 会拦截所有活动兼容性事件,默认值是 `never`。这个入口不会投递 DSH Agent 任务,也不会修改分支;需要持续监控和项目级分析时,仍使用原生 DSH bundle。建议把 Action 固定到类似 `v0.
|
|
249
|
+
这个 Action 只是 `radar check --frozen --state :memory: --fail-on high --fail-on-compatibility breaking --json` 的薄封装。`--frozen` 是有意的:它只使用配置文件里的依赖图,不会尝试读取 runner 上不存在的本地 DSH profile。每次运行彼此独立;发现达到阈值的漏洞或选择的兼容性变化时返回 `2`,运行或漏洞源出错时返回 `1`。`breaking` 只拦截有 confirmed/strong 信号的兼容性事件,`any` 会拦截所有活动兼容性事件,默认值是 `never`。这个入口不会投递 DSH Agent 任务,也不会修改分支;需要持续监控和项目级分析时,仍使用原生 DSH bundle。建议把 Action 固定到类似 `v0.27.0` 的发布标签,并根据团队策略固定 checkout Action。
|
|
250
250
|
|
|
251
251
|
调用方需要先 checkout 仓库。这个 Action 不会安装项目依赖,也不会执行项目的 lifecycle script;它只读取提交到仓库的依赖图并查询配置中的上游漏洞源。如果需要完全显式的底层命令,等价写法是:
|
|
252
252
|
|
|
253
253
|
```bash
|
|
254
|
-
pnpm dlx --package=upstream-radar@0.
|
|
254
|
+
pnpm dlx --package=upstream-radar@0.27.0 upstream-radar radar check \
|
|
255
255
|
./upstream-radar.config.json --frozen --state :memory: --fail-on high \
|
|
256
256
|
--fail-on-compatibility breaking --json
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
+
如果还要检查一个已发布插件能否跨多个 DSH 版本加载,可以增加三个 input:
|
|
260
|
+
|
|
261
|
+
```yaml
|
|
262
|
+
- uses: MicroMilo/upstream-radar@v0.27.0
|
|
263
|
+
id: radar
|
|
264
|
+
with:
|
|
265
|
+
config: upstream-radar.config.json
|
|
266
|
+
fail-on: high
|
|
267
|
+
probe-package: dsh-cloudflare-browser-run@0.1.1
|
|
268
|
+
probe-dsh-versions: 0.1.0-rc.3,0.1.0-rc.6
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Action 会用 `--ignore-scripts` 打包精确 npm 版本,运行 `probe dsh-matrix`,并暴露 `probe-result`。如果结果是 `incompatible` 或 `unknown`,Action 会失败。这个步骤会下载并加载 DSH bundle 到临时 profile;它是兼容性信号,不是安全沙箱,也不是能力测试。
|
|
272
|
+
|
|
259
273
|
如果想先跑一个真实消费者样例,可以参考使用真实 [`dsh-cloudflare-browser-run@0.1.1`](../examples/github-actions/consumer/upstream-radar.config.json) 依赖图的[consumer smoke 说明](../examples/github-actions/consumer/README.md)和[可复制 workflow](../examples/github-actions/consumer/upstream-radar.yml)。
|
|
260
274
|
|
|
261
275
|
在本仓库中也可以直接运行同一个已发布 Action:
|
|
@@ -332,7 +346,7 @@ DSH Agent 收到的任务要求:只读分析、引用项目证据、保留不
|
|
|
332
346
|
|
|
333
347
|
## 当前能力与边界
|
|
334
348
|
|
|
335
|
-
已经支持:DSH profile 实际安装树和 npm lock 依赖图、重复版本路径、未解析依赖的覆盖提示、OSV 精确版本匹配、恶意包记录、npm release 监听(只接受高于当前安装版本的候选;npm 的 `latest` 回退不会制造 breaking 告警;最新版本有确定性阻断时会检查历史候选的 OSV 状态和最早一小段传递依赖图,并筛出第一个没有确定性阻断且没有已知漏洞路径、值得交给 DSH 分析的候选;图不完整、图解析或 OSV 失败时不推荐候选)、公开 GitHub Release 说明、OSV 故障时保留已确认状态、连续失败后的 source-health DSH notice、持久事件、DSH 原生投递,以及 Node/peer/exports/入口/bundle/版本边界检查;还包括不联网的 `doctor` 接线检查、默认可提交的相对 workspace、把审查过的图接入 CI 的可复用 GitHub Action、可选的 breaking/any
|
|
349
|
+
已经支持:DSH profile 实际安装树和 npm lock 依赖图、重复版本路径、未解析依赖的覆盖提示、OSV 精确版本匹配、恶意包记录、npm release 监听(只接受高于当前安装版本的候选;npm 的 `latest` 回退不会制造 breaking 告警;最新版本有确定性阻断时会检查历史候选的 OSV 状态和最早一小段传递依赖图,并筛出第一个没有确定性阻断且没有已知漏洞路径、值得交给 DSH 分析的候选;图不完整、图解析或 OSV 失败时不推荐候选)、公开 GitHub Release 说明、OSV 故障时保留已确认状态、连续失败后的 source-health DSH notice、持久事件、DSH 原生投递,以及 Node/peer/exports/入口/bundle/版本边界检查;还包括不联网的 `doctor` 接线检查、默认可提交的相对 workspace、把审查过的图接入 CI 的可复用 GitHub Action、可选的 breaking/any 兼容性门禁、可选的 DSH 版本加载矩阵、离线的 `benchmark compatibility` 规则契约检查,以及基于真实 DSH 插件的 consumer smoke。
|
|
336
350
|
|
|
337
351
|
此外支持一次性的 `probe dsh-load` 和有界的 `probe dsh-matrix`:在临时 DSH profile 中针对一个或多个精确 DSH 版本加载一个精确 tarball,并返回 `compatible`、`incompatible` 或 `unknown`。它是加载兼容性证据,不是安全准入,也不是插件能力 benchmark。
|
|
338
352
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "upstream-radar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Always-on dependency security monitoring for DeepSeek Harness (DSH) plugins: find exact installed or candidate transitive vulnerable paths and breaking updates, then route evidence to a DSH Agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|