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
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
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), andrecord_snapshot()(141-194) take nocaller/requesterparameter and never callrequire_auth()or any admin/signer check. Sibling modules already gate themselves —emergency_recovery.rs::request/approvecallrequire_admin+requester.require_auth(), andgovernance.rs::approvecallsrequire_signer. This is distinct from issue #178 ("not wired into any entrypoint"): even after #178 is fixed by addingControlPlanewrapper entrypoints, a contributor could wire these functions up without adding auth, since nothing intreasury.rsitself enforces it.Proposed Changes
require_auth()/require_adminchecks toschedule_outflow,execute_outflow, andrecord_snapshot, matching the pattern already used inemergency_recovery.rsandgovernance.rsTechnical Implementation Scaffolding
Acceptance Criteria
Definition of Done