Skip to content

docs(pda-rent-payer): add caller authority check security note (#671) - #760

Merged
dev-jodee merged 1 commit into
solana-foundation:mainfrom
khoap1220-hue:docs/pda-rent-payer-security-note-671
Nov 20, 2026
Merged

dev-jodee merged 1 commit into
solana-foundation:mainfrom
khoap1220-hue:docs/pda-rent-payer-security-note-671

Conversation

@khoap1220-hue

Copy link
Copy Markdown
Contributor

Linked issue: trivial
Refs #671

Summary

  • Add a clear SECURITY NOTE doc comment above create_new_account / process_create_new_account across all three basics/pda-rent-payer implementations (anchor, native, and pinocchio).
  • Clarify that the example intentionally omits a caller authority check for brevity, so anyone invoking the instruction could drain lamports from the rent_vault PDA unless production code verifies an authorized signer and compares its key against a stored admin/funder pubkey (in addition to the general account validation checks shown in basics/checking-accounts).

AI disclosure

  • No AI tooling was used
  • AI tooling was used
    Tool and extent: Assisted in drafting the security note comment wording across the Anchor, Native, and Pinocchio examples; manually reviewed and verified against the program source files.

…a-foundation#671)

Add a security note across the Anchor, Native, and Pinocchio create_new_account instructions clarifying that the example omits a caller authority check for brevity.
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The documentation change appears safe to merge.

Summary

Adds a security note above the Anchor create_new_account function.

  • The Anchor example warns that any caller can spend rent-vault lamports.

Reviews (2) · Last reviewed commit: "docs(pda-rent-payer): add caller authori..." · Reviewed by Greptile

@dev-jodee dev-jodee closed this Nov 20, 2026
@dev-jodee dev-jodee reopened this Nov 20, 2026
@dev-jodee
dev-jodee merged commit a9446bc into solana-foundation:main Nov 20, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants