Skip to content

chore(ci): pip-audit allows only filelock advisories that need filelock 4.x - #762

Merged
fas89 merged 2 commits into
mainfrom
chore/ci-filelock-cve-ignores
Oct 29, 2026
Merged

fas89 merged 2 commits into
mainfrom
chore/ci-filelock-cve-ignores

Conversation

@fas89

@fas89 fas89 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

pip-audit (the Security Scan job) has failed on every new run since 2026-10-29: filelock published advisories in waves — 13 since 2026-10-26, 10 of them today — all fixed only in filelock 4.x (4.0.9 / 4.2.1). That fix cannot resolve here: litellm, a base dependency, still declares filelock<4.0 in its latest release (1.106.6, checked against the PyPI JSON API); upstream tracker BerriAI/litellm#48394.

Ignoring them by ID (the first version of this PR, and the three IDs ignored on 2026-10-26) chased a moving target. Founder decision 2026-10-29: allow only what the cap makes unfixable.

What changed

The step runs pip-audit --desc --format json and a small inline filter:

  • a filelock 3.x advisory whose only fix is >= 4.0 is printed as a ::warning:: with the litellm note;
  • everything else fails the gate: any other package, a filelock advisory fixable inside 3.x or with no fix listed, and a pip-audit run that errors or writes no report.

The comment records what the filelock advisories touch: ReadWriteLock and StrictSoftFileLock are used by nothing in the closure; the plain FileLock (pip/cachecontrol, huggingface_hub, litellm, safety, mypy) and SoftFileLock (huggingface_hub's fallback) are, with lock files in the running user's own caches, and all need a second local user (AV:L). fluid_build never imports filelock. Remove the allowance when litellm lifts the cap (the re-check command is in the comment).

Validation

  • actionlint: clean.
  • The filter, run on synthetic pip-audit reports: only-4.x filelock → exit 0 with warnings; plus another vulnerable package → exit 1; a filelock fix inside 3.x → exit 1; no fix listed → exit 1; clean → exit 0; no report → exit 1; pip-audit exit 2 → exit 1.
  • On a real pip-audit -r <filelock==3.32.7> --format json report: 13 advisories, all allowed, exit 0. The JSON keys the filter reads (dependencies[].name/version/vulns[].id/fix_versions) are pip-audit's.

Documentation

  • Docs PR linked
  • No docs needed (CI configuration)
  • Docs TODO

…xed yet

pip-audit started failing on 2026-10-29 with four new filelock advisories
(CVE-2026-112909, -112910, -112936, -112938), fixed only in filelock 4.x. As for
the three already ignored, filelock>=4.2.1 cannot resolve while litellm (a base
dependency; 1.106.6 is the latest) declares filelock<4.0
(BerriAI/litellm#48394).

-112936 (ReadWriteLock) and -112938 (StrictSoftFileLock) are in APIs nothing in
the closure uses, the grounds the first three were ignored on. -112909 (Unix
FileLock) and -112910 (Windows FileLock) are reachable through the plain
FileLock pip, huggingface_hub, litellm and safety take, and are accepted on
different grounds: both need a second local user able to rename or hard-link
files in the lock's directory. Founder decision 2026-10-29; the step's comment
records both reasons, and any other filelock CVE still fails the gate.
@github-actions github-actions Bot added the ci Continuous integration and automation changes label Oct 29, 2026
… a list of IDs

Six more filelock advisories were published hours after the four this branch
first ignored by ID (13 since 2026-10-26, all fixed only in 4.x, which litellm's
filelock<4.0 cap blocks). The step now runs pip-audit with JSON output and fails
on everything except a filelock 3.x advisory whose only fix is >= 4.0, which is
printed as a warning. Any other package, a filelock advisory fixable within 3.x
or with no fix listed, and a pip-audit run that errors still fail. Founder
decision 2026-10-29; remove the allowance when litellm lifts the cap
(BerriAI/litellm#48394).
@fas89 fas89 changed the title chore(ci): pip-audit ignores four new filelock CVEs that cannot be fixed yet chore(ci): pip-audit allows only filelock advisories that need filelock 4.x Oct 29, 2026
@fas89
fas89 merged commit 52c38dc into main Oct 29, 2026
39 checks passed
@fas89
fas89 deleted the chore/ci-filelock-cve-ignores branch October 29, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration and automation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant