coral-xyz / sealevel-attacks

☠️ Common Security Exploits and Protections on Solana
498 stars 96 forks source link

Add Comments to Clarify Code Examples (Insecure, Recommended, Secure) #37

Open techvoyagerX opened 1 week ago

techvoyagerX commented 1 week ago

The current codebase includes examples of insecure, recommended, and secure code patterns for various Sealevel attacks. However, these examples lack comments that clearly identify which code sections are insecure, recommended, or secure. This issue proposes adding detailed comments to each program to help developers easily understand and differentiate between these patterns. This will enhance the educational value of the repository and prevent potential confusion.

techvoyagerX commented 1 week ago

I have created a PR that adds comments to the 0-signer-authorization program. The comments clearly identify the insecure, recommended, and secure code patterns in the examples. You can find the PR here: https://github.com/coral-xyz/sealevel-attacks/pull/38.