Repository navigation
feat(ci): weekly advisory fetch for the watchlist - #2
Merged
Merged
Conversation
Every Monday a workflow asks OSV.dev for the advisories on Pillow (PyPI) and tiff, libpng1.6, libjpeg-turbo, zlib, poppler, openjpeg2 and freetype (Debian), drops Debian's bulletins and merges the records for one CVE, compares against docs/advisories/seen.json and the existing advisory issues, and opens one issue per new advisory from a fixed template with an empty triage section. Three mechanical noise filters label, never drop. A reserved CVE with no text stays pending and is checked again next week. The script is standard library only and runs locally; its tests build every OSV and GitHub response in the test file. Nothing is committed by the workflow: the issues are the record, and seen.json is the baseline from the November 2026 backfill, refreshed by hand with `record`. docs/advisories/README.md is the triage guide: the question each issue answers, the buckets, the noise filters, and the rule that a B finding becomes a policy field plus a hostile corpus case, never a silent change of a default. The model-driven triage comment is a marked place-holder. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What runs, when
.github/workflows/advisories.ymlruns every Monday at 07:00 UTC (an hour after the Security workflow) and onworkflow_dispatch, with a dry run tick-box that lists without opening. It runsscripts/advisories.py run, which:POST https://api.osv.dev/v1/queryfor each package on the watchlist (pillowon PyPI;tiff,libpng1.6,libjpeg-turbo,zlib,poppler,openjpeg2,freetypeon Debian), followingnext_page_token;DSA-,DLA-, andDTSA-, which OSV also carries) and withdrawn records, and merges the records that describe one CVE (Pillow's GHSA + PYSEC entries, Debian'sDEBIAN-CVE-…record) into one advisory keyed by the CVE;The script is Python standard library only (no new dependency;
uv lock --checkpasses) and runs locally:fetch(what is new, opens nothing),run(the job; needsGITHUB_TOKENand--repository),record(refresh the baseline).tests/test_advisories.pybuilds every OSV and GitHub response in the test file and fakes the one HTTP function the script calls: pagination, bulletin dropping, CVE merging, the reserved state, each noise filter, the template, the state file, and the job end to end including the second run opening nothing.Where the state lives, and why nothing is committed
The issues are the record. Each issue starts with
<!-- sillybos-advisory: … -->naming every identifier of the advisory, and the next run reads those markers back from everyadvisory-labelled issue, open or closed. So the workflow needs onlycontents: readandissues: write, andmaingets no bot commit a week (its ruleset would refuse aGITHUB_TOKENpush anyway, and a weekly bot PR is noise for a human to merge).docs/advisories/seen.jsonis the baseline: the 767 advisories OSV held for the watchlist on 1 November 2026, by key, with the two reserved CVEs as pending. A maintainer refreshes it by hand withpython scripts/advisories.py recordwhen the issue list has grown long enough to be worth folding in. An advisory is known if any of its identifiers is in the baseline or an issue marker, so a GHSA that later gains a CVE alias does not come back as new.The noise filters
Three mechanical filters add
likely-not-reachedand list what matched; none drops anything. A path undertools/orcontrib/and the Pillow modulesImageFont,ImageDraw,ImageMath,ImageShow,PdfParserare looked for in the whole text. The words save/encode/write/append (verb forms) are looked for in the headline only (summary plus first paragraph of prose), because on the real October batch nearly every Pillow write-up mentions "writes" somewhere, which made the label meaningless; "out-of-bounds write" and its kin are blanked first, and "encoding" the noun is left alone.What a maintainer does with a new issue
Answer the question at the top of
docs/advisories/README.mdin a line after Finding ("would a bounded header check, or whatpdfinfo/pdfimages -list/pdffontsreport, have kept the triggering file from the decoder?"), tick one bucket (A, B, B2, C, D, N, U; the guide defines each and what follows), and close the issue, or leave it open as the ticket for the B work. A B or B2 finding becomes a policy field plus a hostile corpus case plus a README row, never a silent change of a default, since every default refusal is a breaking release. The guide has a clearly marked, unbuilt place for the model-driven triage comment.Also: a one-line pointer under Development in the README, and
scriptsadded to mypy's files.Checks
ruff check .,ruff format --check .,mypy,pytest --cov(183 tests, 96.8%),uv lock --check, andzizmor --min-severity medium .github/workflows(no findings; the new workflow is also clean at every severity) all pass locally.🤖 Generated with Claude Code