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
1
310
pnpm に provenance のダウングレード を検出する PR を出してみた
Nihonbashi.js #10 (2025/10/23) での発表資料
https://nihonbashi-js.connpass.com/event/371133/
mattsuu
October 23, 2025
Tweet
Share
More Decks by mattsuu
See All by mattsuu
CSS Linter の現在地 2025年のベストプラクティスを探る
ryo_manba
12
4k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
380
React Aria で実現する次世代のアクセシビリティ
ryo_manba
5
3.1k
5分で分かる React Aria の 良いところ・これからなところ
ryo_manba
5
6.7k
アクセシブルなインクリメンタルサーチを作ってみた
ryo_manba
2
560
Next.js の fetch 拡張とキャッシュ機構の違いを理解する
ryo_manba
6
1.8k
React Spectrum Libraries によるアクセシブルなUIの構築
ryo_manba
0
4.4k
Other Decks in Programming
See All in Programming
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
980
CSC307 Lecture 02
javiergs
PRO
1
770
AgentCoreとHuman in the Loop
har1101
5
220
AI & Enginnering
codelynx
0
110
Vibe codingでおすすめの言語と開発手法
uyuki234
0
220
Fluid Templating in TYPO3 14
s2b
0
130
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
880
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
CSC307 Lecture 08
javiergs
PRO
0
660
CSC307 Lecture 07
javiergs
PRO
0
550
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.1k
Optimizing for Happiness
mojombo
379
71k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
110
Done Done
chrislema
186
16k
Site-Speed That Sticks
csswizardry
13
1.1k
Accessibility Awareness
sabderemane
0
47
The Language of Interfaces
destraynor
162
26k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
240
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
290
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
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