Taskfeed treats the local developer environment, repository configuration, OpenCode agents and provider credentials as trusted. It treats GitHub issues, comments, linked PR text, attachments and repository content as untrusted input.
| Trusted | Untrusted |
|---|---|
.taskfeed.yaml in the canonical checkout |
Issue titles, bodies, comments, attachments |
| OpenCode agent definitions, models, permissions | PR descriptions and external review text |
| The installed plugin and Flowgraph workflow source | Files created/changed by an automated agent |
| Explicitly configured enqueue/approval GitHub accounts | A ready label by itself |
Configuration, agents and Flowgraph workflows are resolved from the canonical checkout. A worktree cannot silently alter scheduler permissions or trusted configuration for subsequent steps. Flowgraph workflow hashes at the worktree must match the canonical validated workflow.
Before a worktree location is activated, Taskfeed hashes project-controlled executable policy (opencode.json, opencode.jsonc and .opencode/**) and compares it with the canonical checkout. Effective agent and plugin snapshots are rechecked at execution boundaries. Only worktrees owned by persisted native-agent jobs receive canonical agent definitions through OpenCode's supported agent transform; workflow jobs leave agent resolution to Flowgraph and OpenCode. A changed definition, added agent/plugin, changed local plugin source or changed executable policy fails closed.
This is not an OS sandbox. It prevents Taskfeed from admitting a worktree whose policy already differs, but it cannot revoke plugin code loaded earlier in the process or enforce policy inside every Flowgraph node. Flowgraph's public API has no per-node policy admission hook; that remains an upstream requirement. See Known limitations.
A ready label is only a scheduling signal. Taskfeed reads the GitHub issue timeline and requires the latest active application of every configured ready label to have been made by an account in enqueue_users. Removing a label withdraws the active application; reapplying it by an unauthorized account invalidates the signal. The current issue labels and timeline are revalidated immediately before the durable job is created, not trusted from the discovery result. The resulting actor, label names, event IDs and timestamps are persisted as admission evidence.
After admission, Taskfeed consumes the ready label and reloads context without requiring it again. Authorization provenance survives restart and rework. Queued work is withdrawn if eligibility disappears; admitted work is blocked if the issue closes or context identity changes. Ordinary issue updates are not new execution authorization.
Only authorized_users can decide gates. Commands must match the current gate ID, revision, repository, issue, job and captured reviewed SHA. Stale, duplicate, malformed, pre-gate and edited/replayed decisions are rejected. Natural language is never an approval.
Commit-based review requires Taskfeed to fetch the current pull request from GitHub and verify:
- the PR still exists and is open and a draft;
- the gate's recorded
commitSHA, the current worktree HEAD and the current GitHub PR head SHA are identical; - the gate's recorded local and remote SHAs are identical.
The accepted decision records the exact reviewed PR head SHA. Immediately before forwarding an approval/continuation to an executor (or finalizing a native approval), Taskfeed re-fetches the PR and worktree state and repeats the comparison. Any difference invalidates the gate and blocks the job; a new review is required. Cached linked-PR data is not used for this check.
Content-based review instead publishes immutable text as a GitHub issue comment and binds approval to the gate, revision, run and exact content digest. The comment is re-read and hashed before acceptance and forwarding. No PR is required.
Approval comments require valid, exactly matching created_at and updated_at values. Any difference is treated as an edit. Missing, invalid, edited or ambiguous timestamps fail closed. A comment created before the gate and edited into a command is rejected. GitHub REST exposes second precision; an edit within the same second as creation cannot be distinguished from an unedited comment.
For decisions persisted while waiting for capacity, Taskfeed rechecks that the original comment still exists with the same author, body and timestamps, that the author remains authorized, and that the gate revision and artifact are still current before forwarding. The decision admission (deterministic request ID, start time and session/run identity) is persisted before the provider side effect. After a crash, restart recovery reconciles the execution instead of releasing capacity or replaying an ambiguous decision.
GitHub attributes comments to an account. If ChatGPT and the human share the same authenticated account, GitHub cannot distinguish them. The configuration delegates authority to that account explicitly.
- Publication is opt-in.
- Only Taskfeed-owned branches are pushed.
- Pushes never use force; non-fast-forward failures block publication.
- Taskfeed-created pull requests are always drafts.
draft_pull_request: falseis rejected by configuration validation. An existing PR is reused only when it is open, a draft and its head SHA matches the reviewed commit; otherwise publication blocks with an actionable error. - Before push, Taskfeed establishes the remote baseline, verifies fast-forward ancestry, enumerates all outgoing commits/newly reachable objects, and scans intermediate file versions, protected/generated paths, symlinks, submodules, sizes, file content and commit messages. Truncated or unsupported scanner output fails closed.
- The exact validated commit SHA is pushed. Symbolic
HEADis never pushed after validation. - An existing PR is checked for open/draft/branch/base state before the remote branch is modified.
- The internal scanner is a conservative denylist, not a replacement for a dedicated secret scanner. See Known limitations.
- Approvals never merge or deploy.
- Taskfeed does not auto-approve native permissions.
OpenCode's permission rules remain authoritative. Taskfeed adds session-scoped deny rules for external directories, .taskfeed.yaml and .taskfeed/**, but never replies to a permission prompt. A pending permission is a blocker and retains capacity until the user decides it.
Worktrees are not a sandbox. Shell tools have the host user's filesystem, process and network authority. Prompt instructions are not a security boundary. Prefer explicit OpenCode shell deny/ask policies for unattended execution.
Issue content is delimited and labeled untrusted, but prompt boundaries are not a security mechanism. The real controls are:
- no issue-controlled configuration;
- no automatic permission approval;
- canonical-only policy provenance;
- explicit enqueue/approval allowlists;
- isolated worktrees and session restrictions;
- no automatic merge/deploy.
- GitHub operations reuse the
ghCLI authentication. - Git operations reuse the user's existing Git credentials.
- Taskfeed does not read provider API keys or instantiate a separate model client.
- Logs redact common token formats.
- GitHub comments never include local environment variables or provider credentials.
- Config must be a regular, non-symlink file in the canonical checkout. The legacy fallback also requires a regular
.taskfeeddirectory and regular config file; symlinks are rejected. - Worktree paths are checked against OpenCode's worktree inventory.
- Cleanup refuses the canonical checkout, dirty worktrees, and branches not owned by Taskfeed.
- Publication validates the exact remote head SHA.
- External content never becomes a shell command string:
gh/gitcalls use argument arrays.
An unprovable admission or outcome is blocked, not replayed. Capacity is retained for ambiguous executions. This prioritizes avoiding duplicate side effects and secret/data loss over automatic progress.
Native prompt submission uses a deterministic msg_-prefixed message ID through OpenCode's supported session prompt id field. OpenCode rejects a conflicting durable message ID. Taskfeed treats that conflict as an already-accepted prompt only when the existing message metadata identifies the same job, attempt and prompt kind; otherwise it fails closed. Session recovery requires metadata for the exact job and attempt, at the exact worktree. There is no fallback that adopts the only available session. A session the provider reports as deleted is never treated as inactive automatically; the developer must use the explicit TUI orphan recovery action, which re-confirms the exact missing session, checks for any other discoverable execution for the same job and attempt, and records that the developer accepted the remaining uncertainty.
Job deletion and project reset reuse the same verification and capacity fences. Running executions are refused. A blocked or ambiguous job requires a separate administrative override after the exact job/attempt is checked for discoverable active execution. Deletion writes a tombstone before removing state so a crash is resumable and a ready label cannot silently recreate the job. Reset requires disabled automation and refuses any execution whose inactivity is unverified. Neither operation deletes Git branches, commits, worktrees, pull requests, native sessions, configuration or another project's Taskfeed state.
Flowgraph worker requests carry an expiry, scheduler generation, trusted-context snapshot and response ID. The worker claims one request with a local file lease. After trust verification it re-reads the request and cancellation tombstone, reads the live scheduler generation and verifies the actual scheduler lease file, checks its claim, and validates job/attempt/run identity plus the reserved capacity slot. A durable admission record distinguishes pre-admission cancellation from an already in-flight operation. Flowgraph's deterministic requestID remains the provider-level idempotency boundary after admission.
Scheduler leases and capacity slots are local files under XDG_RUNTIME_DIR (or the OS temp directory). Lock acquisition is atomic (mkdir), stale takeover and release are serialized by a short-lived breaker directory, and heartbeat uses an open file descriptor so a former owner cannot refresh a replacement lease. Every lock and capacity mutation checks its token and generation; capacity adoption increments the generation. These mechanisms prevent former-owner writes in the supported local boundary, but filesystem coordination is not a consensus protocol and a process paused beyond a stale/breaker window can still lose ownership.
Taskfeed verifies leadership immediately before dispatch, prompt submission, approval forwarding, workflow observation and publication. Losing ownership stops new side effects. This is single-machine coordination for one local OpenCode server/user; it is not cross-host consensus and does not claim exactly-once execution.
- Approval edit detection is limited by GitHub REST second precision. An edit in the same second as creation is indistinguishable from an unedited comment.
- Worktrees are not a sandbox. The agent runs with the host user's authority, and a malicious plugin loaded before Taskfeed cannot be revoked by later detection.
- Flowgraph nodes are executed by Flowgraph. Taskfeed verifies policy before location activation and at start/respond/observation boundaries, but the public Flowgraph API has no per-node policy admission hook.
- Flowgraph's current public
human_inputblocker does not expose typed content artifacts. Plan-only external review therefore remains blocked until the upstream contract is extended; Taskfeed does not infer artifacts from node names or prose. - The internal publication scanner covers common credential markers, private keys, certificates, protected/generated paths, symlinks, submodules and size limits. It does not replace gitleaks/trufflehog or a repository-specific policy.
- Package plugin integrity relies on the installed package version and plugin manifest; local plugin sources are content-hashed. A compromised package registry or already-running plugin code is outside this boundary.
- Taskfeed-managed concurrency cannot constrain a developer who starts or resumes work directly in OpenCode outside Taskfeed. Such sessions are reconciled conservatively from provider state; use Taskfeed controls for managed execution.
Do not include provider tokens, GitHub tokens, private issue bodies or local absolute paths in security reports. Redact logs before sharing.