Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
pnpm に provenance のダウングレード を検出する PR を出してみた
Search
mattsuu
October 23, 2025
Programming
420
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.7k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
450
React Aria で実現する次世代のアクセシビリティ
ryo_manba
5
3.3k
5分で分かる React Aria の 良いところ・これからなところ
ryo_manba
5
7.2k
アクセシブルなインクリメンタルサーチを作ってみた
ryo_manba
2
660
Next.js の fetch 拡張とキャッシュ機構の違いを理解する
ryo_manba
6
1.9k
React Spectrum Libraries によるアクセシブルなUIの構築
ryo_manba
0
4.8k
Other Decks in Programming
See All in Programming
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.3k
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.1k
The Rails Doctrine Decade
koic
2
430
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.6k
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
450
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
1
820
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
330
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
190
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
1k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
410
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
30
13k
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
590
Optimising Largest Contentful Paint
csswizardry
37
4k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Designing for Performance
lara
611
70k
Docker and Python
trallard
47
4.2k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Embracing the Ebb and Flow
colly
88
5.2k
WENDY [Excerpt]
tessaabrams
14
40k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.3k
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