fhenix-review
Installation
SKILL.md
fhenix-review — audit confidential code
This skill is for review contexts. The companion skills fhenix-contracts and fhenix-sdk already activate when editing FHE code; this one layers an audit lens on top of (or instead of) them when the task is review rather than authoring.
What to look for, in order
- ACL bugs — missing
FHE.allowThisafter a stored encrypted write; mismatched ACL pairing (e.g.,decryptForTx().withoutPermit()withoutallowPublic);allowSendergranted to an attacker-controlledmsg.senderfor someone else's handle. - Decrypt-flow mismatches —
decryptForViewused wheredecryptForTxis needed (or vice versa); legacyFHE.decrypt(...)/getDecryptResultSafe(...)references that should have been migrated to the SDK-mediated flow. - Plaintext leaks —
trivialEncrypt(literal)for secret values; plaintext values stored / emitted alongside their encrypted twins; revert paths that branch on what should be private. - Branching on
ebool—if (FHE.gt(...)),require(FHE.gt(...)),while (...)— must beFHE.select. - Confidentiality ≠ anonymity — the dApp claims privacy but leaks via gas patterns, event-fact, or tx graph.
- Encrypted approval / allowance — anywhere code tries to use ERC-20
approve/transferFromsemantics for ciphertexts. - Randomness sourcing —
FHE.randomEuintXXused where user-contributed entropy is required (auctions, gifts, fair shuffles). - Input validation —
InEuintXXaccepted without "Proof of Plaintext Input" where the protocol's invariants depend on the cleartext meeting bounds. - Permit hygiene —
expirationin milliseconds not seconds; stale per-cycle permits; sharing-permit JSONs leaked publicly. - Standards mixing — ERC20Confidential + FHERC20 + ERC-7984 interoperating in one app without an explicit wrapper.
Full catalog: references/gotchas.md.