Live data from Hacker News

VuePress: a static site generator that excels at working with documentation

forestry.io

31–39 of 39 posts

Re: VuePress: a static site generator that excels at working with documentation

#31
post #29

Earlier quoted context omitted.

Stupid question, does anyone do this on purpose? (i.e. With the consent of the client side). In a way it seems like a good way to make income for content (say a blog post) rather than all the ad profiling nonsense that goes on now.

I would be surprised if a javascript cryptominer was productive enough to even be worth the effort.

I'm completely naive about such things, what sort of productivity is it in say $/hr/core

Re: VuePress: a static site generator that excels at working with documentation

#32
post #20

Earlier quoted context omitted.

True, but they can compromise the machine that runs VuePress (or at least, run arbitrary userlevel JS code on it).

Wouldn’t this be the case for any node app? Why pick on VuePress specifically?

The OP's comment was specifically with respect to the large number of dependencies, which can increase the "surface area" for this type of attack to happen. And, of course, we're talking about VuePress because this is a thread about VuePress. Similar complains are raised for many other Node libraries, so rest assured that VuePress is not alone in that regard.

Re: VuePress: a static site generator that excels at working with documentation

#33
post #18

Earlier quoted context omitted.

They can't take over your server but they can inject a script tag with a cryptominer for all of your users to run. It's not the end of the world because you're just out a few dollars in electricity but it would be embarrassing.

Stupid question, does anyone do this on purpose? (i.e. With the consent of the client side). In a way it seems like a good way to make income for content (say a blog post) rather than all the ad profiling nonsense that goes on now.

[deleted]

Re: VuePress: a static site generator that excels at working with documentation

#34
post #18
post #17

Earlier quoted context omitted.

But this is a static site generator. They can't take over your server if you're just serving up stuff from S3.

They can't take over your server but they can inject a script tag with a cryptominer for all of your users to run. It's not the end of the world because you're just out a few dollars in electricity but it would be embarrassing.

If they can inject something like that in the output, they can also do something funky on your dev machine. Which means I shouldn’t be installing any npm package.

Re: VuePress: a static site generator that excels at working with documentation

#35
post #18

Earlier quoted context omitted.

They can't take over your server but they can inject a script tag with a cryptominer for all of your users to run. It's not the end of the world because you're just out a few dollars in electricity but it would be embarrassing.

If they can inject something like that in the output, they can also do something funky on your dev machine. Which means I shouldn’t be installing any npm package.

You are correct! :D

Re: VuePress: a static site generator that excels at working with documentation

#36

Is this in the same space as Sphinx and Doxygen? The VuePress docs only have a trivial markdown example.

No this is only for markdown, so will not have the same breadth of features and tooling as Sphinx or Doxygen.

Re: VuePress: a static site generator that excels at working with documentation

#37

VuePress pulls in nearly a thousand transitive dependencies. In light of recent security incidents[0][1] and the relative ubiquity of poor security practices[2] in the npm ecosystem, that seems like an unacceptably large attack surface. I don't want to have to worry about somebody injecting malicious code or cryptocurrency miners into my website by compromising a little-watched transitive dependency in my static site…

In case someone feels like exploiting the dependency graph a bit: http://npm.anvaka.com/#/view/2d/vuepress

Re: VuePress: a static site generator that excels at working with documentation

#38
post #18

Earlier quoted context omitted.

They can't take over your server but they can inject a script tag with a cryptominer for all of your users to run. It's not the end of the world because you're just out a few dollars in electricity but it would be embarrassing.

Stupid question, does anyone do this on purpose? (i.e. With the consent of the client side). In a way it seems like a good way to make income for content (say a blog post) rather than all the ad profiling nonsense that goes on now.

I noticed that the nazi/terror/nationalistic organisation Nordic Resistance Movement uses https://coinhive.com, since they probably can't use ads. Coinhive apparently takes a 30% cut, and on my 2014 15" MBP I get a hashrate of around 50 / second. Some napkin math:

  ((50 hashes / s * 100000 vistors * 5 minutes)) / average hashes per block[0]) * block reward [1] * 0.7 ≈ 70 USD cents.
  [0]: 54272216853
  [1]: 4.11 XMR, 1 XMR ≈ 90 USD
So for spinning the fans for 10 0000 people for 5 minutes while they reads your blog post, you get 0.7 USD.

Re: VuePress: a static site generator that excels at working with documentation

#39

Earlier quoted context omitted.

Stupid question, does anyone do this on purpose? (i.e. With the consent of the client side). In a way it seems like a good way to make income for content (say a blog post) rather than all the ad profiling nonsense that goes on now.

I noticed that the nazi/terror/nationalistic organisation Nordic Resistance Movement uses https://coinhive.com , since they probably can't use ads. Coinhive apparently takes a 30% cut, and on my 2014 15" MBP I get a hashrate of around 50 / second. Some napkin math: ((50 hashes / s * 100000 vistors * 5 minutes)) / average hashes per block[0]) * block reward [1] * 0.7 ≈ 70 USD cents. [0]: 54272216853 [1]: 4.11 XMR, 1 X…

Thanks! That is strangely fascinating. So I am guessing your average laptop runs at about 20 watts so 20 x 10000 x 5/60 = 16.67kwh So depending on where you live you might pay 0.3$/kwh so 70 cents for about 5 dollars worth of electricity. So only makes sense if you can keep a lot of people on your page for a very long time...
Post reply on HN