Skip to content
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

Allow users to chose their configuration in the scanner #233

Open
molant opened this issue Oct 17, 2017 · 2 comments
Open

Allow users to chose their configuration in the scanner #233

molant opened this issue Oct 17, 2017 · 2 comments

Comments

@molant
Copy link
Member

molant commented Oct 17, 2017

Part of the frontend code is already there, we should implement the server side code for it.

@antross
Copy link
Member

antross commented Sep 4, 2019

@webhintio/contributors I've been giving this some thought and had a slightly different idea. What about letting the site choose the configuration instead?

E.g. the online scanner could check for a .hintrc file at the root of the origin and use that (perhaps first looking for one in the same path as the current page).

This provides persistence and consistency across a team as multiple users may choose to run webhint against the same URL. We could even pick it up by default from other entry points like the CLI and browser extension (still allowing it to be overridden by the user of course).

@molant
Copy link
Member Author

molant commented Sep 4, 2019

I think that will add some extra complexity (and possible vector attacks) that I'm not sure will be that valuable.
Some thoughts:

  • What if the .hintrc they upload points to hints that aren't available in the online scanner
  • That file might be used for abuse, we will need to check that files aren't gigantic, malware, and such. The configuration is done early in the process and we will have to be extra careful
  • Some hints might not be available (e.g.: image optimization requires user/pass)
  • What are the users of the online scanner? Initially the online scanner is for people to have an idea of what the tool is capable of and what type of things it can analyze. It shouldn't be a replacement for the CLI (or at least it wasn't the initial purpose)

I'm more inclined to allow some basic configuration like the one in the extension as @bmt-systems proposed in webhintio/online-service#676. My reasons are:

  • The online scanner is a "lets see if this tool is useful" kind of thing . Once people start using a .hintrc probably use it in the CLI, CI/CD, etc. and hopefully have gates to prevent "issues" from reaching production
  • We will have similar configuration experiences in the website and the extension. The barrier to install an extension is a lot lower than the CLI and if they are already familiarized with how the configuration works even better. Having to write a .hintrc file might be asking too much for configs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants