dsh-vet 0.2.1 → 0.2.2

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.
@@ -17,8 +17,19 @@ in-scope paths are not.
17
17
  for destructive operations outside any declared scope.
18
18
  - Non-destructive writes with a literal out-of-scope absolute path:
19
19
  **high / high.**
20
- - Writes whose target is a runtime value: **medium / low** (ROADMAP D2
21
- runtime-dependent findings never lower a grade on their own).
20
+ - Writes whose target is a runtime value: **low / low** reported as
21
+ "scope not statically verifiable", never as an out-of-scope claim the
22
+ scanner cannot make, and never grade-affecting (ROADMAP D2). Normal
23
+ plugins write dynamic paths constantly; this tier is a review prompt,
24
+ not an accusation.
25
+
26
+ The runtime-value tier deliberately does **not** attempt the path-derivation
27
+ dataflow some disputes have asked for: constraint chains are usually
28
+ interprocedural (derive-and-validate in one function, delete in another),
29
+ beyond best-effort static analysis. The honest position is "unresolvable —
30
+ review the derivation", which is what the finding now says. Clarified via
31
+ [dispute #10](https://github.com/rogerdigital/dsh-vet/issues/10), whose
32
+ guarded managed-directory removal is the canonical well-reviewed case.
22
33
 
23
34
  ## False positives
24
35
 
package/lib/index.d.mts CHANGED
@@ -271,7 +271,7 @@ declare function runRules(analysis: Analysis, only?: string[]): VetFinding[];
271
271
  //#endregion
272
272
  //#region src/scanner.d.ts
273
273
  /** Kept in lockstep with package.json; a test asserts they match. */
274
- declare const SCANNER_VERSION = "0.2.1";
274
+ declare const SCANNER_VERSION = "0.2.2";
275
275
  interface ScanOptions extends ResolveOptions {
276
276
  /** Injectable clock for deterministic tests/reports. */
277
277
  now?: () => string;
package/lib/index.mjs CHANGED
@@ -1463,14 +1463,16 @@ const undeclaredFsWrite = {
1463
1463
  }));
1464
1464
  }
1465
1465
  if (dynamic.length > 0) findings.push(finding(this, {
1466
- severity: "medium",
1466
+ title: "Write/delete target is a runtime value — scope not statically verifiable",
1467
+ severity: "low",
1467
1468
  confidence: "low",
1468
1469
  evidence: capEvidence(dynamic.map((use) => ({
1469
1470
  file: use.file,
1470
1471
  line: use.line,
1471
- snippet: use.snippet
1472
+ snippet: use.snippet,
1473
+ note: "review how the target is derived; the scanner cannot resolve it statically"
1472
1474
  })), 5),
1473
- remediation: "Use fixed, reviewable paths; runtime-computed write targets cannot be audited statically.",
1475
+ remediation: "Keep the derivation next to the call, test the invariant (fixed child of a validated root), and document the managed scope so reviewers can verify it.",
1474
1476
  references: ["https://github.com/rogerdigital/dsh-vet/blob/main/docs/rules/perm.undeclared-fs-write.md"]
1475
1477
  }));
1476
1478
  return findings;
@@ -1601,7 +1603,7 @@ function runRules(analysis, only) {
1601
1603
  * over the same artifact with the same version are identical.
1602
1604
  */
1603
1605
  /** Kept in lockstep with package.json; a test asserts they match. */
1604
- const SCANNER_VERSION = "0.2.1";
1606
+ const SCANNER_VERSION = "0.2.2";
1605
1607
  /**
1606
1608
  * A scan that audited zero JavaScript files must not read as a clean pass —
1607
1609
  * a TypeScript source tree scanned as a local path has no `.js` to analyze,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-vet",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Security vetting for DeepSeek Harness (DSH) plugins: permission & supply-chain audits before install, graded via the open dsh-vet/v1 report standard.",
5
5
  "dsh": {
6
6
  "seams": ["fs", "shell", "web"]