Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
pnpm に provenance のダウングレード を検出する PR を出してみた
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
mattsuu
October 23, 2025
Programming
370
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
pnpm に provenance のダウングレード を検出する PR を出してみた
Nihonbashi.js #10 (2025/10/23) での発表資料
https://nihonbashi-js.connpass.com/event/371133/
mattsuu
October 23, 2025
More Decks by mattsuu
See All by mattsuu
CSS Linter の現在地 2025年のベストプラクティスを探る
ryo_manba
12
4.4k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
410
React Aria で実現する次世代のアクセシビリティ
ryo_manba
5
3.2k
5分で分かる React Aria の 良いところ・これからなところ
ryo_manba
5
7k
アクセシブルなインクリメンタルサーチを作ってみた
ryo_manba
2
620
Next.js の fetch 拡張とキャッシュ機構の違いを理解する
ryo_manba
6
1.9k
React Spectrum Libraries によるアクセシブルなUIの構築
ryo_manba
0
4.6k
Other Decks in Programming
See All in Programming
Agentic UI
manfredsteyer
PRO
0
130
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
250
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
160
net-httpのHTTP/2対応について
naruse
0
470
3Dシーンの圧縮
fadis
1
690
Vite+ Unified Toolchain for the Web
naokihaba
0
230
スマートグラスで並列バイブコーディング
hyshu
0
120
LLM Plugin for Node-REDの利用方法と開発について
404background
0
170
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
560
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
200
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
950
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
200
Chasing Engaging Ingredients in Design
codingconduct
0
220
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
310
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Code Review Best Practice
trishagee
74
20k
Mind Mapping
helmedeiros
PRO
1
240
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
230
The agentic SEO stack - context over prompts
schlessera
0
800
Transcript
pnpm に provenance のダウングレード を検出する PR を出してみた まっつー / @ryo_manba
2025/10/23 Nihonbashi.js #10
自己紹介 まっつー SFL にハマってる 𝕏: @ryo_manba GitHub: @ryo-manba 2
最近の npm へのサプライチェーン攻撃 2025 年 7~9 月に相次いで発生 著名な OSS メンテナーに対するメールによるフィッシング攻撃
PR title の validation を悪用した攻撃 3
パッケージマネージャ側の対策 pnpm がインストールを遅延させる機能を導入 # pnpm-workspace.yaml minimumReleaseAge: 1440 # 1 日(分単位)
yarn, bun も同様の機能を追加した 4
npm 側の対応 Trusted Publishing が 2025 年7 月31 日に公開 5
Trusted Publishing NPM_TOKEN なしで OIDC 経由で CI から publish する仕組み
トークン漏洩のリスク低減 Provenance が自動生成される 6
Provenance どのソースを・どの手順で・どのCI で作られたかを検証可能に 7
Provenance のダウングレードによる問題の検知 8
pnpm にダウングレードを検知する PR を出した 9
pnpm update 時にダウングレードを検出 Trusted Publishing → Provenance Trusted Publishing →
none Provenance → none 上記のパターンを検出して警告を出す 10
実装の仕組み: npm のメタデータから情報を取得 { "dist": { "attestations": { "provenance": {...}
} }, "_npmUser": { "trustedPublisher": {...} } } 新旧のメタデータを比較してダウングレードを検出 11
課題: 著名なライブラリでもほとんどが Provenance 未対応(8,627/9,505 ) ref: https://github.com/sxzz/npm-top-provenance 12
今後の展望 Trusted Publishing + Provenance が主流に 今回のインシデントで導入が進みそう ライブラリ選定の新たな指標になる可能性 pnpm にマージされなかったら...
taze や danielroe/provenance-action を使うと良いです 13