Introduction¶
When running headless agents in DeepSeek Harness (DSH), PR gates can be bypassed; what the chat interface displays is often what the model “claims” it did, rather than the actual execution results at the tool layer. The community already has plugins handling “what was read” (e.g., dsh-read-guard) and “what was written” (e.g., dsh-pr-gate), but as of the time the documentation was written, the DSH plugin ecosystem still lacked a tamper-evident, offline-verifiable attestation chain for “what was actually done.” Below is an introduction to dsh-attest-chain (category: admin-security) released by maintainer zhengqiuyang, which writes audited tool results into a hash-chained, ed25519-signed JSONL ledger, and can bind commit SHAs from shell output into the chain.
What Is This¶
dsh-attest-chain targets DeepSeek Harness sessions and provides a Signed chain-of-custody: for each result of monitored tools (such as bash, write, edit, web_fetch, etc.), it appends a custody record that is SHA-256 chained and optionally ed25519-signed to a persistent ledger. The trust path does not call an LLM; tampering with any line will break the chain, and truncating the tail will cause inconsistency with the published head. The signing core is vendored from agent-attest, whose CI gate can consume this ledger as session-side evidence.
Compared with qiushi-dsh-evidence-audit, which is also security-oriented: this plugin applies an ed25519 signature to each record in addition to the SHA-256 chain. Records bind the sha256 of model-visible content, the tool name, callId, error flags, and extract commit SHAs from shell output for Git binding. The verification API verifyChain() can return the first bad chain position as {seq, reason}. If you only need a minimal footprint with zero key material, the documentation recommends choosing qiushi; if you need attribution and repository history binding, choose attest-chain.
How It Works¶
The data flow described in the documentation is as follows:
tool result ──> custody record {time, tool, callId, isError, sha256(content)}
──> chained: digest = sha256(canonicalJSON({seq, prevDigest, record}))
──> signed: ed25519 over the digest (keypair in .dsh-attest-chain/keys/)
──> appended: .dsh-attest-chain/session.jsonl (one line, strict order)
Verification is purely offline: replay the ledger, recompute digests, and check links and signatures. After publishing the head digest or public key to a persistent location such as a PR description or CI variable, subsequent comparisons can deterministically detect tampering or truncation. The first run generates a keypair, and the private key does not leave the machine running the agent; when configured with sign: false, only the digest chain is created, which is suitable for scenarios where only tampering evidence against a published head is needed.
Installation and Enablement¶
Official installation command (npm distribution, no build required, no allowBuilds authorization needed; the repository includes a pre-built lib/):
dsh plugin --profile default add dsh-attest-chain
Compatibility notes (excerpt from the documentation): Verified on the DSH 0.2.x line (source snapshot 0.2.1-alpha.2); Node >= 20. Under a Disposable profile, you can also install with dsh plugin --profile <fresh> add github:zhengqiuyang/dsh-attest-chain, and the startup log will show [dsh-attest-chain] active: ….
Enable it in the DSH configuration and specify the tools and paths to monitor. Example:
- id: dsh-attest-chain
name: dsh-attest-chain
config:
tools: [bash, write, edit, str_replace_editor, web_fetch]
ledgerPath: .dsh-attest-chain/session.jsonl
keysDir: .dsh-attest-chain/keys
sign: true
Please add .dsh-attest-chain/ to the repository’s .gitignore; private keys must not be committed; verifiers use public keys. The plugin runs with the permissions of the current dsh process; before installation, review the GitHub source code and the MIT license (package.json version 0.1.0) yourself.
Typical Usage and Consumption¶
- Install and write the
configas described above, then run sessions normally under the profile where attestation is needed; tool results will be automatically appended toledgerPath. - Write the head digest or public key at the end of the session to a comparable location such as a PR or CI.
- Offline call the exported
verifyChainAPI to replay the ledger; dsh-trust-panel can run verification in real-time in a sidebar and display the results.
Development-side self-testing (from the maintainer’s repository):
npm install
npm test # syncs the vendored agent-attest core, builds, runs unit tests
Roadmap (the documentation does not commit to delivery times): session-end in-toto statement wrapping, per-session-id ledger separation, a verify tool card in the Web UI, and a GitHub check-run bridge that posts the head digest to PRs.
Use Cases and Caveats¶
Suitable for: Teams that need to prove after the fact “which tool results were recorded in an agent session, whether the chain is complete, and who signed it”; in-toto-style evidence chains that want to be connected with agent-attest CI and dsh-trust-panel; scenarios that need to bind commits from shell output to the working chain.
Limitations (from the plugin’s own description): observe-only; cannot prove that commands were “correctly executed” at the OS layer, and cannot detect tails that were deleted “before the ledger was first published.” Like qiushi, it is honest about its boundaries.
Security: Content is stored only as digests, not in plaintext; key directories are local. The community plugin directory SkillHub is an independent site with no official affiliation with DeepSeek / High-Flyer.
Links¶
- Directory page: https://www.skillhub.cn/plugins/zhengqiuyang/dsh-attest-chain
- Source code and README: https://github.com/zhengqiuyang/dsh-attest-chain
If DSH official or mainstream plugins later build in equivalent signed session logging capabilities, the kill criteria in the maintainer’s README indicates that this plugin will be frozen at the last available version with a postmortem left here; the signing core is still maintained by agent-attest.