Why this matters
In agent.rs, register_transaction never calls require_auth on anyone, so any caller can create AgentTransaction records with attacker-chosen agent and parties. complete_transaction only compares the supplied agent to stored state but never calls agent.require_auth, so anyone can complete on the agent's behalf and bump completed_agreements. Combined with rate_agent (no rater != agent guard), one actor can manufacture transactions, complete them, and rate any verified agent at will.
Acceptance criteria
Files to touch
contracts/agent_registry/src/agent.rs
Out of scope
- Weighting reputation by transaction value
- Cross-contract verification against the rental contract
Why this matters
In agent.rs, register_transaction never calls require_auth on anyone, so any caller can create AgentTransaction records with attacker-chosen agent and parties. complete_transaction only compares the supplied agent to stored state but never calls agent.require_auth, so anyone can complete on the agent's behalf and bump completed_agreements. Combined with rate_agent (no rater != agent guard), one actor can manufacture transactions, complete them, and rate any verified agent at will.
Acceptance criteria
Files to touch
contracts/agent_registry/src/agent.rsOut of scope