Fail the build on high-severity dependency advisories

Đang mở
#338 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

@IanoNjuguna đang làm issue này rồi.

Từ ngày 22/11/2026.

  • #405 của @IanoNjuguna — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, json, typescript
Lĩnh vực
ci-cd, documentation, security

Hướng nghiên cứu

Start by reading website/package.json, .github/workflows/pr-build-website.yml, the deploy workflow, and TRIAGE.md. Decide and document how unfixable high-severity advisories such as braces and node-forge are handled, then add and verify the audit step after npm ci in both build paths. Done means high and critical findings fail where intended, while the documented exception or scope policy prevents an indiscriminate gate from blocking every build.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement Medium Priority Security

Problem statement

website/package.json defines audit:ci (npm audit --audit-level=high), and no workflow runs it. Grepping .github/workflows/ for npm audit or audit:ci returns nothing.

So a dependency with a known high-severity advisory can be merged today, and the first anyone hears about it is a Dependabot alert after the fact. The current open alerts (node-forge, braces) are exactly the class of problem a gate would have surfaced at the point of change rather than in the Security tab later.

Proposed solution

Add an advisory check to the existing PR build gate (pr-build-website.yml) and to the deploy workflow, so the same step runs on the way in and on the way to production:

  • Run npm run audit:ci (or npm audit --audit-level=high) after npm ci.
  • Fail the job on high or critical findings.
  • Do not fail on moderate or low, otherwise the gate becomes noise and gets bypassed.

Open question worth settling in the PR: whether to gate on findings with no available fix. braces (CVE-2026-93687) and node-forge (CVE-2026-85393) currently have no patched release, so a strict gate would block every build. The gate is only useful if the unfixable set is explicitly allow-listed, or if npm audit is run with --omit=dev so build-tool findings do not gate releases.

Scope and impact

Touches one workflow file. Risk is a gate that reddens builds for advisories nobody can fix; the allow-list decision above needs to be made first, and should be written into TRIAGE.md so it does not drift.

Acceptance criteria:

  • High and critical advisories fail the PR build
  • The unfixable set is documented rather than silently tolerated
  • TRIAGE.md describes the gate alongside Dependabot and CodeQL

Absorbed from #339

#339 was closed when its alerts resolved themselves (the braces advisory was withdrawn and website/yarn.lock was deleted). Its third acceptance box moved here, because this issue already owns the TRIAGE.md write-up:

  • TRIAGE.md also states the dismissal bar: who may dismiss a finding, which reasons are acceptable, and that a dismissal needs a comment naming the condition that reopens it.
Ngôn ngữ chính
TypeScript
Star
13
Fork
24
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IntersectMBO/developer-experience

Tất cả issue của IntersectMBO/developer-experience

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.