Skip to content

fix(ci): js-yaml の advisory を audit allowlist に追加(GHSA-52cp-r559-cp3m)#531

Closed
yusuke0610 wants to merge 1 commit into
mainfrom
fix/audit-allowlist-js-yaml
Closed

fix(ci): js-yaml の advisory を audit allowlist に追加(GHSA-52cp-r559-cp3m)#531
yusuke0610 wants to merge 1 commit into
mainfrom
fix/audit-allowlist-js-yaml

Conversation

@yusuke0610

Copy link
Copy Markdown
Owner

概要

新規公開された js-yaml の advisory(GHSA-52cp-r559-cp3m, high, YAML merge-key チェーンによる二次的 CPU 消費)npm audit ゲート(web/scripts/audit-check.mjs)で 全 web PR / main の CI を落とすようになった。既存の esbuild 2 件と同じ allowlist 機構で時限的に許容する。

リポジトリ横断の CI 赤(依存起因)。blog 撤去(#519 / PR #530)とは無関係の pre-existing 問題を切り出したもの。#530 の CI を green にする前提として先にマージ推奨。

到達可能性の分析(allowlist の根拠)

  • js-yaml は openapi-typescriptdevDependency)→ @redocly/openapi-core 経由の推移的依存
  • 用途は make codegen-typesビルド時 codegen のみ。パース対象は**自前 backend の OpenAPI スキーマ(信頼済み)**で、攻撃者制御の YAML を parse しない
  • 本番バンドル非到達(openapi-typescript は CLI ツール、web/src からは未 import)
  • @redocly/openapi-core は全バージョンが脆弱な js-yaml に依存し、npm audit fix でも解消不可--force = openapi-typescript の破壊的更新が必要)

以上より、DevForge の使用形態では DoS の攻撃面に到達不能。恒久対応(上流の js-yaml>4.2.0 対応)まで allowlist で時限許容する。

変更

  • web/scripts/audit-check.mjsALLOWLISTGHSA-52cp-r559-cp3m を理由・見直し期限(2026-09-30)付きで追加

検証

  • node web/scripts/audit-check.mjs → exit 0(「High/Critical の未許容 advisory はありません」)
  • qs(moderate)は audit-check の対象外(high/critical のみブロック)のため影響なし

🤖 Generated with Claude Code

新規公開された js-yaml の advisory(YAML merge-key チェーンによる二次的 CPU
消費 / high)が npm audit ゲートで CI を落とすようになった。この依存は
openapi-typescript(dev) → @redocly/openapi-core 経由の推移的依存で、自前の
backend OpenAPI スキーマ(信頼済み)を codegen する時だけ使う。本番バンドルに
非到達で攻撃者制御の YAML を parse しないため到達不能。@redocly/openapi-core は
全バージョンが脆弱な js-yaml に依存し npm audit fix でも解消できないため、既存の
esbuild 2 件と同じく理由・見直し期限付きで allowlist に時限的に追加する。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@yusuke0610, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d8caa5db-f8f3-4da6-8d5e-afecbd07b475

📥 Commits

Reviewing files that changed from the base of the PR and between aa78d18 and d71821c.

📒 Files selected for processing (1)
  • web/scripts/audit-check.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/audit-allowlist-js-yaml

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.

@github-actions github-actions Bot added bug バグ修正 ci CI / ワークフロー web フロントエンド (web) and removed bug バグ修正 ci CI / ワークフロー labels Jul 21, 2026
yusuke0610 added a commit that referenced this pull request Jul 21, 2026
#519)

新規公開された js-yaml の advisory(YAML merge-key チェーンによる二次的 CPU
消費 / high)が npm audit ゲートで #530 の CI を落としていた。openapi-typescript
(dev) → @redocly/openapi-core 経由の推移的依存で、自前 backend の OpenAPI スキーマ
(信頼済み)を codegen する時だけ使う。本番バンドル非到達・攻撃者制御の YAML を
parse しないため到達不能。npm audit fix でも解消できないため、既存 esbuild 2 件と
同じく理由・見直し期限付きで allowlist に時限追加する。

(同内容の独立 PR #531 と重複するため、本コミットが入れば #531 はクローズ可能)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
yusuke0610 added a commit that referenced this pull request Jul 21, 2026
* feat: ブログ連携機能を撤去(ADR-0022 / #519)

経歴書へ還流せず投稿頻度スコアが逆効果になり得るブログ連携(Zenn/note 同期・
記事一覧・スコアリング)を全量撤去する。ADR-0008 の流儀(残さず消す)に倣う。

backend:
- routers/blog・services/blog・repositories/blog・models/blog・schemas/blog を削除
- main.py / 各 __init__.py の登録解除、messages.json の blog キー削除
- context_builder の _build_blog_context とブログ依存 import を削除。prompt
  (agent_career_summary / agent_self_pr)と test(test_agent /
  test_agent_context_builder)の blog_context 前提を同一 PR で更新
- drop マイグレーション 0049 を追加(子→親順で 3 テーブル削除。実 SQLite で
  base→head 適用を検証。downgrade は機能撤去のため no-op)
- security テストの blog ケースを削除(攻撃クラスは resume/notification/
  github_link で担保継続)

web:
- BlogPage・components/blog・api/blog・hooks/blog・未使用の Zenn/Qiita/Note
  アイコンを削除、routes/SidebarLayout の導線と messages.ts の blog 文言を削除
- api/index・paths・types から blog を除去、generated.ts を再生成(codegen-drift)
- E2E の「別タブ遷移」検証を GitHub 連携(/github_link)へ張り替え(38 pass)

docs / rules:
- README・api.md・data-model.md の blog 記述を削除
- .claude/rules(architecture/agent/database)を整合更新、layers.md の blog
  教材例を github intelligence collector 例へ差し替え
- pyproject の mutmut scope から削除済み scorer.py を除去、CLAUDE.md/skills の
  blog 例を更新

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ci): js-yaml の advisory を audit allowlist に追加(GHSA-52cp-r559-cp3m / #519)

新規公開された js-yaml の advisory(YAML merge-key チェーンによる二次的 CPU
消費 / high)が npm audit ゲートで #530 の CI を落としていた。openapi-typescript
(dev) → @redocly/openapi-core 経由の推移的依存で、自前 backend の OpenAPI スキーマ
(信頼済み)を codegen する時だけ使う。本番バンドル非到達・攻撃者制御の YAML を
parse しないため到達不能。npm audit fix でも解消できないため、既存 esbuild 2 件と
同じく理由・見直し期限付きで allowlist に時限追加する。

(同内容の独立 PR #531 と重複するため、本コミットが入れば #531 はクローズ可能)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(ci): audit allowlist の reviewBy 期限を機械的に強制する(CodeRabbit 指摘 / #530)

CodeRabbit 指摘(Major): allowlist は reviewBy を文字列で持つだけで期限を強制
しておらず、見直し忘れで advisory が恒久的に握り潰される恐れがあった。

- reviewBy を "YYYY-MM-DD (説明)" の先頭日付としてパースし、実行時 UTC 日付と比較
- 期限切れ・不正日付(YYYY-MM-DD で始まらない / 暦上あり得ない値)のエントリは
  fail-closed(CI を落とす)。allowlist は期限内のみ有効になる
- 既存 esbuild 2 件・js-yaml 1 件はいずれも reviewBy=2026-09-30(未来)のため現状 pass

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@yusuke0610

Copy link
Copy Markdown
Owner Author

同内容の js-yaml allowlist に加え reviewBy 期限の fail-closed 強制まで #530 に折り込み、#530 が main にマージされたため本 PR は冗長になりました。クローズします。

@yusuke0610 yusuke0610 closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web フロントエンド (web)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant