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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
mattsuu
October 23, 2025
Programming
390
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.5k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
420
React Aria で実現する次世代のアクセシビリティ
ryo_manba
5
3.3k
5分で分かる React Aria の 良いところ・これからなところ
ryo_manba
5
7k
アクセシブルなインクリメンタルサーチを作ってみた
ryo_manba
2
630
Next.js の fetch 拡張とキャッシュ機構の違いを理解する
ryo_manba
6
1.9k
React Spectrum Libraries によるアクセシブルなUIの構築
ryo_manba
0
4.7k
Other Decks in Programming
See All in Programming
Foundation Models frameworkで画像分析
ryodeveloper
1
250
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.9k
Build-to-own AI: Agentic Development for Humans
inesmontani
PRO
0
130
FDEが実現するAI駆動経営の現在地
gonta
2
240
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
190
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
920
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
290
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
3.2k
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
450
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
4.2k
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
120
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Paper Plane (Part 1)
katiecoart
PRO
1
9.9k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
600
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
First, design no harm
axbom
PRO
2
1.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
350
Design in an AI World
tapps
1
270
Paper Plane
katiecoart
PRO
2
52k
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