-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
CodeNarcServer should listen on localhost only #56
Comments
This is totally true, and whereas the risk to have someone force the linting of groovy files from outside is low, this is a problem that should be solved. |
This is the solution i initially implemented but was not mac/linux compliant |
On my scenario, the computer have policies that doesn't allow any process to listen on any 'external' network interface. So the CodeNarcServer fails to run. To overcome that locally, I've changed the options.js to use That probably would work on any system (I tested on Mac), except if it has IPv4 disabled (if that's the case it should use If you want to find a better approach, I am willing to try on both Mac and Linux and make sure it works. :) |
I'm no JS dev. But I if the suggestion I've made just before works for you, I can create a PR. Btw, I forgot to thank you for the projects, I've been looking for something like that for quite some time :) |
I'll try to make such update in a beta version and ask you to try :) I have CI on Windows & Linux, but for mac CircleCI is paying so your help will be welcome :) |
I tried an update and it seems to be ok on Windows and Linux Please can you try the following, and confirm that :
npm install -g npm-groovy-lint@5.2.0-beta.0
npm-groovy-lint --killserver
npm-groovy-lint Many thanks :) |
@maurofaccenda , any news ? :) |
@nvuillam hey. i've really busy this week. i'll give it a try as soon as i can get some spare time to try it (my work env -- where i have a mac -- is really strict, so it takes some effort to run stuff like this). i'll give a shout as soon as possible. |
Thanks :)
Le mar. 30 juin 2020 à 13:07, Mauro Faccenda <notifications@github.com> a
écrit :
… @nvuillam <https://github.com/nvuillam> hey. i've really busy this week.
i'll give it a try as soon as i can get some spare time to try it (my work
env -- where i have a mac -- is really strict, so it takes some effort to
run stuff like this). i'll give a shout as soon as possible.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEFQSDTQBG6K757BV4JKETLRZHBPTANCNFSM4OFZCAKA>
.
|
I've managed to test. It worked out of the box. But it seem to listen on all interfaces (0.0.0.0:7484). |
Thanks for your test ! It works on Windows & Linux too, so ... let's have a leap of faith :) I implemented https://stackoverflow.com/questions/50770747/how-to-configure-com-sun-net-httpserver-to-accept-only-requests-from-localhost , 4 likes for the answer, and the author seems to be a java expert and has a very high reputation on stackexchange (best 0.01%) so let's trust him :D It seems that listen != accept, so even if it listens to maybe more than localhost, it will accept only from localhost But if you hear of a stronger way, don't hesitate to reopen the issue :) |
Published in v5.4.0 :) |
- Upgrade to [npm-groovy-lint](https://www.npmjs.com/package/npm-groovy-lint) v5.4.1 - CodeNarcServer listens to localhost only [(#59)](nvuillam/npm-groovy-lint#59) solving [(#56)](nvuillam/npm-groovy-lint#56)
- Upgrade to [npm-groovy-lint](https://www.npmjs.com/package/npm-groovy-lint) v5.4.1 - CodeNarcServer listens to localhost only [(#59)](nvuillam/npm-groovy-lint#59) solving [(#56)](nvuillam/npm-groovy-lint#56)
Hi, I believe for security reasons, by default the server should listen on localhost only. Listening on any interface could unnecessarily expose the users' system.
The text was updated successfully, but these errors were encountered: