Skip to content

fix(supply-chain): ignore 10 no-fix CVEs that broke nightly 2026-05-21#59

Merged
cemililik merged 2 commits into
developmentfrom
fix/nightly-cve-ignores
May 21, 2026
Merged

fix(supply-chain): ignore 10 no-fix CVEs that broke nightly 2026-05-21#59
cemililik merged 2 commits into
developmentfrom
fix/nightly-cve-ignores

Conversation

@cemililik
Copy link
Copy Markdown
Collaborator

@cemililik cemililik commented May 21, 2026

Summary

  • Nightly 2026-05-21 (run 26210539455) failed on the pip-audit step because OSV / GHSA published 10 new no-fix advisories overnight (9 torch + 1 markdown).
  • Adds each advisory to --ignore-vuln in .github/workflows/nightly.yml with an inline justification, threat-model carve-out, and re-evaluation condition, matching the existing CVE-2026-1839 (transformers) pattern.
  • Drops the stale Issue #37 tracks the active set comment — Nightly CI failure — 2026-05-07 #37 was a closed nightly-failure issue, not a tracker.

Triage detail

torch (9 CVEs, all local attack vector)

CVE Surface
PYSEC-2025-191 (CVE-2025-2953) torch.mkldnn_max_pool2d — local DoS
PYSEC-2025-192 (CVE-2025-2998) torch.nn.utils.rnn.pad_packed_sequence — local memory corruption
PYSEC-2025-193 (CVE-2025-2999) torch.nn.utils.rnn.unpack_sequence — local memory corruption
PYSEC-2025-194 (CVE-2025-3000) torch.jit.script — local memory corruption
PYSEC-2025-195 (CVE-2025-3001) torch.lstm_cell — local memory corruption
PYSEC-2025-196 (CVE-2025-3121) torch.jit.jit_module_from_flatbuffer — local memory corruption
PYSEC-2025-197 (CVE-2025-3136) torch.cuda.memory.caching_allocator_delete — local memory corruption
PYSEC-2025-210 (CVE-2025-63396) torch.profiler.profile — local DoS via missing profiler.stop()
PYSEC-2026-139 (CVE-2026-4538) pt2 Loading Handler — local deserialization (same trust model as torch.load(pickle))

All require a local attacker passing malformed inputs to a specific torch API. ForgeLM is a local-CLI training tool; an attacker with that access is already inside the trust boundary. None of the affected APIs are called with attacker-controlled arguments in forgelm/. Verified against pypa/advisory-database/vulns/torch/*.yaml on 2026-05-21.

markdown (1 CVE, OSV range misclassification)

CVE Notes
PYSEC-2026-89 (CVE-2025-69534) markdown (transitive via tensorboard). OSV affected-range record has no fixed event, so every version is flagged; the advisory description says the fix shipped in markdown==3.8.1. Installed 3.10.2 is post-fix. Re-evaluate when the OSV record gains a fixed: 3.8.1 event.

Why this isn't || true

pip-audit runs with || true (sanctioned carve-out in docs/standards/testing.md) because tools/check_pip_audit.py then applies the project's severity policy on the captured JSON. The script fails closed on every UNKNOWN-severity finding — which is every finding in practice, since pip-audit's JSON does not carry OSV severity. Adding documented ignores for accepted-risk CVEs is the prescribed escape hatch (see docs/reference/supply_chain_security.md — "Suppression").

Re-evaluation

Each release cycle: re-run nightly without the ignore set and drop any CVE that:

  • has been fixed in a version compatible with our pyproject ranges, OR
  • no longer appears in pip-audit output (OSV record withdrawn or corrected), OR
  • has been re-scored to a remote attack vector (then drop the ignore and bump torch).

Test plan

  • python3 -c "import yaml; yaml.safe_load(open('.github/workflows/nightly.yml'))" — YAML parses
  • python3 tools/check_anchor_resolution.py --strict — passes
  • python3 tools/check_bilingual_parity.py --strict — passes
  • python3 tools/check_no_analysis_refs.py — passes
  • pip-audit has_any_id matches against {id} | aliases, so PYSEC IDs in --ignore-vuln are honoured (verified by reading pip_audit/_service/interface.py)
  • Manual trigger of Nightly Compatibility workflow on this branch to confirm the supply-chain job goes green

Closes #58

🤖 Generated with Claude Code

Summary by Sourcery

Update nightly supply-chain workflow to suppress specific no-fix CVEs while documenting risk and reevaluation policy.

Bug Fixes:

  • Restore green nightly by ignoring newly published torch and markdown CVEs that have no upstream fixes but are acceptable under the project’s threat model.

Enhancements:

  • Expand and clarify documentation comments in the nightly workflow about how vulnerability ignores are justified, documented, and revalidated over time.

The 2026-05-21 nightly (run 26210539455) failed on `pip-audit` because
the OSV / GHSA databases published 9 new torch advisories and 1 markdown
advisory overnight, none of which have an upstream fix.  Without an
ignore, `tools/check_pip_audit.py` fails closed on UNKNOWN severity
(pip-audit's JSON does not serialise OSV severity) and the nightly stays
red, masking real future breakage.

Triage (issue #58):

- torch PYSEC-2025-191..197, PYSEC-2025-210, PYSEC-2026-139: all
  require a LOCAL attacker passing malformed inputs to specific torch
  APIs (`jit.script`, `lstm_cell`, `cuda.memory.*`, `pt2` loader, etc.).
  ForgeLM is a local-CLI tool; an attacker with that access is already
  inside the trust boundary.  None of the affected APIs are called with
  attacker-controlled arguments in `forgelm/`.

- markdown PYSEC-2026-89: OSV affected-range misclassification — the
  advisory description states the fix shipped in markdown==3.8.1 but
  the range record has no `fixed` event, so every version is flagged.
  Installed 3.10.2 is post-fix.

Each ignore is documented inline in `.github/workflows/nightly.yml`
with the surface, the threat-model carve-out, and the condition for
re-evaluating (per `docs/reference/supply_chain_security.md`).  Also
drops the stale "Issue #37 tracks the active set" reference — #37 was
a closed nightly-failure issue, not a tracker.

Refs: #58

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 21, 2026

Reviewer's Guide

Extends the nightly supply-chain audit step to explicitly ignore 10 newly published, no-fix CVEs (9 in torch, 1 in markdown), with detailed inline justification and reevaluation guidance, and cleans up an outdated tracking comment in the nightly workflow.

Flow diagram for updated nightly pip-audit ignore handling

flowchart TD
    NightlyJob[Nightly workflow: supply_chain job]
    PipAudit[pip-audit --ignore-vuln
    CVE-2026-1839
    PYSEC-2025-191..197
    PYSEC-2025-210
    PYSEC-2026-139
    PYSEC-2026-89]
    JsonOut[/pip-audit JSON output
    /tmp/pip-audit.json/]
    CheckScript[tools/check_pip_audit.py
    applies severity policy]
    Policy[Fail on any non-ignored
    UNKNOWN-severity finding]

    NightlyJob --> PipAudit
    PipAudit --> JsonOut
    JsonOut --> CheckScript
    CheckScript --> Policy
Loading

File-Level Changes

Change Details Files
Document and wire up explicit pip-audit vulnerability ignores for 9 torch PYSEC advisories and 1 markdown advisory in the nightly workflow, including rationale, scope, and re-evaluation conditions.
  • Rewrites the vulnerability-ignores comment block to describe the policy, reference supply_chain_security.md, and instruct linking triage issues via commit messages.
  • Adds a torch-specific subsection documenting shared threat model, local-only attack vector, non-reachability from ForgeLM’s external surfaces, and release-cycle re-evaluation rules.
  • Adds per-CVE notes for nine torch PYSEC advisories, capturing affected APIs, attack type (DoS or memory corruption), and project-specific reachability constraints.
  • Adds a markdown-specific subsection documenting OSV affected-range misclassification, current fixed version, and the condition for dropping the ignore.
  • Extends the pip-audit invocation with --ignore-vuln entries for the nine torch PYSEC IDs and the markdown PYSEC ID, alongside the existing transformers CVE ignore.
.github/workflows/nightly.yml

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 48f1bdb8-8e92-422e-89e5-3b2cdc757950

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/nightly-cve-ignores

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider moving the growing --ignore-vuln list into a separate config (e.g., a checked-in JSON/YAML consumed by tools/check_pip_audit.py) so new CVE suppressions don’t require editing the workflow and can be managed/validated in one place.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider moving the growing `--ignore-vuln` list into a separate config (e.g., a checked-in JSON/YAML consumed by `tools/check_pip_audit.py`) so new CVE suppressions don’t require editing the workflow and can be managed/validated in one place.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 21, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 37 complexity · 0 duplication

Metric Results
Complexity 37
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Address PR #59 review comment: extract the growing --ignore-vuln list
from .github/workflows/nightly.yml into tools/pip_audit_ignores.yaml,
consumed by tools/check_pip_audit.py via a new opt-in --ignores flag.
New CVE suppressions no longer require editing the workflow.

Design — opt-in, not opt-out
============================

docs/reference/supply_chain_security.md explicitly tells deployers that
ForgeLM does NOT ship a default project-level ignore list. The new
flag preserves that contract: without --ignores PATH, check_pip_audit.py
applies no suppressions, so a deployer running

    pip install forgelm[security]
    python3 tools/check_pip_audit.py /tmp/pip-audit.json

still sees the full unfiltered severity gate. The project's own nightly
opts in explicitly:

    python3 tools/check_pip_audit.py /tmp/pip-audit.json \
        --ignores tools/pip_audit_ignores.yaml

Schema enforcement
==================

Every entry in pip_audit_ignores.yaml must carry six required fields
(id, package, reason, threat_model, verified_at, reevaluate_after);
missing any one fails the gate with an ::error:: that names the gap.
This blocks the "stick a bare id: in and forget" pattern — every
suppression now carries a written justification + re-evaluate trigger
as required by docs/reference/supply_chain_security.md.

Matching uses {id} ∪ aliases on both sides, so an ignore listing the
CVE alias still matches a pip-audit finding emitted under its PYSEC
primary id (and vice versa). Each match is logged as a ::notice::
annotation so the run summary surfaces the audit trail; suppressions
don't disappear into the workflow log silently.

Migrations
==========

All 11 ignores in nightly.yml (CVE-2026-1839 transformers + 9 torch
PYSEC-2025-191..197/210 + PYSEC-2026-139 + 1 markdown PYSEC-2026-89)
moved verbatim into the YAML file with the justifications expanded
into structured fields. The workflow's pip-audit step shrinks from
~95 lines of inline comments + per-CVE --ignore-vuln args to a
~12-line block pointing at the YAML.

Tests
=====

Extends tests/test_check_pip_audit.py with 9 new cases covering:
- suppression by primary id and by alias
- no false-positive match on unrelated CVEs
- schema validation (each required field individually named on failure)
- missing / invalid YAML files fail closed
- default (no --ignores) is unchanged — deployer-safe
- the checked-in tools/pip_audit_ignores.yaml itself passes schema
  validation (regression guard so the workflow never breaks on its
  own ignore file)

Docs
====

Updates docs/reference/supply_chain_security.md and the TR mirror plus
docs/usermanuals/{en,tr}/operations/supply-chain.md with the new
deployer workflow (write your own ignores.yaml, pass via --ignores).
Bilingual parity verified by tools/check_bilingual_parity.py --strict.

Refs: #58, #59 (review comment)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@cemililik cemililik merged commit 4a85ec7 into development May 21, 2026
4 checks passed
cemililik added a commit that referenced this pull request May 22, 2026
…view)

Address review feedback on the pip_audit_ignores.yaml loader:

- Validate `aliases` is a list of strings before unpacking it into the
  id index. Previously `aliases: CVE-2025-2953` (a bare string) would
  be iterated character-by-character, polluting the index with
  single-char "ids" and silently breaking matching; a non-iterable
  would crash. Now fails closed with a clear ::error::.

- Validate value shape of required fields, not just presence: id,
  package, reason, threat_model, reevaluate_after must be non-empty
  strings, and verified_at must be a 'YYYY-MM-DD' string (quote it in
  YAML so it is not parsed as a datetime.date). An empty reason was a
  documented-justification gap the old presence-only check let through.

  Note: reevaluate_after is deliberately NOT date-validated — it is a
  free-text retirement condition ("Each release cycle, or when …"), so
  the review's suggested date-regex on it would have rejected every
  real entry. Date validation applies to verified_at only.

- Hoist `ignore_ids = set(ignores)` once in _bucket_findings instead of
  intersecting against `ignores.keys()` per finding.

- Doc grammar: "fails the gate closed" -> "causes the gate to fail
  closed" in both EN mirrors, and document the new malformed-value
  rejection in the reference + user-manual (EN + TR).

Adds 7 tests: aliases-as-string, aliases-with-non-string-element,
null-aliases-accepted, empty-required-string, malformed verified_at,
unquoted-YAML-date rejection, and free-text reevaluate_after accepted.
23 tests pass.

Refs: #59 (review)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
cemililik added a commit that referenced this pull request May 24, 2026
…5-24)

The nightly on main is green through the new --ignores mechanism (the
run log shows CVE-2026-1839 correctly suppressed), but a new no-fix
advisory dropped: transformers PYSEC-2025-217 (CVE-2025-14929),
X-CLIP checkpoint-conversion deserialization RCE.

CVSS is AV:L/UI:R (local + user must open a malicious checkpoint),
affected through 5.0.0rc0 with no fix in the pinned 4.x line. Same
threat-model carve-out as the existing transformers/torch
deserialization ignores: operators are documented as required to load
only trusted checkpoints, and ForgeLM does not invoke X-CLIP
checkpoint conversion.

With the Phase-refactored ignore file this is a one-line data change,
no workflow edit — exactly the maintainability win the PR #59 review
asked for.

Refs: #58

Co-Authored-By: Claude Opus 4.7 (1M context) <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