Skip to content

Add security-focused access control tests#199

Merged
Mosas2000 merged 1 commit intomainfrom
fix/add-security-access-tests
Mar 26, 2026
Merged

Add security-focused access control tests#199
Mosas2000 merged 1 commit intomainfrom
fix/add-security-access-tests

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Summary

Adds 25 security-focused tests for the sprintfund-core contract.

Test Coverage

  • Access control: Execute-proposal permission scenarios
  • Vote manipulation: Override prevention, double-voting
  • Stake security: Zero stake, over-withdrawal prevention
  • Proposal security: Stake requirements, double execution prevention
  • Quadratic voting: Cost calculation validation
  • Fund transfers: Balance checks, error handling
  • Owner privileges: Validates owner has no special powers

Known Issues Documented

Tests explicitly document current behavior for:

Testing

npm test -- tests/security.test.ts  # 25 tests pass

Resolves #55

Add 25 security tests covering:
- Execute-proposal access control scenarios
- Vote manipulation prevention (override, double-voting)
- Stake manipulation prevention (zero stake, over-withdrawal)
- Proposal security (stake requirements, double execution)
- Quadratic voting cost validation
- Fund transfer security checks
- Contract owner privilege validation

Tests document known security issues #11, #12, and #13 with
explicit test cases for current behavior.

Resolves #55
@Mosas2000 Mosas2000 merged commit 1eb2d59 into main Mar 26, 2026
14 of 25 checks passed
@Mosas2000 Mosas2000 deleted the fix/add-security-access-tests branch March 26, 2026 16:18
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.

Testing: Add security-focused tests for access control

1 participant