-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spam requests to nodejs.org from Artifactory deployments #3223
Comments
There are also requests for Java libraries: For example:
|
I suppose in the worst case scenario we could probably block those IP addresses at CloudFlare level. |
I suspect someone has entered (and possibly somehow for their Java libraries) Blocking the IPs at the CloudFlare level proably works if it's just these two. If it's more people getting confused then maybe:
|
This has been going on for years IIRC, logs full of requests for Java components from garbage Artifactory deployments, I've never tried to do anything about it because I've not had a great deal of faith in getting anything sensible out of that ecosystem but maybe someone should! |
+1 on blocking the known IP addresses |
+1 for user agent filtering |
Do we need some kind of consensus to do this? @nodejs/build |
I'm +1 to trying User Agent filtering. |
These artifactory requests are indeed being problematic. |
Glad to hear we're tackling this ❤️ |
Wouldn't Artifactory also be downloading the actual Node binaries on correctly configured instances? I'm not sure about blocking the user agent |
I don't know. Is Artifactory supposed to download Node binaries? |
If they're using it to proxy the downloads and headers like https://stackoverflow.com/a/32299168 |
It should allow them to download binaries as they all have an extension (so a dot) in their paths. Edit: for those with CF access, you can monitor it here: https://dash.cloudflare.com/07be8d2fbc940503ca1be344714cb0d1/nodejs.org/security/events?rule-id=9dd43c487a9145a5af38fdbf45680b22 |
Looks like it works (already 10k blocked requests). There are still many non-blocked requests for ".jar" and ".xml", ".pom", ".module"... will need to tweak the rule for that. |
Also added |
Is the expected error from this filter 403 or 404? We're now getting 404s on Artifactory trying to proxy nodejs.org/dist (for downloading node, not for NPM packages), but I'm also seeing 403 when trying to hit nodejs.org/dist directly from Gradle. |
This is breaking all of our builds, which uses Gradle, on Github Actions. An example HEAD request that's now a 403 "https://nodejs.org/dist/v8.9.3/node-v8.9.3-linux-x64.tar.gz". (It's a 200 w/o the User-Agent.) I don't think we've misconfigured anything? |
+1 on the gradle problem reported by @dansisan |
@targos Would you consider undoing this please? It's quite a disruption. |
We found that there is a bug in the Cloudflare firewall rule builder. Current rule:
|
Yes, seems to be working for both Gradle and Artifactory now. Thanks! |
Thank you, @targos. Our Gradle-based build is looking better now too. |
Thanks, fixed for us too ! |
@targos We're unblocked now too - thank you! |
Our artifactory instance suddenly started receiving 403 responses for metadata requests. Were there any changes to the firewall rules to specifically block artifactory? Requests via nvm directly through to nodejs.org/ and curl requests from the same servers are successful, so it appears as though only requests from artifactory are blocked. |
Hey, @TimothyTitan please refer to srs/gradle-node-plugin#127 as this is intended and not a bug. This is pretty much (probably) because you have a misconfigured Artifactory installation. If you read the related issue it is explained there. Thanks! |
could you please add |
@tim-goto Can you please give an example of legit URL that ends with |
That is not a legit use case. Actually that’s exactly what we’re trying to block :) |
We're trying to proxy cache everything under https://nodejs.org/dist/ with Artifactory. The volta utility downloads node on every pipeline run. |
So the If you configured your Artifactory installation for using |
I'm not sure what your goals are with this comment. You can easily filter what Artifactory should be searching for (Through Regular Expressions, etc). Give a read on srs/gradle-node-plugin#127 |
This comment didn't make much sense to me. @TimothyTitan commented on trying to mirror node binaries from https://nodejs.org (which exist at https://nodejs.org/dist/) and was directed to a gradle plugin issue. I looked through the issue and wasn't sure how it related to mirroring https://nodejs.org/dist/ from an Artifactory instance. Sorry if its obvious but could use more direction on what I'm looking for in that issue.
This feels also like what @TimothyTitan's comment above was asking for, mirroring everything under https://nodejs.org/dist/ in Artifactory for node binaries. Are you saying we should not mirror https://nodejs.org/dist/ internally with Artifactory? Or do you think the other person is trying to setup an NPM mirror using https://nodejs.org/dist/ (instead of a NODE binaries mirror)? I think they are just trying to mirror NODE binaries (like we are). Our use case is basically https://sionwilliams.com/posts/2020-12-09-node-n-npm-mirror
This would allow use to reduce traffic hitting https://nodejs.org/dist/ directly by being able to use our internal mirror. We had tried to use it and it was working until as @TimothyTitan pointed out we now intermittently get 403 responses back from https://nodejs.org/dist/. This causes the mirror to become unreliable. We've had to revert to having everything use https://nodejs.org/dist/ directly again. |
@francis-goto gave an example of an I've only stated that those tools should not be used for whatever means of "scanning" Sorry, but this issue is inappropriate for requesting support for either of those tools (Artifactory, Volta, or whatever 😅). (not saying you are, but it's just not the best place for that)
The second statement. Most people affected over here are trying to setup (accidentally, just because they followed StackOverflow, etc.) NPM mirrors.
As mentioned, the current rules are there to enforce an intended behaviour. I'd recommend reaching out to Artifactory folks for a better understanding of how they internally attempt to "mirror" Node binaries. We cannot, and will not, update the rules to allow |
I'm also sorry for not being of better use, the best I can recommend is to reach out the maintainers of the tools that you use :) |
This issue can also be closed as it is because we've already implemented the rules to block Artifactory for NPM packages. Updating the rules to fine-tune even more for some exceptions (such as for some reason Artifactory (or whatever) requesting Also, support questions directed to the downstream libraries, such as Artifactory, Gradle and Volta, should be done on their respective repositories. We have no control over what they do and why they do X. We want to avoid this issue from becoming a spam/off-topic nightmare. |
Our server has been consistently bombarded by requests to inexistent paths which correspond to npm package names.
For example:
I used the Cloudflare Instant Logs to monitor the 404 requests for a few seconds and identified two sources:
IP belongs to UnitedHealth Group Incorporated.
IP belongs to Banco Santander (Brasil) S.A.
I don't really know what we can do at this point but ideally we should find a way to make them stop.
The text was updated successfully, but these errors were encountered: