Repository navigation
docs(adr): assess vulnerabilities with a read-only agent before the code agent #9309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
81c7090
36b9957
f760783
387f36a
21c6017
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,243 @@ | ||
| --- | ||
| title: "169. Assess vulnerabilities with a read-only agent before the code agent" | ||
| status: Accepted | ||
| relates_to: | ||
| - agent-architecture | ||
| - security-threat-model | ||
| topics: | ||
| - agents | ||
| - vulnerability-management | ||
| - coordination | ||
| --- | ||
|
|
||
| # 169. Assess vulnerabilities with a read-only agent before the code agent | ||
|
|
||
| Date: 2026-11-11 | ||
|
|
||
| ## Status | ||
|
|
||
| Accepted | ||
|
|
||
| <!-- ADRs are point-in-time records, but not fully frozen after acceptance. | ||
| Minor annotations are welcome: cross-references to related ADRs, short | ||
| notes linking to newer decisions, or clarifying remarks. However, do not | ||
| substantially rewrite the Context, Decision, or Consequences sections. If | ||
| the decision itself needs to change, write a new ADR that supersedes this | ||
| one. For evolving design narrative, use docs/architecture.md. --> | ||
|
|
||
| ## Context | ||
|
|
||
| Teams want fullsend to handle vulnerability work: a CVE arrives as a tracker, | ||
| an alert or an issue, someone decides whether it affects a repository, and if | ||
| it does, someone fixes it. Many findings need no code change, because the | ||
| component is absent, the fix is already carried or the vulnerable code cannot | ||
| be reached. The result is then a justified "not affected" on the tracker, not | ||
| a pull request. No built-in agent produces that result: triage labels and | ||
| routes an issue, and code writes a change. | ||
|
|
||
| The [CVE workflow experiment](https://github.com/fullsend-playground/cve-workflow-experiment) | ||
| showed the flow can work. It composes the triage harness with its own agent, | ||
| result schema and scripts, registers that under the `triage` name, and keeps | ||
| a controller in the repository. A second repository would have to copy that | ||
| code, and a repository that adopts it no longer has regular triage. Dispatch | ||
| to several targets and recovery for this work are being decided separately | ||
| ([#9266](https://github.com/fullsend-ai/fullsend/pull/9266), | ||
| [#9264](https://github.com/fullsend-ai/fullsend/pull/9264)). Selecting Pi | ||
| extension tools is proposed in | ||
| [#9265](https://github.com/fullsend-ai/fullsend/pull/9265). | ||
|
|
||
| Each step gets its own agent, harness and sandbox | ||
| ([ADR 0020](0020-composable-single-responsibility-agents-with-individual-sandboxes.md)), | ||
| any harness may name any existing role | ||
| ([ADR 0124](0124-criteria-for-adding-a-built-in-agent-role.md)), and runs are | ||
| serialized per harness and work item | ||
| ([ADR 0106](0106-serialize-agent-runs-and-coalesce-subsequent-events.md)). | ||
| This ADR aims to give any repository a trustworthy verdict on one public | ||
| vulnerability for one branch, and a fix where one is needed, without | ||
| orchestration code of its own. | ||
|
|
||
| ## Options | ||
|
|
||
| ### Where assessment runs | ||
|
|
||
| - **A skill on the code agent.** The smallest change. The code agent's output | ||
| is a pull request and its role can write code, so every assessment, | ||
| including the many that end in "not affected", would run with write access | ||
| and have nowhere to put its answer. | ||
| - **The triage agent, extended or composed.** Triage has the right role. | ||
| Extending it adds a verdict to a result every adopter shares, on a time | ||
| budget sized for labelling an issue. Composing over it, as the experiment | ||
| does, replaces regular triage for the repository. | ||
| - **A Pi extension that holds the whole workflow.** It works on one runtime, | ||
| which the adopter chooses per agent | ||
| ([ADR 0091](0091-per-agent-runtime-model-effort.md)), and the checks that | ||
| gate publishing and coding would run inside the sandbox. This option is | ||
| about where the workflow lives. An extension that collects evidence as a | ||
| tool inside a run is allowed (item 8). | ||
| - **A read-only assessment agent, then the code agent.** Chosen. | ||
|
|
||
| ### How a work item reaches the agent | ||
|
|
||
| - **Triage first.** Triage runs on the work item, recognises a | ||
| vulnerability and adds the label that starts the `cve` agent. This works | ||
| on any tracker and catches a vulnerability reported as an ordinary bug. | ||
| But triage reads the whole work item into a model before any check that | ||
| the finding is public, every tracker costs a triage run before its | ||
| assessment, and triage's outcomes do not fit a tracker | ||
| ([agents#1967](https://github.com/fullsend-ai/agents/issues/1967)). | ||
| - **A label or a command from a person.** This works on every forge and | ||
| keeps a person on the choice to assess. Triage has usually run by the | ||
| time anyone adds the label. | ||
| - **The issue type.** A work item whose type marks it as a vulnerability | ||
| skips triage and starts the `cve` agent, so no model reads it before the | ||
| host checks. Today only Jira events carry an issue type, a type's id and | ||
| name belong to the Jira site, and changing only the type of an open work | ||
| item raises no event. Chosen where the tracker has such a type, with the | ||
| label and the command for everything else. | ||
|
|
||
| ## Decision | ||
|
|
||
| We add a first-party `cve` agent that assesses one public vulnerability | ||
| against one branch and changes nothing, and we hand any fix to the existing | ||
| code agent, so that assessment needs no write access to code and a fix | ||
| always follows a verdict. | ||
|
|
||
| 1. **Role.** The agent uses the existing `triage` role with a read-only | ||
| checkout. It adds no role and no scope, so ADR 0124 is not engaged. It | ||
| lives in `fullsend-ai/agents`, a repository registers it with an | ||
| `agents:` entry ([ADR 0058](0058-agent-registration.md)), and its harness | ||
| trigger dispatches it ([ADR 0061](0061-harness-cel-dispatch.md)). | ||
| 2. **Start.** Where events carry an issue type, a work item of a | ||
| vulnerability type starts the agent when it is opened, and triage does | ||
| not start on it. The `cve` and triage triggers match the type by its | ||
| id, because a site can rename a type and the id stays the same. The ids | ||
| belong to the tracker's site, so an adopter sets them by changing those | ||
| triggers on its `agents:` entries | ||
| ([ADR 0162](0162-agent-entries-may-carry-harness-overrides.md)). | ||
| Everywhere else, and for a work item that is already open, the agent | ||
| starts on a `/fs-cve-triage` comment from a person or when the | ||
| `fullsend-cve` label is added, and triage does not start on a work item | ||
| with that label. Whether a work item of a vulnerability type should | ||
| instead wait for a person's comment before its first assessment, so that | ||
| nothing is assessed by default, is not decided here. | ||
| 3. **Verdict.** The result is affected, not affected, fixed or under | ||
| investigation, in the terms of CSAF VEX, and each piece of evidence says | ||
| whether a tool observed it or the model judged it. Host scripts publish | ||
| each run's verdict as a new comment on the work item and do not edit an | ||
| earlier one | ||
| ([#9334](https://github.com/fullsend-ai/fullsend/issues/9334)). It is a | ||
| proposal for a person to review; fullsend does not publish VEX. A run | ||
| that cannot gather its evidence, for example because the sandbox lacks | ||
| the toolchain the branch declares, says so and gives no verdict. | ||
| 4. **Handoff.** An affected verdict records on the work item the | ||
| vulnerability, the branch, the commit and the files its plan may change. | ||
| Host scripts write that record, and a later assessment replaces it. | ||
| Where the tracker can hold structured data on a work item, the record is | ||
| kept there and not in comment text. Where it can only be a comment, the | ||
| host check accepts only a comment written by fullsend's own identity, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] auth-bypass Comment-based handoffs authenticate fullsend's identity, but the ADR does not say how the host tells an assessment authorization record from other comments by that identity. Record purpose, run provenance, work-item binding, and integrity of the vulnerability, branch, commit, and file list are not checked. Suggested fix: Specify a dedicated host-verifiable record format and bind accepted records to the assessment run and work item rather than relying on bot authorship alone. |
||
| because authorizing the actor who starts a run does not authorize other | ||
| content on the work item | ||
| ([Authorization Contract v2](../normative/authorization/v2/README.md)). | ||
| The code agent works on a vulnerability only while that record is current. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] auth-bypass The Handoff decision (item 4) makes the affected-verdict record on the work item the thing that gates and limits the code agent's changes, but the ADR does not say how the host tells the real record from a lookalike. Item 3 implies a canonical host-published comment, yet the code-agent and fix-agent host checks are not required to accept only that host-authored record. A person's /fs-code comment authorises going ahead; it does not vouch for the record the change will use. This is a design-level gap, not an exploitable flaw today, since nothing is implemented yet. Suggested fix: Optionally add a sentence to the Handoff item saying the code and fix host checks accept only the record published by the assessment host scripts, bound to the work item, and reject records that are missing, ambiguous, or written by anyone else; otherwise track it in the implementation follow-up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] auth-bypass The proposed handoff checks record freshness, the assessed branch and commit, and the permitted files, but does not specify how the host authenticates the assessment record stored on the work item. A user-authored comment or edited record could imitate an affected verdict or broaden its file list, and a person's later /fs-code does not authenticate the record. This is a design gap in a documentation-only PR, not an implemented bypass. Suggested fix: Require host-side verification of the record's provenance and integrity, binding vulnerability, repository, branch, commit and permitted files to a successful assessment run; reject user-authored imitations. |
||
| It opens its change against the assessed branch | ||
| ([ADR 0053](0053-agent-driven-branch-targeting.md)), and a host check | ||
| rejects a change outside those files. On a vulnerability work item the | ||
| code agent starts only on a person's `/fs-code` comment; the | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] auth-bypass The /fs-code-only gate applies 'on a vulnerability work item', identified by mutable issue type or label. Behavior after the fullsend-cve label is removed or the issue type changes is not specified; an implementation that reevaluates only the current classification could route an assessed item through ordinary coding. Suggested fix: Require the assessment and file-scope gates whenever an item has entered the vulnerability workflow, independent of later label or issue-type changes. |
||
| `ready-to-code` label does not start it there. The fix agent is held to | ||
| the same record and the same files, and a change that needs other files | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] auth-bypass Decision 4 holds the fix agent to the same record and files, but Consequences still says the enforcing check is built for the code agent only, so the fix agent is not yet bound in practice. The ADR names the gap; advisory. |
||
| needs a new assessment. | ||
| 5. **One target per run.** Host scripts resolve one repository and branch | ||
| for the work item. They use structured data on the work item (the | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] auth-bypass The target resolver can use an intake record set on the work item, but the ADR leaves undecided who may write it and how its target-selecting fields are authorized; someone able to supply or edit intake data could redirect an assessment to a different mapped target. Unresolved prerequisite, not a demonstrated runtime vulnerability. Suggested fix: Specify which verified actors may create or modify intake records, require host-side authorization of every target-selecting field, and invalidate assessments when an authorized intake change affects their target. |
||
| vulnerability, product, release and component), which is either the | ||
| tracker's own fields or an intake record set on the work item, and a | ||
| release mapping the adopter keeps in its repository, not the work item's | ||
| free text. When that data is missing or ambiguous, or the release has no | ||
| mapping, the run stops with a reason; it does not choose a repository | ||
| and does not report not affected. Who writes an intake record, where one | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] auth-bypass Authority to write the intake record is left undecided although its fields select the target repository and branch. A valid release mapping establishes a destination, not permission to start work against it. Suggested fix: Define trusted intake writers and require target-specific authorization before assessment or coding. |
||
| is used, is not decided here. Several maintained branches are several | ||
| work items. How those are created is not decided here; #9266 proposes | ||
| one. | ||
| 6. **Scope.** Embargoed vulnerabilities are out of scope. Host scripts stop | ||
| a run that cannot show its finding is public, before a sandbox exists. | ||
| A work item that carries a tracker security level counts as not public | ||
| unless the adopter lists that level as readable. Whether a private | ||
| tracker's text may be used for a public repository is also not decided | ||
| here (see | ||
| [private context in public agent workflows](../problems/private-context-public-workflows.md)); | ||
| until it is, the agent by default does not read that text in that case. | ||
| When the tracker is private and the repository is public, the change | ||
| the code agent proposes, its commits included, carries only public facts: | ||
| the vulnerability's identifier, its public advisory and the assessed | ||
| commit. It carries no link to the work item and no text from it. | ||
| 7. **Adopter facts.** The release mapping with its maintained branches, | ||
| vendor VEX sources, readable tracker security levels and label | ||
| conventions live in files in the adopter's repository. A harness setting | ||
| names those files | ||
| ([ADR 0162](0162-agent-entries-may-carry-harness-overrides.md)). They are | ||
| not new `config.yaml` fields. | ||
| 8. **Tools.** Tools the agent calls during a run, MCP servers included, | ||
| execute inside its sandbox, under its network policy and an allow-list | ||
| of tools. The sandbox is given no credential that can change code, and | ||
| publishing stays in host scripts. A tool that collects evidence, a | ||
| runtime extension included, is such a tool. It covers the ecosystems it | ||
| was written for and may work on one runtime only, so a run it does not | ||
| cover gathers its evidence without it or ends without a verdict (item | ||
| 3). A tool server that has to run outside the sandbox with its own | ||
| access to the checkout is a platform decision this ADR does not make. | ||
|
|
||
| ## Forge scope | ||
|
|
||
| - **GitHub:** issues are the work item, including one opened from a | ||
| Dependabot alert. An alert that has no work item is not in this ADR's | ||
| scope: reading alerts, assessing one before a work item exists and | ||
| opening the work item are not decided here. | ||
| - **GitLab:** covered as the repository, with Jira as the tracker. GitLab | ||
| issues as the work item are not covered yet, because no adopter files | ||
| vulnerability trackers there; the agent skips them with a reason. | ||
| - **Jira:** Cloud trackers reach the agent through the Jira poller | ||
| ([ADR 0063](0063-polling-based-work-discovery.md)). Its events are the | ||
| only ones that carry an issue type today. | ||
| - **Agent job on one forge, repository on another:** not covered. A GitLab | ||
| job has assessed a GitHub repository, and the code agent then changed it, | ||
| but only with adopter-side scripts and a credential kept as a CI/CD | ||
| variable ([#9577](https://github.com/fullsend-ai/fullsend/issues/9577), | ||
| [#402](https://github.com/fullsend-ai/fullsend/issues/402)). A pull | ||
| request opened that way raises no event where the job ran, so it is | ||
| reviewed only if fullsend is also installed on the repository. | ||
| - **Forgejo:** fullsend has no Forgejo support yet; nothing to change. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - A repository gets vulnerability assessment by registering one agent, and a | ||
| justified "not affected" needs no write access to code. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [medium] logic-error The Consequences section says the triage and code harnesses each gain a condition so a vulnerability work item reaches a verdict first, but harness conditions alone cannot enforce Decision 4's manual-only code start on GitHub. Suggested fix: Record the required GitHub dispatch/workflow change or CEL-routing migration as an implementation prerequisite alongside the harness conditions, and state that the vulnerability exclusion must also cover the workflow-routed |
||
| - The triage and code harnesses each gain a condition, so a vulnerability | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [medium] logic-error Consequences says the triage and code harnesses each gain a condition so a vulnerability work item reaches a verdict first, but harness conditions alone cannot enforce Decision 4 manual-only code start on GitHub: a harness trigger never opts an agent into CEL routing, code is absent from the routableAgents table in internal/cli/dispatch_route.go, and reusable-dispatch.yml still starts the code stage on the ready-to-code label. The label-triggered code path would stay active on vulnerability work items. Suggested fix: Record the required GitHub dispatch/workflow change or CEL-routing migration as an implementation prerequisite alongside the harness conditions, and state that the vulnerability exclusion must also cover the workflow-routed ready-to-code path. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [medium] logic-error Adding conditions to the triage and code harnesses is insufficient to enforce the proposed routing exclusions. ADR 0162 says code-agent trigger overrides route nothing and triage retains workflow routing as fallback; the existing workflow independently starts triage on issue open/edit and code on ready-to-code. The harness-only conditions therefore cannot guarantee that vulnerability work waits for assessment or that ready-to-code does not start coding. Suggested fix: Make enforcement on every dispatch path an explicit prerequisite: either migrate these agents to authoritative CEL routing without workflow fallback, or add equivalent vulnerability exclusions to the legacy dispatch paths before enabling this workflow. |
||
| work item reaches a verdict before either acts on it. | ||
| - A vulnerability reported as an ordinary issue, with no vulnerability type | ||
| and no label, still goes to triage. Having triage hand it to the `cve` | ||
| agent is not decided here. | ||
| - A fix takes two runs with a person between them by default, which is slower | ||
| than one run and keeps a person on the verdict. | ||
| - The check that holds a change to the verdict's plan is built for the code | ||
| agent only. The fix agent, which acts on review findings, needs the same | ||
| check before it is enabled on these changes. When the change is on | ||
| another forge than the work item, the fix agent's run also needs a way | ||
| to read the record. | ||
| - The adopter keeps the release mapping. Where the tracker's own fields do | ||
| not carry the vulnerability, release and component, something has to | ||
| write the intake record. Opening one work item per maintained branch | ||
| also stays with the adopter until a later decision. | ||
| - Nothing checks yet that a change proposed on a public repository carries | ||
| only public facts. That host check is needed before the code agent works | ||
| from a private tracker on a public repository. | ||
| - Where a site puts a security level on every vulnerability tracker, the | ||
| agent does not run until the adopter lists a level as readable. | ||
| - One vulnerability can have many trackers, and several can map to the same | ||
| branch and commit. Each is assessed on its own. Reusing a verdict for the | ||
| same vulnerability, repository, branch and commit is left to a later | ||
| decision. | ||
| - An assessment needs the toolchain its branch declares, and the maintained | ||
| branches of one repository can declare different versions. The agent | ||
| image carries one version of each toolchain, so a run on a branch that | ||
| needs another can end without a verdict. | ||
| [#9395](https://github.com/fullsend-ai/fullsend/pull/9395) proposes | ||
| composing images into a sandbox. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[low] auth-bypass
The structured-data handoff names where the authorization record is stored but not how its integrity is verified. Comment records get an author check; equivalent protection against other tracker users editing the structured vulnerability, branch, commit, or allowed-file fields is not specified. Design gap, not a demonstrated bypass.
Suggested fix: Require host-only write access or independently verified integrity for structured handoff records, and reject records whose provenance cannot be established.