Skip to content

D234 — CI audits the framework's lock for known vulnerabilities - #426

Merged
napkinstack-agent[bot] merged 2 commits into
mainfrom
d234-lock-audited
Nov 18, 2026
Merged

napkinstack-agent[bot] merged 2 commits into
mainfrom
d234-lock-audited

Conversation

@napkinstack-agent

@napkinstack-agent napkinstack-agent Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Why

The Security tab showed 32 Dependabot alerts on filelock 3.32.6 and virtualenv 21.7.9. Both are transitive dependencies of pre-commit, and both had been fixed upstream since October. Nothing raised them for three reasons:

  • Dependabot's version updates for uv move only what pyproject.toml declares.
  • The repository's security updates were off; the maintainer has now turned them on.
  • No check read the lock.

#425 moved the lock past these versions. This pull request keeps it from happening again.

What

flowchart LR
  L[uv.lock] -->|uv export: what uv sync installs, hashed| R[locked.txt]
  R -->|pip-audit -f json| J[report]
  J --> V{platform/audit_lock.py}
  V -->|a release fixes it| X[Hooks and secrets: red]
  V -->|no fix yet| W[warning on the check, green]
  V -->|not audited, no report| X
  V -->|none| G[green]
  D[Dependabot security updates] -->|pull request moving the lock| L
Loading

Legend: what CI runs, last in Hooks and secrets; Dependabot opens the fix.

  • governance.yml, job Hooks and secrets: one new step, the job's last, so a red there never hides the secrets and messages checks. It is a step, not a job, so the ruleset's required checks are unchanged.
  • platform/audit_lock.py judges pip-audit's JSON report:
    • a vulnerability a release fixes fails, with the action uv lock --upgrade-package <name>;
    • one with no fix yet is a warning annotation, since no pull request could make it green;
    • a package not audited, or no report at all, fails.
  • pip-audit==2.10.1 sits in its own audit group. Dependabot keeps it current, and no uv sync installs it or its 25 packages. The audit reads what uv sync --locked installs, the default groups.
  • SECURITY.md: what fails, what warns, and who opens the fix. Dependabot's security updates are outside the cooldown and the weekly grouping. The published package carries no lock.
  • run.sh proves the verdict offline, on reports it writes: fixed → fails; unfixed → warning and passes; empty, not JSON, or skipped → fails; clean → passes. It also checks that the step stays last and is never continue-on-error.
  • Not taken:
    • the same audit in the skeleton: a project's dependencies can be of any ecosystem, and its auditor is its own choice;
    • a scheduled run alone: it would leave a red that no pull request shows;
    • the audit in the oracle: the oracle would then need the network;
    • a retry: no other networked step of the job has one.
  • Register row D234.

Tests

  • The real flow on main's lock: "No known vulnerability in the 36 locked packages", rc=0. On filelock==3.32.6: FAIL with CVE and fix named, rc=1. The lock before Lock: filelock 4.2.10, virtualenv 21.15.6, python-discovery 1.9.5 — 32 advisories #425 gave 32.
  • Oracle: platform tests OK. Fitness compliant. Hooks pass on the changed files (yamllint, actionlint, zizmor).
  • /code-review medium findings taken:
    • the step hid the secrets check behind it;
    • an advisory without a fix would have stopped every pull request;
    • the auditor sat in dev;
    • the guard only grepped;
    • --all-groups audited more than what is installed;
    • SECURITY.md did not say how the cooldown applies.
  • Not taken from the review: running the audit locally (the oracle stays offline) and a network retry.

🤖 Generated with Claude Code

Agent-Session: nstack-os-d234

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot requested a review from a team as a code owner November 18, 2026 08:58
…rned, the auditor out of dev

Agent-Session: nstack-os-d234

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot merged commit 6e0a5c0 into main Nov 18, 2026
3 checks passed
@napkinstack-agent
napkinstack-agent Bot deleted the d234-lock-audited branch November 18, 2026 09:44
napkinstack-agent Bot added a commit that referenced this pull request Nov 18, 2026
… refusals said (#436)

D234–D239 (#425, #426, #431–#435).

Agent-Session: nstack-os-v0320

Co-authored-by: napkinstack-agent[bot] <330339777+napkinstack-agent[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant