惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
L
LINUX DO - 热门话题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
V
V2EX
GbyAI
GbyAI
量子位
Microsoft Azure Blog
Microsoft Azure Blog
有赞技术团队
有赞技术团队
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
B
Blog
Microsoft Security Blog
Microsoft Security Blog
S
SegmentFault 最新的问题
O
OpenAI News
N
News and Events Feed by Topic
博客园 - Franky
爱范儿
爱范儿
Forbes - Security
Forbes - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V2EX - 技术
V2EX - 技术
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recent Commits to openclaw:main
Recent Commits to openclaw:main
人人都是产品经理
人人都是产品经理
P
Privacy International News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
Last Week in AI
Last Week in AI
罗磊的独立博客
Spread Privacy
Spread Privacy
Recent Announcements
Recent Announcements
The Cloudflare Blog
Google DeepMind News
Google DeepMind News
AWS News Blog
AWS News Blog
The Register - Security
The Register - Security
Y
Y Combinator Blog
J
Java Code Geeks
I
Intezer

jola.dev

Elixir Cluster 101 | jola.dev How to stop Claude from saying load-bearing | jola.dev Let libraries be libraries | jola.dev CI workflows on Tangled for Elixir | jola.dev Automatically syncing your blog to atproto and standard.site | jola.dev Appreciation for the small web | jola.dev Treating LLMs as programming books Publishing your blog to standard.site in Elixir Generating OG images in Elixir The social contract of writing Highest Random Weight in Elixir bunnyx: a bunny.net Elixir client library Building for the joy of building Running local models on an M4 with 24GB memory How to hit your Claude weekly limit so you can go outside and touch grass Dropping Cloudflare for bunny.net Building a blog with Elixir and Phoenix Stay in the Loop: How I Actually Use Claude Code Ruthless Prioritization: The Path to Delivery Estimates Are More Valuable Than You Think When Software Engineers Think They Need More Focus Time If the Goal is Resiliency, Defensive Programming is Your Enemy The Magic of Daily Pull Requests: Why Smaller is Better Building a Distributed Rate Limiter in Elixir with HashRing Building Hex Diff Push-based GenStage The Erlang :queue module in Elixir Patterns for managing ETS tables Health checks for Plug and Phoenix The new `Registry.select/2` and what match specs are Elixir String Processing Optimization
Announcing Hex Diff
Johanna Larsson · 2020-01-21 · via jola.dev

NOTE: this article was originally posted on the Hex blog. This is just a re-post for my own blog.

I’m incredibly excited to announce the new web-based Hex package differ: diff.hex.pm, maintained by the Hex team! This is the result of the issue on the hex.pm Github repo and the discussion it started.

I’m super grateful to the Hex team, Eric Meadows-Jönsson, Wojtek Mach, and Todd Resudek, for all their support and help in turning this idea into a live service.

What does it do?

In short, you input any Hex package name and a version range, and it will generate a highlighted git diff for you, right there in your browser. Not only that, but you can also share the link to the diff, and even highlight a specific row. Please take a moment to try it out!

Why do we need it?

Across language ecosystems, package dependencies are becoming a more and more common vector of attack. Looking at npm or RubyGems, there are plenty of examples of packages getting hijacked and malicious versions being uploaded. If you just update dependencies without checking them, you’re not actually sure of what you’re putting into production. And you can’t trust what’s on Github. An attacker can upload something to a registry without pushing it to Github. The only way to be sure is to look at what’s actually on the registry.

Fortunately, the Hex team has been pro-active in managing this. With hex 0.20.0 a new command was added to mix: mix hex.package diff package_name version_from..version_to. It works by downloading the two selected package versions directly to your hard drive and then running git diff on them, finally outputting the result. If all it takes to audit dependency updates is scrolling through a diff that a tool generates for you, you’re a lot more likely to do it. This is more convenient than manually downloading the packages, but when it comes to security, ease of use is everything.

So how can we make it better? Looking at other languages, there are some third-party services that provide web-based diffs, for example, there’s one for npm, and there’s one for RubyGems. Inspired by the Ruby differ made by Maciej Mensfeld and the mix command by Wojtek Mach, I made a web-based differ for Hex. I was excited to see people using it, but it didn’t make sense to me for it to be a third-party service. If the intent is to create a trustworthy source of package changes, it needs to be managed by a trustworthy organization. Fortunately, the Hex team was really supportive of the idea!

When it’s easy to work in a secure way, people are more likely to do it. This service, diff.hex.pm, is another step towards improving the security story for Elixir, by letting you generate diffs from any browser and share them as links. This also lends itself to automation: now you can generate these links programmatically and make dependency audits a part of your workflow. We hope this will inspire the community with lots of new ideas for security that doesn’t slow you down.

What’s next?

The project is open-source, licensed under Apache 2.0, like Elixir itself. You’ll find it under the hexpm organization on Github. Please don’t hesitate to share your ideas for improvements or additions! If you're curious about how we built it, I wrote a separate post on Building Hex Diff.

Written by Johanna Larsson. Thoughts on this post? Find me on Bluesky at @jola.dev or why not give it a vote on Bubbles.