Advertisement
Advertisement
β‘ Community Insights
Discussion Sentiment
100% Positive
Analyzed from 169 words in the discussion.
Trending Topics
#untrusted#data#rubygems#dependencies#marshal#doesn#load#docs#should#https
Discussion Sentiment
Analyzed from 169 words in the discussion.
Trending Topics
Discussion (7 Comments)Read Original on HackerNews
The Marshal.load docs explicitly have a warning that you should not pass it untrusted data: https://docs.ruby-lang.org/en/master/Marshal.html#module-mar...
In the context of Rubygems and their specs this obviously is harder to manage but dependencies such as Rubygems are and will always be part of your app's Trusted Computing Base.
This mindset is changing, in the npm ecosystem, managing and updating dependencies have become somewhat of a gamble. It is no longer if, its when you are compromised.
I think the better lesson is "use safe codecs"
> Marshal.load is not suitable as a general purpose serialization format and you should never unmarshal user supplied input or other untrusted data.