coral-xyz / sealevel-attacks

☠️ Common Security Exploits and Protections on Solana
507 stars 95 forks source link

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

Open techvoyagerX opened 2 months ago

techvoyagerX commented 2 months 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 2 months 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.

techvoyagerX commented 1 month ago

I've added detailed comments to all programs and submitted pull requests. These comments clearly highlight insecure, recommended, and secure code patterns within the examples, contributing to the educational value of this repository.

Best!