Feross Aboukhadijeh, developer of Socket, Wormhole, and Web Torrent, joins Wes and Scott to discuss the safety of running random code from npm. They explore Socket's focus on visibility and security, npm spam attacks, managing dependencies with shrink wrap or lock files, implementing web torrent with JavaScript, exploring browser APIs, and the risks of running random code from npm.
Read more
AI Summary
Highlights
AI Chapters
Episode notes
auto_awesome
Podcast summary created with Snipd AI
Quick takeaways
Socket.dev helps developers make informed decisions about the security of open source packages they use.
Socket.dev aims to offer comprehensive package information and improve the developer experience.
Socket.dev uses automated scans and human review to proactively identify potential security risks in open source packages.
Deep dives
Socket.dev: A Developer Tool for Open Source Packages
Socket.dev is a developer tool that helps in picking open source packages and understanding their risks. It offers a package browser type tool where users can search for specific packages and get information about their security, maintenance status, and potential risks. Socket.dev conducts thorough scans of packages, looking for signs of malware, suspicious code, and vulnerabilities. It provides developers with a comprehensive understanding of the risk profile of the packages they use, without having to manually inspect each file and dependency. By offering insights into package security, Socket.dev aims to empower developers to make informed decisions about the packages they choose to install.
Improving the Developer Experience with Socket.dev
Socket.dev not only offers security insights but also strives to enhance the developer experience when working with open source packages. It provides more comprehensive information about packages compared to existing platforms like npmjs.com, offering details about package quality, maintenance, and popularity. Additionally, Socket.dev recently introduced AI package summaries that generate improved readmes, complete with code samples and comparisons to similar packages. By focusing on usability and making package research easier, Socket.dev aims to be a go-to resource for developers looking to make informed decisions about open source packages.
Addressing the Risks of Open Source Packages and Ensuring Security
Socket.dev tackles the inherent risks of using open source packages by employing a multi-step process to identify potential security issues. It utilizes over 70 signals and a combination of automation and human review to analyze and identify suspicious or malicious code. Socket.dev closely examines changes in package behavior, such as sudden network requests, access to environment variables, or the addition of install scripts. By proactively scanning and flagging packages with potential security risks, Socket.dev helps developers stay vigilant and make well-informed choices about their dependencies, reducing the risk of using compromised or malicious code.
Massive Spam Attack with John Wick Packages
Earlier this year, a massive spam attack occurred, involving the publication of around 5000 NPM packages related to the John Wick movie. This attack was a blatant attempt at promoting the movie, resulting in a significant spike in the number of packages on NPM. At one point, roughly 0.05% of the NPM registry was dedicated to John Wick, and during the attack, nearly 50% of NPM publishers were focused on John Wick packages.
Securing NPM and Safe NPM
Socket, a security-focused tool for developers, offers measures to protect against malicious NPM packages. With the use of their GitHub integration, developers can receive feedback on pull requests, notifying them of any potential risks or vulnerabilities within updated or added dependencies. Socket also provides a feature called safe NPM, which ensures that no malicious packages are installed on developers' machines while running 'npm install'. By aliasing the npm command to socket npm, safe NPM checks the packages about to be installed and alerts users of any potential risks or typosquatting attempts, preventing the installation of harmful code.
In this Supper Club episode of Syntax, Wes and Scott talk with Feross Aboukhadijeh about his work on Socket which helps to make sure the code you get from npm is safe and secure. They also touch on his work on Wormhole and Web Torrent.