Rules › Anchor (Rust)

Authority account that isn't a Signer

highAnchor (Rust)Rule anchor-missing-signer

An authority, admin or owner account that isn't Signer<'info> (or signer constrained) lets anyone pass someone else's key.

Why it matters

Solana instructions receive accounts as a list chosen by the caller. If an authority account isn't required to sign, anyone can pass the real authority's public key and act as them. Authorities must be Signer<'info> (or carry a signer constraint) and be tied to the state they control with has_one or a constraint.

Vulnerable

#[derive(Accounts)]
pub struct Withdraw<'info> {
    #[account(mut)]
    pub vault: Account<'info, Vault>,
    pub authority: AccountInfo<'info>,
}

Fixed

#[derive(Accounts)]
pub struct Withdraw<'info> {
    #[account(mut, has_one = authority)]
    pub vault: Account<'info, Vault>,
    pub authority: Signer<'info>,
}

What other tools call it

ToolDetector or reference
Sealevel attacks0-signer-authorization

Check your code

Paste a contract into the in-browser checker, or let the Claude Code plugin scan before every deploy. The quick check for this rule is a pattern match: treat a hit as "look here", and a miss as no guarantee.

Static analysis finds known bug classes; it can't prove code is safe and isn't an audit. Get a professional audit before deploying code that will hold value.