Rule
witness-derived-value-review
Review direct witness-derived canonical-send recipients without an exact prior ledger equality binding.
Specimen 66 of 96 · Other active opt-ins / Privacy and cryptographic derivations
- Severity
- medium
- Confidence
- varies
- Maturity
- experimental
- Selection
- Opt-in
- Policy intent
- not required
- Release
- v0.1.1
- Engine facts used
resolved-model
Selection and scope#
Not selected by default. Select it with --detectors or the detectors list in nightshade.json. Either one replaces profile selection, so list every rule you want.
./.nightshade/node_modules/.bin/nightshade ./contracts --detectors witness-derived-value-review
./.nightshade/node_modules/.bin/nightshade detector show witness-derived-value-reviewThe first command runs only this rule; --detectors takes a comma-separated list. The second prints the rule's metadata from your installed version.
Severity is review priority. It does not express exploitability or impact. Confidence is detector metadata, not a probability. All built-in rules are experimental.
Compiler scope: the engine supports the pinned profiles 0.28.0, 0.29.0, 0.30.0, 0.31.1, 0.33.0-rc.2, 0.34.0, 0.35.0-rc.1 and 0.35.0, with ZKIR2 by default. Support for this rule can be narrower; the rule documentation below states any narrower scope.
Corpus checks#
The 0.1.1 proof run had no mapped synthetic corpus checks for this rule, so there are no measured results to show here. See evaluation.
Rule documentation#
From docs/detectors/witness-derived-value-review.md at v0.1.1.
Opt-in, low-confidence review. Flags a canonical send whose recipient comes directly from a witness result or its projection without an earlier exact equality assertion binding it to a ledger-derived value on the same branch. Prover-selected recipients can be intentional; the rule does not establish payment policy or review every amount source.
Uses canonical send and witness identities, local aliases and separate branch states. Direct calls are supported; helper-mediated constraints are outside this review. Unsupported loops and exhausted traversal budgets produce diagnostics.
Suppress a match#
If a match is intentional, suppress it on the line before with the exact rule ID and a reason of at least eight characters:
// nightshade-disable-next-line witness-derived-value-review -- Reason this match is intentionalDiagnostics cannot be suppressed, and an unmatched directive for a selected rule makes analysis incomplete. See configuration for fingerprint suppressions and baselines.