Skip to content

skills(review-runs): check open Dependabot alerts in the live scan - #1214

Merged
max-sixty merged 2 commits into
mainfrom
fix/issue-1213
Sep 12, 2026
Merged

max-sixty merged 2 commits into
mainfrom
fix/issue-1213

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Problem

review-runs's live scan already surfaces red dynamic/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, so weekly'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) and sharp (worker/package-lock.json) are open with no PR, and each has matching red dynamic/dependabot/dependabot-updates runs on main. Run 34042526121 reports security_update_not_possible for tornado: lowest non-vulnerable 6.5.8, highest the tree resolves 6.5.5. Every nightly review-runs sweep 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=open call 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 red dynamic/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 the repo scope 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_possible adds.

This fixes the gap in review-runs only. The alerts open on this repo are a separate change — they need lockfile bumps, and the tornado one needs a resolution constraint relaxed.

Testing

uv run pytest passes (1124 passed; the 2 network-dependent test_refresh_consumers.py cases fail under the sandbox's lack of DNS, as documented in CLAUDE.md). pre-commit passes 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

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@max-sixty
max-sixty merged commit 6659329 into main Sep 12, 2026
12 checks passed
@max-sixty
max-sixty deleted the fix/issue-1213 branch September 12, 2026 15:42
max-sixty pushed a commit to max-sixty/worktrunk that referenced this pull request Sep 13, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review-runs: the live scan reads red Dependabot rows but never checks the alerts behind them, so an advisory Dependabot cannot fix goes unremediated

2 participants