Skip to content

treasury.rs state-changing functions have zero internal access control #204

Description

@N-thnI

Description

Add caller authentication to the treasury module itself, not just its entrypoint wiring.

Problem Statement

engine-core/src/treasury.rs: schedule_outflow() (lines 69-99), execute_outflow() (102-130), and record_snapshot() (141-194) take no caller/requester parameter and never call require_auth() or any admin/signer check. Sibling modules already gate themselves — emergency_recovery.rs::request/approve call require_admin + requester.require_auth(), and governance.rs::approve calls require_signer. This is distinct from issue #178 ("not wired into any entrypoint"): even after #178 is fixed by adding ControlPlane wrapper entrypoints, a contributor could wire these functions up without adding auth, since nothing in treasury.rs itself enforces it.

Proposed Changes

  • Add caller parameters and require_auth()/require_admin checks to schedule_outflow, execute_outflow, and record_snapshot, matching the pattern already used in emergency_recovery.rs and governance.rs
  • Add tests asserting unauthenticated/unauthorized calls are rejected

Technical Implementation Scaffolding

  • Target Repository: vero-core-engine
  • Target Path: engine-core/src/treasury.rs
  • Branch Naming: fix/issue--treasury-access-control
  • Authority Context: Security-sensitive — fund outflow authorization

Acceptance Criteria

Definition of Done

  • Reviewed by lead maintainer
  • Pull request merged via verified status check

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions