# native-key-authentication-review

> Canonical prover-supplied ownPublicKey participates in a required ledger credential check.

Canonical: https://nightshade.dicksonwu.xyz/rules/native-key-authentication-review.html
Release: Nightshade 0.1.1 (v0.1.1)

| Field | Value |
| --- | --- |
| Rule ID | `native-key-authentication-review` |
| Severity | info |
| Confidence | high |
| Maturity | experimental |
| Selection | Opt-in |
| Policy intent | not required |
| Default enabled | no |
| Category | Other active opt-ins / Authorization, identity and membership |
| Engine facts used | all-successful-predicates, direct-hash-inputs, exact-effect-histories |
| Release | v0.1.1 |

## 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.

```sh
./.nightshade/node_modules/.bin/nightshade ./contracts --detectors native-key-authentication-review
./.nightshade/node_modules/.bin/nightshade detector show native-key-authentication-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 |
| ---: | ---: | ---: | ---: | ---: |
| 5/5 | 5/5 | 5/5 | 0/0 | 0 |

No deviations were recorded for this rule.

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/native-key-authentication-review.md at v0.1.1.

Availability: opt-in. Severity: info. Confidence: high.

Opt-in candidate, informational severity and high confidence in the static source relationship. Canonical native `ownPublicKey` is prover supplied and does not separately establish control of the corresponding key. The rule observes a required exact equality to preexisting ledger data on completed successful effect histories, either with an independent mandatory private-preimage check or with the native key as an exact ingredient of a canonical hash/commit credential containing another private witness input.

Other secret credentials can provide sufficient authentication. Legitimate intentional constructions can match. This observation establishes neither authentication intent, transaction feasibility, separate key control nor an authentication bypass. Direct raw native-key cases lacking a mandatory secret-preimage check remain covered by `spoofable-authorization`.

Matching uses canonical native source identity and exact immutable input snapshots, never witness names or dependency unions. Optional/disjunctive checks, preview-only comparisons, unrelated key/secret predicates, self-written ledger credentials and wildcard selectors do not establish the required relationship. Unknown predicate/invocation evidence and exhausted observation allowances produce rule-scoped incompleteness. The closed terminal Counter grammar certifies absence because it excludes all witnesses.

Commitment input/randomness snapshots use a dedicated observer flag. Ordinary
digest observation supplies no commitment-evidence certificate; selecting this
review enables it in the isolated rule pass. Missing applicable snapshots remain
rule-scoped incomplete.

## 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 native-key-authentication-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/native-key-authentication-review.md)
- [Catalog entry in rules.json](https://nightshade.dicksonwu.xyz/rules.json)
- [All rules](https://nightshade.dicksonwu.xyz/rules.md#authorization-identity-and-membership)
- [Limitations](https://nightshade.dicksonwu.xyz/limitations.md)
