Skip to content
Like what we’re building? Star on GitHub

ADR-177 — Security posture is a dedicated bot that consumes the forge's alerts; Vetty keeps the per-PR lane ​

  • Status: Accepted — the operator chose the direction on 2026-11-26 and accepted the record on 2026-12-01, settling its first version: remediation pull requests from day one. Its server surface shipped in v7.46.0 and v7.47.0, and the bot's posture half in security-posture 0.1.0; remediation pull requests follow (#3770, see As built).
  • Date: 2026-11-26
  • Deciders: jo (the decision), Claude (the measurements and the study)
  • Relates to: ADR-124 (gating bots and their merge gestures) · ADR-169 (routing is a database override, never an environment variable)
  • Serves: #3770 · epic #3526 · follows #3602, #3730 · siblings #3767, #3768, #3769, #3771

Context ​

Between 2026-11-24 and 2026-11-26 an interactive session brought this repository's security alerts back in line by hand:

  • govulncheck: 37 reachable vulnerabilities → 0;
  • Trivy: 1135 open alerts → about 60, each remaining one accepted with a reason;
  • Dependabot: 71 alerts → 6.

The causes it found were structural, not incidents:

  1. Detection without a consumer. CI already ran govulncheck and Trivy. The govulncheck SARIF upload had been refused since it was added, and continue-on-error hid the refusal. Nobody read the results.
  2. Pins nobody moved.
    • The golang builder digest was frozen at 1.27.0, so the production image shipped stdlib CVEs fixed months earlier. The cause showed up later. Renovate's "docker base images" group has been listed as PR Edited (Blocked) on the dependency dashboard since 2026-08-24: its PR merged on a head that was no longer Renovate's, and the repository does not delete merged branches. So Renovate opened no base-image PR for three months.
    • Tool versions in Dockerfile ARGs carried no Renovate annotation, and the scanner image's Dockerfile was not even in Renovate's file list (#3771).
  3. Dependency PRs nobody judged. Vetty was bound to this repository, but its agents fell back to an expired credential: 25 runs since 2026-10-12, 0 verdicts. Each paused run held the required check PENDING (#3767, #3768).
  4. Noise, and decisions only a person makes. Most of the alert volume came from one unmaintained tool, from deprecated backends and from fixtures. Clearing it took product decisions: drop k9s, do not migrate the deprecated pi backend, decline vitepress v8.

The catalogue already holds seven security bots. Measured on iterion.cloud on 2026-11-26, none of them consumes a repository's own alert backlog:

botlanewhat it doesreal use
Vetty (dep-update-guard)per PRaudits a dependency bump, aligns code, builds, publishes the gate353 runs on buildkit-operator, 28 of 29 PRs ended green
Seki (sec-audit-source)on demandSAST + secrets + trivy fs, LLM triage, board issues38 manual runs, September
Depsy (sec-audit-deps)on demandmalware heuristics + CVE floor over enumerated deps0 cloud runs since June
Vulny (supply-shield-cve)per PRCVEs a diff introduces—
Shieldy (supply-shield)per PRmalware a diff introduces—
Senti (vuln-watch)hourly, org-wideexploited advisories (KEV, EPSS) matched to an inventory, alerts to chat, zero LLM by design—
Renovacy (secured-renovacy)on demandopens upgrades proactively0 cloud runs since June

Seki and Depsy re-scan the tree instead of reading what CI already published. Their weekly schedules were host-crontab lines that never ran.

Decision ​

1. Two lanes with two owners ​

  • Per PR: Vetty. It judges each dependency PR, aligns the consuming code and publishes the gate. This lane already works, and it is not extended to periodic work. Its continuity, gate and arming machinery is specific to a pull request.
  • Periodic posture: a new, dedicated bot. Working name sec-posture; the operator names the persona (the y/i/ie rule; "Posty" and "Patchy" are free). It owns the backlog: what CI and the forge already report about the default branch.

2. It consumes, it does not re-scan ​

Its input is the forge's alert APIs: code scanning (where govulncheck and Trivy SARIF land) and Dependabot alerts. It reads them deterministically, in tool nodes. Reading goes through pkg/forge, so GitLab's vulnerability report is the next variant, not an engine branch. Senti's poll_dependabot is the precedent to share. The bot runs no scanner of its own. Scanning stays CI's job, and a dead channel is reported as a posture fact (§4), never filled in by a second scan.

3. One LLM pass over the delta ​

A deterministic step diffs the alerts against the previous run's state. One triage agent classifies only the new and changed alerts:

  • reachable or not;
  • fix published or not;
  • deprecated component;
  • fixture or false positive;
  • major upgrade required.

Unchanged alerts keep their classification.

4. Output: proposals first, gestures after calibration ​

  • Dismissals are proposed with their reason. The bot ships in dry_run mode, as Warden does: dismissals are listed for the operator, and a per-repository pin turns on enforce, where the bot dismisses through the API.
  • Remediation lots are grouped by fix: one bump that closes N alerts, one image rebuild. From the first version, a lot opens a pull request (operator decision, 2026-12-01); it becomes a board ticket only when it needs a person's decision first. Vetty judges that pull request like any other, which closes the bot → bot loop.
  • Posture metrics go on every run: counts by tool and severity, fix-available counts, the age of the newest analysis per scanning tool, and the update groups Renovate's dependency dashboard reports as blocked or erroring. A tool that stopped publishing, or a group that stopped moving, is reported loud.
  • Product decisions are escalated, never taken: retiring a component, declining a major, accepting a residual risk.

5. A cloud schedule, not a host crontab ​

The bot runs from the server's schedules, with a bounded per-run budget, and its state is durable on the cloud side. A run is idempotent: re-running it over unchanged alerts proposes nothing new.

Options considered ​

  • Evolve Seki. Seki has the right skeleton: LLM triage, three-voter revalidation, scan_health, remediation, board. But its mandate is the source code it scans, and its three opus voters are sized for tens of findings, not thousands of alerts. Rejected: it would blur a bot the operator rates as promising.
  • Extend Vetty with a sweep mode. Rejected: every one of its mechanisms is keyed on one pull request, and the bundle is already the largest in the catalogue.
  • Evolve Senti. It already polls Dependabot alerts on a schedule. Rejected: its zero-LLM invariant is deliberate ("a run can neither spend a token nor show a project name to a model"), and triage needs a model.
  • A deterministic weekly job, and the bot later. Rejected as the endpoint, because triage and remediation, which were the bulk of the manual work, would stay manual. It survives as §4's metrics, which are deterministic.

Consequences ​

  • The security catalogue grows to eight bots, while four of them have no recent cloud use. Consolidating Depsy, Shieldy, Vulny and Renovacy is out of scope here and belongs to the catalogue pruning.
  • Vetty must be healthy on every repository the posture bot hands PRs to. #3767 and #3768 come first.
  • Renovate stays the source of routine bump PRs (#3771: OSV security PRs, family grouping, a lint against unmanaged pins). The posture bot covers only what Renovate does not.
  • A false-positive dismissal hides an alert. That is why dismissal starts as a proposal, and why every dismissal carries its reason.

Settled for the first version ​

The operator settled the record's open questions on 2026-12-01:

  • Persona: Yellow Card (/yellow-card): the warning shown before the foul. The first choice, Red Flag, fails the catalog's naming rule — it shares "red" with Code Red — and has two homonyms in the field (Addepar/RedFlag, an AI tool that flags risky pull requests in CI; the REDFLAG mark of Redflag Artificial Intelligence, Inc., filed 2024, which covers monitoring systems for unauthorized access). Yellow Card has none in the developer or security field.
  • Cadence and budget: one scheduled run a week, capped at 5 USD at list price per run. The first run, which triages the whole backlog, may be given a higher cap through the run's override.
  • Write scopes: granted from the first version — writing branches and pull requests, plus dismissing alerts (security_events: write for code scanning, and Dependabot alerts). The bot still ships in dry_run: dismissals are proposed, not executed, until a per-repository pin turns on enforce. None of these grants exists in the iterion GitHub App today: it asks no security_events permission (reading code-scanning alerts needs it too), and reads Dependabot alerts org-wide only, through the security-read token. Adding them — the App permissions, the token that carries them to a scheduled run, a token_scopes key — is the build's first step, and each installation's organization admins accept the new permissions.

As built (2026-12-03) ​

The build kept the decision and changed some of its letter. The plan's adversarial review (25 findings, all adopted) and the operator's choices of 2026-12-01 and 2026-12-02 are why.

  • No alert credential in the run. The write scopes above are not minted into the pod. The server reads and dismisses through two operations of the publish surface, /api/v1/forge/security-alerts and /api/v1/forge/dismiss-alerts (forge-security-alerts.md). Each call uses a GitHub App token minted for it alone and narrowed to the repository and one permission. The run's grant carries the capability, from the manifest's security_alerts scope, on a repo-bound schedule's tick only.
  • The enforce pin is the schedule row's. security_alerts_mode and security_alerts_max_dismissals are reserved names: no manifest may default them, and the server re-reads the row that launched the run at every call.
  • Server-side policy:
    • factual reasons only (false positive, used in tests, inaccurate, not_used);
    • no critical alert is ever dismissed, and an unrated one counts as critical (the operator's decision of 2026-12-02);
    • the alert is re-read before each dismissal, and must still be the severity the bot judged.
  • Vetty is launched explicitly. A schedule run asks the server to launch the reviewing bot on a pull request it opened (/api/v1/forge/launch-review, forge-review-launch.md). Vetty's author allowlist and the guard that ignores the App's own events stay as they are.
  • The backlog is bounded per run. The first run gets no budget override; each run triages at most max_triage_per_run alerts, most severe first, and the rest waits.
  • Schedule only in the first version. The persona answers to no command yet.
  • Two steps for the bot:
    • security-posture 0.1.0 is the posture half: triage, dismissals, escalations, the posture issue and the leased state branch;
    • the remediation pull requests come next (#3998).