Skip to content
Back to search

dsh-lineage

Content-addressed artifact, fact, action and report lineage for DeepSeek Harness

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dongsheng123132--dsh-lineage/badge.svg)](/listings/dongsheng123132--dsh-lineage)

HTML

<a href="/listings/dongsheng123132--dsh-lineage"><img src="/api/listings/dongsheng123132--dsh-lineage/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

dsh plugin --profile lineage add github:dongsheng123132/dsh-lineage

Registered tools:

- `dsh_lineage_inspect` - `dsh_lineage_ingest` - `dsh_lineage_query` - `dsh_lineage_verify`

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.

README.md · README · 122 lines
  1. # dsh-lineage
  2. **Maintainer / Author:He Fangsheng (贺方升 / 贺去病; also known as Dosen) · [hequbing.com](https://www.hequbing.com)**
  3. [![CI](https://github.com/dongsheng123132/dsh-lineage/actions/workflows/check.yml/badge.svg)](https://github.com/dongsheng123132/dsh-lineage/actions/workflows/check.yml)
  4. [![MIT license](https://img.shields.io/github/license/dongsheng123132/dsh-lineage)](LICENSE)
  5. [![Node.js 22+](https://img.shields.io/badge/Node.js-%E2%89%A522-339933?logo=nodedotjs&logoColor=white)](package.json)
  6. [![Awesome DSH Plugins](https://img.shields.io/badge/Awesome_DSH-verified_lab-0969da)](https://github.com/dongsheng123132/awesome-dsh-plugins#2origin-plugin-lab)
  7. Content-addressed data and action lineage evidence for [DeepSeek Harness](https://github.com/deepseek-ai/DeepSeek-Harness).
  8. The DSH ecosystem already has a security-audit plugin that reports plugin provenance. `dsh-lineage` addresses a different gap: it builds a local, verifiable object graph for artifacts, verified-fact records, actions, and reports. It never stores chat transcripts or factual prose; a node is only a typed ID plus an explicit workspace-relative object reference and expected SHA-256.
  9. Version 0.2.0 is a formal Codex plugin and standalone proof-only MCP server, and uses the namespace export shape required by the stock DSH Web Loader. A real Cordis boot regression test guards that loader contract.
  10. Adjacent tools track Skill bundle versions, hash-chain agent activity, or register provenance. This project stays at the object-graph evidence layer: typed content-addressed nodes, explicit causal edges, resolvable references, DAG validation, upstream/downstream closure, and missing/stale disclosure.
  11. ## Graph model
  12. Node types:
  13. - `artifact`
  14. - `fact`
  15. - `action`
  16. - `report`
  17. Edge types point from the dependent object toward its provenance:
  18. - `derived-from`
  19. - `observed-by`
  20. - `produced-by`
  21. - `supersedes`
  22. Every node reference is dereferenced inside `workspaceRoot` and hashed. The verifier distinguishes:
  23. - `verified`: the object exists and matches its expected hash;
  24. - `missing`: the reference cannot be resolved;
  25. - `stale`: the object exists but its current hash differs;
  26. - dangling graph references, invalid relation types, and cycles.
  27. No missing or stale object is silently promoted into a fact.
  28. ## Append-only ledger
  29. Input is explicit JSONL. Each event has an `idempotencyKey` and either `put-node` or `put-edge`. The key maps to one immutable event file in `ledgerDir`:
  30. 1. validate the complete hypothetical graph before writing;
  31. 2. write a temporary file inside the explicit ledger directory;
  32. 3. read it back;
  33. 4. atomically hard-link it into its final immutable slot;
  34. 5. read the published file back and verify SHA-256.
  35. Replaying the same key and event is safe. Reusing a key with different content fails closed. Event files are never updated; a new object revision gets a new node ID and a `supersedes` edge.
  36. ## Safety model
  37. - All ledger, JSONL, object and report paths are workspace-relative; traversal and symlink components are rejected.
  38. - Writes occur only inside explicit `ledgerDir` or `artifactDir`.
  39. - Event schemas allow only structural IDs, types, paths and hashes. Keys for claims, chat, prompts, messages, raw content, text, credentials, tokens, cookies and authorization are rejected.
  40. - Referenced object bytes are hashed but never copied into the ledger or reports.
  41. - Ingest rejects self-edges, graph cycles and invalid producer/observer/supersedes type constraints before publication.
  42. - Closure reports are content addressed and read-back verified.
  43. Run this over evidence objects you created or were authorized to inspect. A hash proves identity, not truth; `dsh-lineage` reports what is present, missing or changed and does not invent assertions.
  44. ## Install in DSH
  45. ```bash
  46. dsh plugin --profile lineage add github:dongsheng123132/dsh-lineage
  47. ```
  48. Registered tools:
  49. - `dsh_lineage_inspect`
  50. - `dsh_lineage_ingest`
  51. - `dsh_lineage_query`
  52. - `dsh_lineage_verify`
  53. ## MCP
  54. `.mcp.json` declares a standalone stdio MCP server:
  55. - `lineage_events_inspect` validates a bounded inline JSONL graph and reports structural hashes, counts, dangling references, cycles and relation errors.
  56. - `lineage_events_query` returns deterministic upstream/downstream closure over those inline events.
  57. MCP accepts at most 1 MiB of inline structural events. It never dereferences object paths and never reads or writes the filesystem. Persistent append-only ingestion and object-hash verification remain available only through the workspace-bounded DSH tool and CLI surfaces.
  58. ## CLI
  59. ```bash
  60. dsh-lineage ingest --root /workspace --ledger ledger --events lineage.events.jsonl
  61. dsh-lineage inspect --root /workspace --ledger ledger
  62. dsh-lineage query --root /workspace --ledger ledger --node report:proof --direction upstream
  63. dsh-lineage verify --root /workspace --ledger ledger --node report:proof --direction upstream --artifact-dir artifacts
  64. ```
  65. `query` supports `upstream`, `downstream`, and `both`. `verify` exits `0` for a fully verified closure, `2` when a report is written but evidence is missing/stale/invalid, and `1` for an operational or schema error.
  66. ## Example
  67. ```bash
  68. node bin/dsh-lineage.mjs ingest --root . --ledger ledger --events examples/lineage.events.jsonl
  69. node bin/dsh-lineage.mjs verify --root . --ledger ledger --node fact:normalized-v1 --direction both --artifact-dir artifacts
  70. ```
  71. See [`examples/lineage.events.jsonl`](examples/lineage.events.jsonl).
  72. ## Develop
  73. ```bash
  74. npm test
  75. npm run check
  76. npm run smoke:plugin
  77. npm run smoke:mcp
  78. python C:/Users/ZhuanZ/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py .
  79. ```
  80. Requires Node.js 22+. There are no runtime dependencies or install lifecycle scripts beyond the optional DSH tools SDK peer.
  81. ## License
  82. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.