Repository navigation
fix(security): remediate critical dependencies - #1
Nicolas0315 wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ccusage performance comparisonThis compares the PR build against the base branch build on the same CI runner. Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Package size
Lower medians and smaller packed package sizes are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused override and lockfile changes consistently remediate all affected dependency edges.
Review effort: Balanced
Findings: None
What changed in this PR
Remediates the tar archive-expansion vulnerability while preserving existing supply-chain policies.
Changes:
- Overrides
tar6 dependencies withtar7.5.22. - Updates all four dependency edges and required transitive packages.
| File | Description |
|---|---|
pnpm-workspace.yaml |
Adds the security override. |
pnpm-lock.yaml |
Records updated dependency resolutions. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Nicolas0315
left a comment
There was a problem hiding this comment.
レビュー(head fa24a91、コメントのみ)
差分は pnpm-workspace.yaml の override と、それに伴う pnpm-lock.yaml の更新だけです。結論として、方向性は妥当でブロッカーはありません。ただし、CI が赤いまま統合できる状態ではありません。
指摘
- [Info] advisory と修正版は正しい: GHSA-23hp-3jrh-7fpw(CVE-2026-59873, critical)の影響範囲は
tar <=7.5.18です。7.5.22 は現時点の npmlatestで、GitHub Advisory DB 上も既知の脆弱性はありません。tar 6.2.1 に残っていた GHSA-8qq5 / 34x7 / 83g3 などのパストラバーサル系もまとめて解消されます。lockfile 内の tar は 7.5.22 の1つだけになり、4つの依存辺(cacache / giget@1.2.5 / node-gyp@8.4.1 / sqlite3@5.1.7)すべてで置き換わっています。 - [Low] 影響範囲は開発時の依存だけ: tar を取り込む経路は
@praha/byethrow-docs → sqlite3とc12 → giget@1で、どちらも docs と devDependencies 側です。配布されるccusageパッケージのランタイムには入りません。critical というラベルに対して、実際のリスクは開発環境と CI に限られます。PR 本文にこの点を明記してください。 - [Low] メジャーバージョンを越える override:
tar@>=6 <7 → 7.5.22は 6 から 7 への強制です。giget のextractは本文で検証済みとのことですが、node-gyp@8.4.1(sqlite3 の prebuild が取れないときのソースビルド経路)でのtar.xストリーム利用は検証されていません。prebuild が無い環境でpnpm installが通るかを一度確認することを推奨します。 - [Nit] lockfile に孤立エントリが残っている:
minipass@5.0.0は tar 6 だけが参照していたため、今は参照元がありません。pnpm install(またはpnpm dedupe)で再生成して取り除くのが望ましいです。 - [Info] override のコメント: GHSA-23hp だけを挙げていますが、他の tar 6 の advisory にも効くので、「tar <7.5.21 の既知 advisory 群」と書くほうが実態に合います。
CI 失敗の原因(どれもこの PR の差分に起因しないと判断)
npm-publish-dry-run-and-upload-pkg-pr-now:The app https://github.com/apps/pkg-pr-new is not installed on or does not have access to Nicolas0315/ccusage(404)。fork 環境が原因で、pkg-pr-new App が未インストールです。schema-check: 生成したスキーマと commit 済みのconfig-schema.jsonの差分で失敗しています。差分はremoteHost/remoteTailscale/remoteTmpで、fork の main にある独自コミット(feat(remote)…)がスキーマを再生成していないためです。fork の base が原因で、tar とは無関係です。test:src/adapter/claude/data-loader.tsの料金計算テストが10件失敗しています(expected 0 to be greater than 0)。依存の変更はランタイムに影響しないので、本文の記載どおり変更前から失敗していたものと判断します。ただし fork の main では push 時の CI が走っておらず、CI 上で base と比較した記録はありません。
upstream との関係
- upstream(
ccusage/ccusage)の main は fork より1593コミット先行しています。その lockfile にはtar・sqlite3・byethrow-docs系がもう存在しないため、upstream では依存の削除で解消済みです。この PR を upstream に出す必要はありません。
推奨
fork を当面使うなら、この PR はこのままで問題ありません。ただし、根本的には fork の main を upstream に追従させる(独自の remote 機能は rebase し、スキーマも再生成する)ほうが効果が大きいです。マージの前に、少なくとも schema-check と test が fork の base でも失敗することを CI 上で示してください。
|
リポジトリがアーカイブ済みでマージできないため、未マージのまま閉じます。 |
tar6依存4辺を7.5.22へ限定更新。供給元のtrust policyは維持。
検証: frozen install、親のextract API、bounded圧縮率拒否、型検査、CLI build/publint通過。既存料金テスト10件失敗・format/AGENTS symlink不良を変更前でも再現。
実サービスへのdeployはこのPRの対象外。最新headに対するCI・レビュー・未解決会話・マージゲートを確認してから統合する。