Repository navigation
skills(review-runs): check open Dependabot alerts in the live scan - #1214
Conversation
tend-agent
left a comment
There was a problem hiding this comment.
Two changes, both inline.
The disabled-alerts claim is wrong. GET /repos/{owner}/{repo}/dependabot/alerts answers 403 Dependabot alerts are disabled for this repository. — not []. Verified against tend-agent/tend-integration, which has alerts off (/vulnerability-alerts 404s there). So on any adopter that never enabled alerts, the nightly sweep runs the call as instructed and gets a failure the skill says cannot happen; the natural read is a PAT scope gap, which is the one thing the same sentence rules out. Only the empty result means "no open alerts".
Liveness is defined as "no PR proposing its fix", while the red-run bullet directly above closes its rows on "a fix PR or a tracker". This repo's five tornado alerts are the case that separates the two: lowest non-vulnerable 6.5.8 against 6.5.5 as the highest the tree resolves, so no bump closes them and the fix needs a resolution constraint relaxed. Track them rather than fix them and every later sweep still reads them as live work, re-deriving the same dead end nightly.
Unrelated to the diff: #1171 rewrites the Handle live work through... paragraph this bullet is inserted directly above, so whichever lands second will conflict there.
… tracker as closure The alerts endpoint answers 403 "Dependabot alerts are disabled for this repository." rather than an empty list, so the previous wording told the sweep a failure it will actually see cannot happen. Closure now matches the red-run bullet above: a tracker closes the row, so an alert whose fix needs a maintainer decision stops re-surfacing every night.
Regenerates the `tend-*.yaml` workflows for tend 0.2.7 (from 0.2.6). The diff is the version comment and the `max-sixty/tend/claude@` action pin in all eight workflows; no job, trigger, or permission changed. What adopters get from the upgrade: - **The sandbox can write zsh here-documents again.** Scratch files for heredocs now go to the writable temp dir instead of a path the sandbox denies, so a session that shells out through zsh no longer fails on them (max-sixty/tend#1211). This run hit exactly that failure while composing this description. - **`review-runs` stops reporting paths that have since gone green.** It re-queries the closure read before calling a path still red, so a run fixed between the scan and the report is no longer written up as an outstanding failure (max-sixty/tend#1210). - **`review-runs` now checks open Dependabot alerts** as part of its live repository scan, so unaddressed security advisories surface in the daily sweep (max-sixty/tend#1214). - **Sessions load less bundled guidance.** `running-in-ci` and `review` keep the rules every session needs and move the rarer actions — opening a PR, pushing, monitoring CI, posting, draft mode — into `references/` files read on demand, dropping from 52 KB to 20 KB and 41 KB to 25 KB respectively. That leaves more of each session's context for the actual work (max-sixty/tend#1215). - **PR review decides its pre-approval check in a script** rather than re-deriving it from prose each session, which makes the approve/don't-approve call consistent run to run (max-sixty/tend#1217). Full comparison: max-sixty/tend@0.2.6...0.2.7 `.config/tend.yaml` pins no model, so nothing there needed to move. Co-authored-by: worktrunk-bot <[email protected]>
Problem
review-runs's live scan already surfaces reddynamic/dependabot/...rows, and already knows they cannot be closed by the usual green-run lookup — but nothing tells the session what such a row means, and no tend skill reads the Dependabot alerts API at all. Dependabot opens its own PR for most alerts; where it errors instead, no PR exists, soweekly's dependency-PR review has nothing to find and the advisory sits on the default branch indefinitely.This repo is currently in that state: alerts for
tornado,h2,cryptography,msgpack(uv.lock) andsharp(worker/package-lock.json) are open with no PR, and each has matching reddynamic/dependabot/dependabot-updatesruns onmain. Run 34042526121 reportssecurity_update_not_possiblefortornado: lowest non-vulnerable6.5.8, highest the tree resolves6.5.5. Every nightlyreview-runssweep has read those rows and closed none of them.Solution
A fourth live-work bullet in Reconcile live work: one
gh api .../dependabot/alerts?state=opencall beside the existing red-run queries, and how to read the result — an alert open for more than a few days with no PR naming its package is live work, and a reddynamic/dependabot/...row naming that package is the mechanism, so the manifest or lockfile has to be bumped directly rather than waited on. The call needs no scope beyond thereposcope the PAT audit already requires and returns[]where alerts are disabled, so it runs unconditionally.The error-table detail is written from the log rather than from the report: the heading varies by error type, so the skill says the log ends with a table naming the dependency and the error type, and names what
security_update_not_possibleadds.This fixes the gap in
review-runsonly. The alerts open on this repo are a separate change — they need lockfile bumps, and thetornadoone needs a resolution constraint relaxed.Testing
uv run pytestpasses (1124 passed; the 2 network-dependenttest_refresh_consumers.pycases fail under the sandbox's lack of DNS, as documented inCLAUDE.md).pre-commitpasses on the changed file, including the plugin-skill guards. The query and the log-table reading in the new text were both run against this repo before being written down.Closes #1213 — automated triage