You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🔴 Priority: Critical Difficulty: Hard Estimated Effort: 2-3 days Relevant Files:contracts/src/lib.rs Labels:security, priority:critical, auth
Requirements
Explicit Auth Verification
The current contract uses admin.require_auth(); for sensitive actions. While Soroban's auth framework handles the signature verification, it's best practice to explicitly verify that the auth covers the exact arguments passed to the function to prevent replay or argument spoofing if the contract is used as a sub-call.
Refactor Write Operations
For add_member: ensure the auth signature specifically covers (env.current_contract_address(), Symbol::new(&env, "add_member"), (new_member,)).
For payout: ensure auth covers the recipient argument.
For reset_cycle: ensure auth covers the cycle reset action.
🔴 Priority: Critical
Difficulty: Hard
Estimated Effort: 2-3 days
Relevant Files:
contracts/src/lib.rsLabels:
security,priority:critical,authRequirements
Explicit Auth Verification
admin.require_auth();for sensitive actions. While Soroban's auth framework handles the signature verification, it's best practice to explicitly verify that the auth covers the exact arguments passed to the function to prevent replay or argument spoofing if the contract is used as a sub-call.Refactor Write Operations
add_member: ensure the auth signature specifically covers(env.current_contract_address(), Symbol::new(&env, "add_member"), (new_member,)).payout: ensure auth covers therecipientargument.reset_cycle: ensure auth covers the cycle reset action.remove_member(from Issue [Deployment] Create Scripts for Testnet Deployment #2): ensure auth covers the specific member being removed.Multi-Sig Preparation
env.authorize_as_curr_contract()where applicable if the contract needs to perform cross-contract calls on behalf of the admin.Testing
env.mock_auths()in tests to strictly define the expected authorization payload.payout(recipient_A)with an authorization signature meant forpayout(recipient_B)fails.