Open Letter: Let's stop supply chain attack
Open letter to NPM (Github) and various package managers, to propose an idea to prevent supply chain attacks (completely)
Search for a command to run...
Open letter to NPM (Github) and various package managers, to propose an idea to prevent supply chain attacks (completely)
No comments yet. Be the first to comment.
최근에 Zephyr Cloud 의 프로젝트에 자동 QA 시스템을 구성했다. 그 작업 기록이다. 원래 이런 작업은 리눅스에서 하는 게 맞다고 생각했다. 그런데 나는 계속 로컬에서 디버깅해야 했고, 개발 흐름상 맥에서 바로 돌릴 수 있어야 했다. 예전에도 자동 QA를 시도한 적은 있었지만 끝까지 제대로 굴러간 적은 없었다. 그러다가 지난주 중반쯤, “이건 로
어제 성균관대학교에서 열린 간단한 이벤트에 연사로 참여했는데, 질의 응답 시간에 한 얘기들 중 도움이 될만한 것들이 많았다. 귀차니즘을 해결할 수 있다면 글로 정리해서 올릴 것이다. 주제는 개발 지식 / 전공 지식이 필요한가 AI 시대에 필요한 역량 개발 직군의 미래 가 될 것이다.
내 블로그의 제목이 kdy1: The way I think 인만큼 앞으로는 내 생각을 더 자주 올리려고 한다. 한국 기준으로, 학벌은 사람을 볼 때 꽤나 유용한 지표이지만, 절대적이지는 않다. 경험적인 얘기일 뿐이지만, 성균관대학교 자퇴생으로서 느낀 것들이 몇 가지 있다. 대학까지 간 사람의 학벌은 학습 능력 x 성실함 에 대체로 비례한다. 그래서 의미가
최종 업데이트: 2026/03/15 지능의 유전 현재 인류 기준으로, 고지능자는 고지능 유전자가 많이 겹친 사람이다. 지능의 유전엔 X 염색체가 매우 중요한 역할을 한다. 그리고 이게 남자와 여자의 지능 분포 차이를 만든다. 극상위권에 여자가 거의 없는 이유가 이것이다. 고지능 X 염색체가 여자한테서 발현되려면 2개가 있어야 한다. 이는 인간의 생
This is a translation of https://kdy1.dev/2026-1-31-ai-coding-tips-kr I recently gave a short presentation about how I use AI. The first part of the slides overlaps with a previous blog post. In this article, I’ll focus on topics that weren’t covere...
With this letter, I’m proposing some modification of the publish process of all package managers, and Github because it’s the most trusted service provider in the open-source world.
Recently, one of the widely used npm packages is compromised and malicious code was distributed using it. This could happen because
configuring 2FA nearly blocks automation (and thus provenance)
a user with token can publish a new version from local machine
Currently using 2FA for publishing is nearly impossible, and deploying manually each time to use 2FA will increase the risk of mistake or leak. We have to alter the situation, and our approach to the problem. We can do 2FA and we should. But how? I said configuring 2FA almost blocks automation.
But there’s a solution. The basic idea is to require 2FA during deployment using different device than the CI machine. We have all the necessary technologies to do this. Web Push and WebAuthn, combined with some constraints for the package registries can completely prevent supply chain attack. Package managers should
enforce different-device 2FA
and make it the only way to deploy a package
Traditional 2FA for publishing means that we need to carry the 2FA code to the CI machine, but we don’t have to do it if we can send a request to maintainers’ devices as a step of publish process. Web Push will do the trick here. And we have WebAuthn. It can replace number-based 2FA with a better mean.
Before diving into the idea, there are two flavor of this idea.
This requires a trust from package registry to the verification server. I think it would be ideal if a trusted service provider like Github can run a service like this. Everyone using an open-source is already trusting Github, and that’s why.
As a side note, I tried to implement it as a third-party service by myself in the past, but I concluded I can’t build an enough amount of trust for this kinds of services.
I’ll describe how does it work using the second one.
Let’s look at the flow.
Once the CI publishes a package, the package registries asks the verification service for verification. The verification server sends a push notification to maintainers, and when they click the notification, they go to the page where they can approve a deployment using 2FA methods like WebAuthn. While the process, the package version in the package registry goes into verifying state. The versions in this state should not be downloadable from the end-user side, because it potentially contains malicious code. After the approval from the maintainer, the package goes to downloadable, public state.
With this technique, we can go a bit further to prevent more attacks. We can introduce the concept of multiple-approvals. We can create multiple approver system where all of them should approve the deployment to make it public while making an approver a group so that it does not delay legit deployment too much.
Let’s look at the example configuration for SWC. This is not real, but it demonstrates the concept of approve group well.
This is how I want to configure publish permission of SWC if there’s a such system. This graph means all packages in the @swc/ namespace must be approved by at least three people before publicly visible.
Me (@kdy1)
One of the core team members, excluding me
One of my teammates at Vercel, excluding me
I never leave my devices unlocked under any circumstances, but well, there are still enormous amounts of attack vectors and my device may get compromised, and in this case, the attacker will have access to one of my devices and the NPM_TOKEN. But with this approval system there’s no way to distribute malicious codes using my token and device - they still need to do much more work to distribute them.
Of course, this slows down the deployment process. But you have to think about this: merging PR without reviews is much faster, but most projects merge PRs after reviewing. It’s same. There's a reason for PR reviews, and it's much more important for public deployments. It gives maintainers a trump card to stop a virus distribution at the last second.
Live Demo: https://tpp.dudy.dev/app
Repository: https://github.com/dudykr/tpp
TPP stands for Trustable Package Publication. It does not implement advanced topics like requesting specific device for approval (because it’s a demo), but it demonstrates the concept.

You register device for push notification.
Upon registration, the app requests bio auth or FIDO using WebAuthn.

You create a test package with an arbitrary name.
The default approval group (with name (Default) ) is generated, and you are added to the group.
You may add invite your coworkers to your packages, if you want to create multi-approval publish process.

Press Demo: Start publishing your package.
Receive a push notification.
Click it. It will bring you to https://tpp.dudy.dev/packages/${packageId}/requests/${requestId}

Approve Request
Touch Touch ID (if you are on macbook) or use mobile device.
You are done! If you added another approval group, they should approve, too.
Once all approval groups approve, the approval request is marked as approved, meaning the version of the package is good to go public.
Of course, this is an extra work for many people. It’s especially true for package registry developers, and this will request bio auth every time a package is published. But I’m sure that the gain worths the effort. If you configure three or more independant approval groups, even you can prevent nearly all kinds of attacks, even rubber hose thing. Adding some steps for security is sometimes inevitable, but theoretically, if we can secure the TPP server, this is the last thing we have to do to eliminate supply chain attacks from the planet.