Skip to content

Ignore cowlib CVE-2026-43971 in hex.audit - #5102

Merged
midigofrank merged 5 commits into
mainfrom
fix/ignore-cowlib-cve-2026-43971
Aug 28, 2026
Merged

Ignore cowlib CVE-2026-43971 in hex.audit#5102
midigofrank merged 5 commits into
mainfrom
fix/ignore-cowlib-cve-2026-43971

Conversation

@elias-ba

@elias-ba elias-ba commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

Puts the lint job back to green. It has been red on main since 18 August, so every PR opened since has inherited a failing check.

mix hex.audit reports three cowlib advisories and our ignore list covered two, so CVE-2026-43971 fails the build. There is nothing to upgrade to, cowlib 2.19.0 is the newest release on Hex and predates the advisory. Suppressing is safe because all three name functions on cowlib's header building path and nothing in our tree calls them, so each ID now carries its function in the comment.

Validation steps

  1. mix hex.audit exits 0 with all three under "Ignored advisories". Note it only reports advisories on Hex 2.3 and up. CI runs mix local.hex --force so it gets the latest, but a local Hex 2.2.x says "No retired packages found" and passes either way. I checked against 2.5.1.
  2. mix format --check-formatted, mix credo --strict --all, mix sobelow --threshold medium and mix deps.audit --ignore-file .mix_audit.ignore all pass. Those are the other four checks in the lint job.

Additional notes for the reviewer

No changelog entry, this is build tooling.

AI Usage

Please disclose whether you've used AI anywhere in this PR (it's cool, we just want to know!):

  • I have used Claude Code
  • I have used another model
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed an AI review of my code
  • I have implemented and tested all related authorization policies.
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

The lint job has been red on main since 18 August. mix hex.audit picks up a
third cowlib advisory, CVE-2026-43971, and our ignore list only covered the
other two.

There is nothing to upgrade to. cowlib 2.19.0 is the newest release on Hex and
it predates the advisory, so the only fix is a git commit with no release
behind it. cowlib is transitive anyway, cowboy 2.18.0 pins it to >= 2.19.0.

Verified with Hex 2.5.1, which is what CI installs. mix hex.audit now exits 0
with all three ignored, and deps.audit, format, credo and sobelow still pass.
@github-project-automation github-project-automation Bot moved this to New Issues in Core Aug 27, 2026
@github-actions

Copy link
Copy Markdown

Security Review ✅

  • S0 (project scoping): N/A — the only change is mix.exs adding a CVE ID to mix hex.audit's ignore_advisories list, no queries or data-access code touched.
  • S1 (authorization): N/A — no web-layer actions, controllers, or LiveView events added or modified.
  • S2 (audit trail): N/A — no writes to configuration resources; build tooling only.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.6%. Comparing base (cd3f3b4) to head (f28e6c5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #5102   +/-   ##
=====================================
  Coverage   90.6%   90.6%           
=====================================
  Files        422     422           
  Lines      20035   20035           
=====================================
+ Hits       18159   18160    +1     
+ Misses      1876    1875    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The first version argued we were stuck because there is no patched release.
That is true but it is the weaker reason. The real one is that none of the
three vulnerable functions are reachable from our dependency tree, which is
what actually makes suppressing them safe.

Checked each: nothing outside cowlib references cow_link or
cow_http_struct_hd, and cowboy_req only calls cow_cookie parse_cookie/1,2 and
setcookie/3, never cookie/1.
Twenty lines of rationale above a three line list was out of proportion, and it
would go stale the moment cowlib ships. The per advisory reasoning lives in the
PR description instead.
Code review caught three things in the comment. It said the functions are not
reachable, which is too strong: cow_http_struct_hd and cow_link are both
reachable from cowboy_req on their parse side. What actually holds is that all
three advisories name header-building functions, and nothing in our tree calls
those. Each ID now carries the function it covers, and the note about hex
matching aliases is back, since that is what tells the next person an EEF or
GHSA failure is already silenced by the CVE form.
cowboy_req has no link entry in parse_header_fun, so cow_link's parse side is
not reachable that way. The PR body already said two; the comment generalised
and overstated it.
@elias-ba
elias-ba requested a review from midigofrank August 27, 2026 15:38
@midigofrank
midigofrank merged commit c5882f8 into main Aug 28, 2026
7 checks passed
@midigofrank
midigofrank deleted the fix/ignore-cowlib-cve-2026-43971 branch August 28, 2026 03:00
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants