detect-tool-result-tampering
Use when tool output, downloaded data, or an API response must be proven unmodified before use. Verify a digest or signature against a trusted source, not against the same channel that delivered it.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- detect-tool-result-tampering
- description
- Use when tool output, downloaded data, or an API response must be proven unmodified before use. Verify a digest or signature against a trusted source, not against the same channel that delivered it.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md354 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Detect tool result tampering
If an attacker can edit the bytes between a service and your agent, they can rewrite a "safe" result into a destructive command or a redirect. This skill binds each result to a value you obtained out of band, so tampering is detectable.
Procedure
-
Identify what the result should be bound to: a GPG or sigstore signature, a published checksum, a TLS pin, or a content hash you fetched from a second channel.
-
Verify against an independent source. A checksum served by the same host proves only that the host is self-consistent:
curl -sO https://mirror-a.example/pack.tar.gz shasum -a 256 pack.tar.gz # compare to the value in release notes on a different origin -
For signed artefacts, verify the signature before unpacking:
gpg --verify pack.tar.gz.sig pack.tar.gzorcosign verify-blob --signature s.sig --certificate c.pem blob. -
For API JSON, check integrity markers if offered (HMAC header, ETag, content hash) and re-derive them locally:
printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$KEY" # compare with X-Signature header -
Pin TLS where the channel matters: record the leaf certificate SPKI at first contact and alert on change.
openssl s_client -connect host:443 -showcerts </dev/null | openssl x509 -pubkey -noout | shasum -a 256 -
Compare the payload against schema and expected range; a signature-less numeric field that suddenly doubles is a tamper smell even without a broken hash.
-
On mismatch, discard the result entirely and re-fetch through a channel you trust; never "use the good parts".
Pitfalls
- A hash fetched over the same TLS session as the file is not independent verification.
- Mutable tags (
latest) plus no digest let a compromised upstream swap content silently. - Checking only size or mtime catches nothing; attackers preserve both.
- Trusting a verification step that pulls its public key from the attacker's server fails.
Verification
shasum -a 256 -c expected.sha256 # must print OK; any FAIL is tampering until proven otherwise
Report: "result <path> bound to <source>; signature/hash verified yes|no; TLS SPKI unchanged; verdict accepted|rejected."
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.