0x-shashi/web3-audit-skills/aztec-scanner

Claude Code and agent skill by 0x-shashi/web3-audit-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when the user wants to audit Aztec Network smart contracts written in Noir, scan for privacy-specific vulnerabilities including state leakage, note handling, or nullifier collisions, review private DeFi protocols for information disclosure, or analyze encrypted computation and zero-knowledge proof circuits.

Install

npx vskill@latest install 0x-shashi/web3-audit-skills/aztec-scanner

SKILL.md

Aztec Network Security Scanner

Security scanner for Aztec Network smart contracts written in Noir. Aztec is a privacy-focused L2 on Ethereum with a unique dual public/private state model.


Language & Runtime

AttributeValue
ChainAztec Network (Ethereum L2)
LanguageNoir (Rust-inspired, ZK-circuit language)
Proof SystemUltra-PLONK (client-side proving)
State ModelDual: Private (UTXO/notes) + Public (storage slots)
PrivacyPrivate functions hide inputs, outputs, and who called them
ExecutionPrivate: client-side → Public: sequencer-side
Token StandardPrivate tokens via note encryption

Architecture: Public vs Private

┌─────────────────────────────────────────────────────────┐
│ Aztec Contract │
├──────────────────────────┬──────────────────────────────┤
│ Private Functions │ Public Functions │
│ (Client-side execution) │ (Sequencer-side execution) │
│ - Hidden inputs/outputs │ - Visible state changes │
│ - Note creation/nullifying │ - Storage slot reads/writes │
│ - ZK proof generation │ - Similar to Solidity │
├──────────────────────────┴──────────────────────────────┤
│ Private State: Notes (UTXO-like, encrypted) │
│ Public State: Storage slots (like Solidity) │
│ Shared: Nullifier tree, note hash tree, L1-L2 messages │
└─────────────────────────────────────────────────────────┘
Private State: Notes

Aztec uses a UTXO-like model for private state:

  1. Notes are encrypted data stored in the note hash tree
  2. To "read" a note, the owner decrypts it client-side
  3. To "spend" a note, a nullifier is emitted (marks the note as consumed)
  4. To "create" a note, a new note hash is added to the tree
  5. Notes are immutable — to update, nullify the old note and create a new one
Execution Order

Private functions execute FIRST (client-side), then public functions execute SECOND (sequencer-side). This ordering has security implications:

  • Private can enqueue calls to public, but not vice versa
  • Private computations can't read current public state (stale reads)
  • Public functions see the effects of private functions

Detection Capabilities

CategoryDetectionSeverity
PrivacyPrivate data exposed via public state or function argsCritical
PrivacyNote content leaked through observable behavior (timing, gas)High
PrivacyEncryption key mismanagement (wrong recipient)Critical
NullifierNullifier collision (two notes produce same nullifier)Critical
NullifierNullifier not emitted when note consumed (double-spend)Critical
NullifierNullifier predictable (allows front-running)High
State SyncPublic/private state inconsistencyHigh
State SyncPrivate function reads stale public stateMedium
CircuitUnder-constrained circuit (invalid proofs accepted)Critical
CircuitOver-constrained circuit (valid transactions rejected)Medium
OracleUntrusted oracle data used in circuit constraintsHigh
AccessPrivate function callable without proper authHigh
NotesNote not encrypted for correct recipientCritical
NotesNote discovery failure (recipient can't find their notes)High

Privacy Threat Model

ThreatAttack VectorMitigation
Transaction graph analysisLinking sender/receiver via timingAdd delay, use shield/unshield
Amount leakageFixed denomination reveals nothingUse uniform note sizes
Metadata leakagePublic function calls reveal intentMinimize public function usage
Sequencer censorshipSequencer refuses to include txForced inclusion via L1
Nullifier linkingLinking nullifiers to note creationNullifier derived from note secret + position

Resources

Workflows

Overview

Aztec is a privacy-focused L2 with:

  • Private and public state separation
  • UTXO-like note model for private data
  • Noir language for circuit programming
  • Encrypted function arguments
  • Client-side proof generation

Error Code Reference

Common Aztec/Noir errors encountered during audits. Noir circuits fail at proof generation time, making errors harder to debug than runtime reverts.

Noir Language Errors
Error TypeError PatternMeaning
Assertion failureassert(condition) failedConstraint not satisfied — proof cannot be generated
Array boundsindex out of boundsArray access exceeds declared length
Integer overflowOverflow on arithmeticOperation exceeds field/integer bounds
Type mismatchExpected type X, found YIncorrect type in circuit computation
Unresolved variableVariable not foundReference to undefined variable in circuit
Division by zeroDivision by zeroDenominator is zero in integer division
Aztec Protocol Errors
Error PatternSourceMeaning
'NOTE_NOT_FOUND'Note managementNote does not exist or was nullified
'NULLIFIER_ALREADY_EXISTS'Nullifier treeDouble-spend attempt — note already consumed
'INVALID_CALLER'Access controlUnauthorized function caller
'INVALID_CONTEXT'Context checkWrong execution context (private vs public)
'INVALID_NOTE_TYPE'Note deserializationNote type does not match expected schema
'PUBLIC_CALL_FAILED'Public functionPublic portion of transaction reverted
'PRIVATE_CALL_FAILED'Private functionPrivate proof verification failed
'ENCRYPTION_FAILED'Note encryptionFailed to encrypt note for recipient
'INVALID_SELECTOR'Function dispatchFunction selector not found on contract
Privacy-Specific Audit Errors
IssueError PatternAudit Significance
Note viewing key leakNo error — silentIf viewing keys are shared incorrectly, privacy is broken without any on-chain error
Nullifier predictabilityNo error — logicalPredictable nullifiers allow note existence tracking — check nullifier derivation
Public/private boundary leakTransaction appears normalData flowing from private to public context may leak information — audit cross-context calls
Incomplete nullificationNo errorNote consumed but nullifier not published — allows double-spend
Proof witness leakageNo on-chain errorWitness data in proof reveals private inputs — verify proof contains only public signals

Troubleshooting

IssueLikely CauseSolution
Privacy leakage not detectedScanner audits logic without modeling information flowTrace all data paths between private and public contexts; flag any private state exposed via public functions
Nullifier collision risks missedScanner doesn't model nullifier treeVerify nullifier derivation includes unique components (note hash, secret, index)
Note encryption issues not caughtScanner doesn't analyze encryption correctnessVerify notes are encrypted to correct recipient keys; check key rotation handling
Cross-context reentrancy missedScanner treats private/public as isolatedTrace private → public → private call chains for state manipulation opportunities
Proof circuit constraint gapsScanner checks Noir syntax, not constraint completenessVerify every private input is constrained; unconstrained inputs allow proof forgery
Client-side proof manipulation ignoredScanner only checks on-chain contractsAudit client-side proof generation logic for witness injection or tampering vectors

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
46
Repository forks
6
7-day trend score
19

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/0x-shashi/web3-audit-skills/aztec-scanner/badge)](https://verified-skill.com/skills/0x-shashi/web3-audit-skills/aztec-scanner)

Something wrong with this skill or its page? Tell us.