# source-claim-shielded-issuance-review

> Review an explicit adjacent source claim paired with shielded issuance to a user key.

Canonical: https://nightshade.dicksonwu.xyz/rules/source-claim-shielded-issuance-review.html
Release: Nightshade 0.1.1 (v0.1.1)

| Field | Value |
| --- | --- |
| Rule ID | `source-claim-shielded-issuance-review` |
| Severity | info |
| Confidence | varies |
| Maturity | experimental |
| Selection | Opt-in + policy |
| Policy intent | required |
| Default enabled | no |
| Category | Policy-dependent rules |
| Engine facts used | explicit-source-claim-policy, parser-owned-exact-adjacent-comment, canonical-mint-invocation, complete-original-successful-histories |
| Release | v0.1.1 |

## Selection and scope

Not selected by default. Select it with `--detectors` or the `detectors` list in nightshade.json, and declare the matching application intent in `policies`. Selecting it alone does not supply that intent.

```sh
./.nightshade/node_modules/.bin/nightshade ./contracts --detectors source-claim-shielded-issuance-review
./.nightshade/node_modules/.bin/nightshade detector show source-claim-shielded-issuance-review
```

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

Synthetic corpus checks for this rule in the 0.1.1 proof run. A check counts only with compiler acceptance and complete analysis.

| Positive detected | Corrected quiet | Lookalike quiet | Other negative quiet | Incomplete |
| ---: | ---: | ---: | ---: | ---: |
| 6/6 | 2/2 | 15/16 | 0/1 | 1 |

Deviations recorded for this rule:

| Case | Kind | Expected to observed lines | Issue |
| --- | --- | --- | --- |
| manifest.json / sourceClaims52/drafts/source-claims52/incomplete-unknown-tag.compact | negative | [] to [] | incomplete or unvalidated |
| manifest.json / sourceClaims52/drafts/source-claims52/must-match-intentional-claim.compact | lookalike | [6] to [6] | control hit |

These are behavior checks on synthetic fixtures, not a precision or recall estimate. See [evaluation](https://nightshade.dicksonwu.xyz/evaluation.md#synthetic-corpus).

## Rule documentation

From https://github.com/DicksonWu654/nightshade/blob/v0.1.1/docs/detectors/source-claim-shielded-issuance-review.md at v0.1.1.

Availability: **opt-in**, **policy-required**; severity **info**. Select
`--detectors source-claim-shielded-issuance-review` and configure an explicit policy:

```json
{
  "sourceClaims": [{
    "kind": "non-transferable-shielded-issuance",
    "circuit": "issue",
    "quote": "// Contract claim: recipients cannot transfer issued coins to other parties."
  }]
}
```

A known benign mismatch is a policy quote that overstates transfer restrictions.
It can yield an expected
mismatch review. Confirm the claim's intended meaning and source location; the
detector checks the supplied policy against represented code and does not infer
broader transfer or deployment semantics.

The policy supplies claim meaning. The analyzer does not interpret prose or infer
intent from names, paths, omitted transfer circuits, or other source conventions.
The selector must resolve uniquely to a canonical exported circuit. The quote
must equal one complete parser-owned comment, including delimiters, in that
circuit's declaration file immediately before the declaration, with only
whitespace between the comment and declaration. Arbitrary exact quotes are
supported when the policy explicitly supplies this claim kind.

A finding pairs that comment with a canonical `mintShieldedToken` invocation on
a complete modeled successful entry history whose fourth argument has exact
native type `Either<ZswapCoinPublicKey, ContractAddress>` and an active left
(user-key) tag. Literal tags and mandatory final successful-history Boolean
constraints supply evidence, including checks after the mint. Helpers, aliases
and nonempty callbacks use ordinary call transfers. Aborted histories and
zero-iteration callbacks do not contribute successful invocations.

Compact **0.34.0/ZKIR2 or ZKIR3** is supported. Missing history evidence, opaque
tags or layouts, unresolved calls, applicable unsupported profiles, checkpoints,
unfinished baseline semantics and exhausted allowances produce incomplete
rule-scoped diagnostics. Experimental Counter-query histories lack this rule's
selected evidence and cannot certify a configured observation. Preparation,
original-string UTF-8 adjacency inspection, capture, constraint matching and
emission share **40,000 steps per entry, 256 paths per entry, and 50,000 cumulative
values per rule**, with no retry. Default and unselected scans do not run this rule.

## 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 source-claim-shielded-issuance-review -- Reason this match is intentional
```

Diagnostics cannot be suppressed, and an unmatched directive for a selected rule makes analysis incomplete. See [configuration](https://nightshade.dicksonwu.xyz/configuration.md#suppress-an-intentional-match) for fingerprint suppressions and baselines.

## References

- [Rule source document at v0.1.1](https://github.com/DicksonWu654/nightshade/blob/v0.1.1/docs/detectors/source-claim-shielded-issuance-review.md)
- [Catalog entry in rules.json](https://nightshade.dicksonwu.xyz/rules.json)
- [All rules](https://nightshade.dicksonwu.xyz/rules.md#policy-dependent-rules)
- [Limitations](https://nightshade.dicksonwu.xyz/limitations.md)
