Repository navigation
Watch the lock on main every week, against OSV and each dependency's repository - #109
Merged
Merged
Conversation
…repository A lock goes bad by the calendar: from late October main's lock carried fourteen published advisories and only Dependabot's pull requests went red. And the audit reads OSV, which imports a repository's advisory some time after the repository publishes it. tools/advisory_watch.exs reads each locked hex package's GitHub repository from the registry, that repository's published advisories, and holds the locked version to each range; each finding says whether OSV lists it for that version yet. Run on the lock before #106 it finds fifteen, two of them (GHSA-j9wq-h5xx-5qx5, GHSA-fmr8-qrvr-4ww5) not in OSV for bandit 1.13.1, which the audit alone passed. It exits 0, 1 or 2 (not measured) as tools/audit.sh does, and --self-test holds its range reader offline. advisory-watch.yml runs both readers every Monday and by hand, never on a push or a pull request, with read-only permissions: a finding is a failed scheduled run, which GitHub reports to the maintainer. A governance test holds the triggers and both readers. Signed-off-by: Ayla Croft <aylacroft@proton.me>
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.
A weekly check of the lock on
main, so that a new advisory against a locked dependency fails a run, which GitHub reports to the maintainer, instead of waiting for someone to notice red Dependabot pull requests.Why two readers
tools/audit.sh(mix hex.audit) reads OSV, which includes the EEF CNA's advisories.tools/advisory_watch.exsreads each locked package's repository advisories directly, holds the locked version to each range, and says for each finding whether OSV has it yet.Measured
main's lock: 19 hex packages, all 19 watched at their repositories, nothing found. Exit 0.--self-test: 13 ranges and 6 unreadable forms, offline; the workflow runs it first.The workflow runs Mondays 05:47 UTC and by hand, never on a push or a pull request (the gate's audit covers those). Permissions are read-only. A governance test holds the triggers and both readers; with a
push:trigger planted, it fails.GATE_LEG=pinned ./tools/gate.sh: "Gate OK.", every step passing; 501 tracked files, the two new ones in REUSE and the publication allowlist.