Rule

unasserted-security-result

Review predicate outcomes discarded before effects, persisted, or returned with an effect; security intent unknown.

Release v0.1.1View Markdown

Specimen 96 of 96 · Other active opt-ins / Source structure and validation

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.

Shell
./.nightshade/node_modules/.bin/nightshade ./contracts --detectors unasserted-security-result
./.nightshade/node_modules/.bin/nightshade detector show unasserted-security-result

The 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/unasserted-security-result.md at v0.1.1.

Opt-in, low-confidence review. Flags a comparison or canonical predicate discarded before a ledger write/send, persisted as data, or returned inside an aggregate after an effect without earlier enforcement of that exact predicate. A Boolean-returning predicate API is allowed. Recording a status can be intentional; the rule does not infer security intent from names.

Uses resolved expressions, 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:

Compact
// nightshade-disable-next-line unasserted-security-result -- Reason this match is intentional

Diagnostics cannot be suppressed, and an unmatched directive for a selected rule makes analysis incomplete. See configuration for fingerprint suppressions and baselines.

References#