You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SEC: POST /api/agents/deploy-local bypasses creator role check — any authenticated user can spawn agents (AISEC-H1) #592
POST /api/agents/deploy-local does not enforce the creator role gate that POST /api/agents enforces. Any authenticated user (including the lowest-privilege user role) can spawn an agent container with an arbitrary image, consuming platform container budget without passing the role-permission check.
Context
AISEC (scan 3aad5469, 2026-04-28) demonstrated this as part of CVSS 8.8 finding (CWE-863 — Incorrect Authorization):
POST /api/agents/deploy-local → 200 (agent created, owned by calling user)
The same authorisation gap exists at POST /api/agents on the live deployment — the check gates on a process:create permission string that the process_viewer role lacks, but the route itself is not gated behind require_role("creator") in the open-source code path.
In open-source Trinity, POST /api/agents correctly requires the creator role via Depends(require_role("creator")). The deploy-local endpoint may be missing this dependency.
CVSS 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
Acceptance Criteria
POST /api/agents/deploy-local requires Depends(require_role("creator")) — same dependency as POST /api/agents
Audit all agent-creation routes (/api/agents, /api/agents/deploy-local, any template-deploy endpoints) to confirm each has an identical role check applied via a shared dependency — not ad-hoc inline checks
Per-account agent quota enforced: a single user-role account cannot consume the platform's entire container budget regardless of role
Regression test: assert that a user-role token receives 403 on POST /api/agents/deploy-local
Technical Notes
routers/agents.py — look for the deploy-local route handler; compare its Depends() chain against the main POST /api/agents handler
If a per-account agent count quota already exists (see agent_ownership.max_parallel_tasks), verify it is also enforced at creation time, not just at runtime
Activity
dolho commentedon May 1, 2026
/claim
github-actions commentedon May 1, 2026
Claimed by @dolho. Label
status-in-progressadded.Next steps:
feature/592-<short-slug>Fixes #592fix(security): require creator role on /api/systems/deploy (#592)
fix(security): require creator role on /api/systems/deploy (#592) (#624)
Release: v0.6.0 (#998)
vybe commentedon Jun 1, 2026
Shipped in v0.6.0 (released via #998).
docs(releases): v0.6.0 release notes archive (#1016)