agent-taskbay
Security

Threat model

operators and security reviewers deciding whether Agent Taskbay's controls fit their deployment. You will have the assets, trust boundaries, threats, the control for each, and the residual risk.

> Who this is for: operators and security reviewers deciding whether Agent Taskbay's controls fit their deployment. You will have the assets, trust boundaries, threats, the control for each, and the residual risk.

Agent Taskbay is a server that holds credentials for your agents and sends work to them on behalf of signed-in people. That makes it a high-value target. This page lists what it protects, who it trusts, and where the protection stops. Version 1.0 is out of beta, but has not had an external security audit that we can point to. To report a problem, follow SECURITY.md.

Assets and trust boundaries

BoundaryWhat crosses itTrusted side
Browser to web server (Plane A)Human sessions, commands, organization dataThe server. The browser is never a source of truth and never holds agent credentials.
Web server to identity providerOIDC login (server-side, over TLS)The configured issuer. Only the exact issuer and subject map to a provisioned membership; email, provider role and tenant claims are not used.
Server to agent (Plane B)Agent Cards, tasks, webhooks, artifacts, credentialsNothing by default. Agents are remote, third-party systems.
Deployment inputsVault key ring, push signing key, origin allowlist, trusted card keys, operator CLITrusted. Anyone who controls these controls the system.

"Plane A" is how people authenticate to Taskbay; "Plane B" is how Taskbay authenticates to agents. They never share tokens. See identity and access.

Threats and controls

Each row names the control and where it is exercised. "Evidence" points at tests that exist in the repository.

ThreatControlEvidence and limits
An agent that needs an extension Taskbay cannot honor receives messages anywaySends are blocked while the card marks an unsupported extension required. An administrator can override per agent; the override and its removal are written to the security audit with the actor. Extension addresses are agent text and are shown only as text.required-extensions.db.test.ts, verify-task-http. The check uses the latest stored card, so a send before any card was recorded is not blocked.
Browsing an agent's tasks shows other people's work, because the agent's credential is sharedBrowsing and tracking need an administrator or a whole-agent operate grant; skill-scoped grants, viewers and people without a grant are refused. Browsing stores nothing and caches nothing. Tracking re-reads the task from the agent and stores only what the agent returns, after checking its identity, tenant and state; a tracked task is invisible to skill-scoped people. Both routes are rate limited per person and agent in the database, tracking is audited (task.discovery.tracked), and task discovery can be set to off per agent or for the deployment (A2A_TASK_DISCOVERY).discovery.db.test.ts, verify-task-http. A person with whole-agent access can see everything the agent's credential can list.
Automatic discovery copies everything the agent's credential can list into TaskbayIt is opt-in per agent and must be allowed by A2A_TASK_DISCOVERY=auto. It stores only what passes the same identity, tenant and state checks as a tracked task, only recent finished tasks (7 days by default), at most 500 then 200 per sweep and 5,000 per agent, then pauses itself with a visible reason and an audit entry. Found tasks have no owner or skill, so skill-scoped people never see them. A hostile list cannot raise any limit, and its failures are skipped, not fatal.auto-discovery.db.test.ts, discover-tasks.test.ts. As with browsing, a person with whole-agent access sees everything stored.
Cleanup of leftover push configurations deletes something that is not Taskbay'sIt deletes a configuration only if its ID is a registration ID Taskbay issued for that task or its URL is under Taskbay's own callback path, never by agent-supplied names or titles, only for finished tasks of enabled agents, at most 50 tasks per agent every 5 minutes, using the agent's normal connection rules. Only a count is audited (push.cleanup.<count>).isTaskbayPushConfig cases in push-lifecycle.test.ts, push-cleanup.db.test.ts (a foreign configuration and a second organization are left alone). An agent that registered a look-alike URL under Taskbay's own path on its own task would lose only its own callback.
Anonymous access, or the demo identity reaching productionEvery application API resolves a session. Production configuration fails closed. The development identity needs an explicit opt-in.npm run test:http (scripts/verify-identity-http.mjs) checks anonymous routes and rejects bad configuration. The development identity is trusted for local use only.
Forged token, login replay, login CSRFServer-side OIDC with issuer, audience, signature, expiry, nonce, state and PKCE checks. The login flow is encrypted, bound to the browser and single-use.verify-identity-http.mjs runs a real TLS issuer with signed tokens, including replay.
Session theft or a revoked membership still workingOpaque session tokens stored hashed. Cookies are __Host- prefixed, Secure, HttpOnly, SameSite=Lax. Membership, user and role are read on every request.identity.db.test.ts and the HTTP suite cover expiry, logout, restart, revocation and role change. A stream already open may finish; reconnecting rechecks.
A task reference reveals a task outside the reader's grantsReference resolution stays within the source's organization, agent and tenant. Relationship reads apply taskAccessFilter to the source and every linked task before returning IDs, titles or state; hidden relationships do not expose counts. Agent text never chooses a navigation URL.task-links.db.test.ts covers two organizations, skill grants, repeated remote IDs, malformed cross-organization links, rebuilds and disabled agents. related-tasks.test.tsx checks text escaping and local link targets.
Selecting related tasks bypasses operation grantsEach readable summary carries server-computed canOperate and cancelable; the dialog disables ineligible tasks. Every selected cancel is an ordinary idempotent command and rechecks organization, agent/skill grants and terminal state. The run summary stores only bounded browser-reported counts, scoped to a readable source task, once per run; it cannot execute work or prove execution.task-links.db.test.ts, cancel-tasks-dialog.test.tsx, verify-steering-http.mjs. Revoked grants can cause individual requests to fail after the dialog opens.
A tenant choice sends work to another advertised interfaceThe gateway selects an interface matching the tenant within connection pins before dispatch. New work stores the effective default tenant; alias discovery cursors do not create duplicate task identities.gateway-tenant.test.ts, commands.db.test.ts, verify-discovery-http.mjs cover distinct URLs and default-tenant aliasing. Existing records are retained.
Restarting an instruction exposes private artifact URLs or loses file inputsBefore cancellation, the browser restores bytes using the existing authenticated artifact download route and its current task grants. External URLs remain references; restored input is bounded by the command body limit. Missing or unauthorized files stop the restart before cancellation.restart-task.test.ts, verify-steering-http.mjs, and existing artifact-access HTTP tests. No new artifact endpoint or credentials are exposed.
Cross-tenant data bleedThe organization comes from the local membership, carried per request in async-local storage, not from request input.scoped-security.db.test.ts: foreign tasks, commands, content and artifacts are denied.
Cross-site command submissionExact Origin match and Sec-Fetch-Site rejection on state-changing requests. Reads do not submit commands.Wrong or missing Origin is rejected in the production HTTP run. In development, loopback aliases on the same port are accepted.
An administrator account is misused to add people, raise roles or lock the organization outAdding, changing and deactivating people are administrator-only API actions (provisionMember, changeRole, deactivateMember, reactivateMember). Adding uses the configured OIDC issuer and an exact subject, never a browser-supplied issuer. An administrator cannot change or deactivate their own membership, so one always remains. Deactivation deletes the person's sessions at once. Every change is audited with the actor (member.*).people.db.test.ts covers the self-change guard, session removal, cross-organization refusal and audit. Local development mode refuses provisionMember. An administrator can still promote another person to administrator by design.
Two processes open the same embedded database and corrupt itPGlite has no lock of its own. Taskbay takes a <folder>.lock file for as long as a database is open and refuses a second live process; a lock from a dead process is taken over. A damaged folder fails the open with an actionable error and is never deleted or moved automatically.pglite-guard.db.test.ts. A reused process number can show a false refusal; the message says to delete the lock file. PostgreSQL is not affected.
Access without a grant; role escalationExplicit grants to a member, team or the organization, for a whole agent or one skill. Viewers cannot operate even with an "operate" grant. Task queries are filtered in SQL before pagination.Grant, disabled-team and revoke tests in scoped-security.db.test.ts. A provider "admin" claim cannot raise a viewer. Administrators have full organization access by design.
A skill grant used to do unrestricted workSkill-only sends need the agent to advertise and enforce the skill routing extension. The server picks the skill, starts a new context and checks follow-ups.Generic, private-context and hidden-reference sends are denied in tests. A grant does not constrain an agent that ignores the extension. Enable it only for agents you have reviewed.
Credential theft from the database; substitution; use after revokeCredentials are encrypted (JWE) with the organization and agent bound into the payload and are valid only for their configured origins. Key rotation is supported. Missing keys, tampering and revoked bindings fail closed.scoped-security.db.test.ts on both database profiles: tampering, cross-organization resolve, rotation, revoke. Protecting the key ring on the host is an operator duty.
Credential leakage through logs, errors, echoes or archivesCredentials are provisioned and resolved server-side only. Known credential values are redacted in strings, object keys, binary bytes and sideband data. Errors from protected operations are generic.Real TLS fixtures echo credentials back; scripts/verify-service-security.mjs asserts they do not reach the browser, logs, storage or audit. Redaction is by known literal: a hostile agent that transforms or splits a secret defeats it. Restrict who runs agent infrastructure and rotate anything suspected.
SSRF, redirects, DNS rebindingProduction requires exact HTTPS origins. The connecting socket resolves and validates every address it uses; mapped IPv4-in-IPv6 is handled. Redirects and ambient proxies are refused. Private networks are an explicit opt-in; metadata and link-local ranges stay blocked.A real-socket rebinding test and TLS redirect and origin checks. gRPC is refused because the SDK does not expose a connection-bound resolver.
Oversized or malicious artifacts; remote content in the browserDownloads use server-authored references and current task grants, Content-Disposition: attachment, nosniff, no-store and a sandbox policy. Markdown images are suppressed. Remote media is not fetched by the browser.Forged URLs are denied; response bodies and streams are capped at 25 MiB and stored objects at 16 MiB (src/lib/safe-fetch.ts, filesystem-artifact-store.ts). There is no remote media proxy and no executable preview.
HTML injection or preview escaping into the consoleHTML is opt-in. DOMPurify allowlists inert tags and attributes; inline previews strip CSS and URLs. Rich previews retain CSS only in an iframe with an empty sandbox, no referrer, and a first-in-head CSP denying scripts, network resources, frames, objects, base URLs and form submissions. Navigation URLs and active elements are removed.html-preview.test.ts checks malicious markup and CSP; content-viewer.test.tsx checks explicit selection, modal sandbox and source immutability. These are DOM unit tests, not cross-browser security verification. Rich CSS may still create misleading content inside the preview; it is not trusted application UI.
An extended card changes routing, grants, or reveals private skillsOnly administrators fetch, using the existing bound credential and hardened fetch. Extended responses are capped at 2 MiB before SDK parsing, checked for safe URLs and verified against pinned signing keys. Snapshots have a separate kind; public-card readers exclude extended cards. Browser reads expose only skill descriptions and capability booleans, and require whole-agent read access.extended-card-gateway.test.ts, extended-card.db.test.ts, verify-extended-card-http.mjs, and non-admin refusals in verify-identity-http.mjs. A service credential may expose skills unavailable to an individual; skill-only readers never receive them.
Forged Agent Card trustCards are verified with SDK canonicalization and JWS against pinned {origin, kid, public JWK, alg, expiry} entries. Remote key URLs are never fetched. A signed card that fails verification cannot execute.Valid, tampered and unknown-key cases are tested. Unsigned cards can still be registered by an administrator unless A2A_REQUIRE_SIGNED_CARDS=true. Trust never grants user access.
Webhook spoofing, replay, floodPer-registration authentication, task, agent and tenant validation, duplicate-safe ingestion, and durable per-registration and global budgets.Push and reconciliation scenarios in push.db.test.ts and verify-task-http.mjs.
Login and API floodsDurable fixed-window budgets per minute: 900 reads, 120 operations and 60 administrative calls per membership; 240 login/callback, 1200 webhook and 30 extended-card refresh calls globally. Over budget returns 429.Limits are in src/server/runtime/identity.ts and security.ts. Put a perimeter limiter in front for real capacity planning.
Inconsistent audit, double execution on retryAudit facts and the command's intent are written in one transaction, with a unique command key.Rollback and idempotency tests in audit.db.test.ts and commands.db.test.ts.

Residual risk and what is not claimed

  • Accepted work outlives access changes. Work already admitted continues under a system identity after a person logs out or a grant is revoked. Credential revocation takes effect when the next connection resolves the credential.
  • User-delegated OAuth is not implemented (#1). Agent authentication uses service credentials (API key, bearer, OAuth client credentials, mTLS). Plane A tokens are never reused toward agents.
  • No external key management. The vault key ring is read from environment variables. KMS and external-secret adapters are planned, not built.
  • No gRPC, no remote-media proxy and no executable preview.
  • Skill grants are a Taskbay-side control. They do not limit what a non-cooperating agent does internally.
  • Local mode is not a boundary. The launcher signs everyone in as a development administrator and binds to loopback.
  • Audit retention. The audit trail is append-only; there is no built-in retention, export or tamper-evidence feature.
  • Not independently audited. Treat the controls above as design intent backed by the listed tests.

Changes to authentication, credentials, outbound requests, webhooks or artifact handling should update this page and add a regression test.

Release dependency review

Version 1.0.0 updates Next.js to 16.4.4, Undici to 8.12.3 and MikroORM to 7.2.5, with compatible patches for Zod, gRPC and transitive dependencies. The shadcn generator is needed only to build the stylesheet and is a development dependency. Run npm audit --omit=dev against the release lockfile to check installed runtime dependencies; review the full audit separately for development tooling. At release preparation, the production audit reports zero findings. The full audit still reports low and moderate findings in development tooling (including the generator, linter and test tooling); there are no high or critical findings. These are not part of the published runtime dependency tree. An audit does not establish whether an advisory is reachable in a particular deployment.

Created and maintained by Shashi Kanth G S at allsrc.dev. Visit shashikanth.me.

On this page