bench: API auth / middleware / git route#3
Conversation
AntFleet · 2 findingsBoth reviewers flagged the items below on the changed files. AntFleet posts only what two independent frontier models agree on. Security · High — v1 role guards trust the role header without authenticating the agent token
Fix: Make _require_roles accept CurrentAgentContext/get_agent_context instead of the raw role header, then compare the authenticated context role to the allowed roles. Keep the HMAC token requirement and DB identity/role resolution centralized in roboco.api.deps. Proposed patch (model: claude-opus-4-7)Security · Medium — request_validation_handler echoes raw rejected body to logs, may include secrets
Fix: Redact known sensitive keys before logging; or log only field names and types, not values. Proposed patch (model: claude-opus-4-7)— Review |
Manual file pick from rennf93/roboco — FastAPI app, middleware, role-based deps, KB authz, git operations route (6 files, ~74KB).
Two-model security review (Claude Opus 4.7 + GPT-5).
Methodology: https://github.com/AntFleet/bench-roboco