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

--no-router flag for use in non-Phoenix projects #165

Open
halostatue opened this issue May 3, 2024 · 3 comments
Open

--no-router flag for use in non-Phoenix projects #165

halostatue opened this issue May 3, 2024 · 3 comments
Labels
enhancement good first issue Solution is relatively straight forward and/or already outlined in thread help wanted

Comments

@halostatue
Copy link

I see the cannot found the router warning in my umbrella applications which do not have Phoenix routers, and I would also like to use Sobelow in some libraries that I maintain without seeing this warning.

If a --no-router flag is specified (or is present in configuration), then the no_router message should not be printed.

@houllette
Copy link
Collaborator

Great idea! Thanks for flagging this @halostatue! I will try to work on this when I can, but PRs are welcome 🙂

For help getting started, there's a bit of prior art found in #118 for adding a new CLI argument (just make sure to also take into consideration the needed hotfix for that feature in #124 😅)

@houllette houllette added enhancement help wanted good first issue Solution is relatively straight forward and/or already outlined in thread labels May 19, 2024
@mikebveil
Copy link

If we specify --no-router (or maybe --no-phoenix) and there are routers and endpoints present, should we throw an error? Or should we just skip the code that even bothers to look for them? I'm leaning toward the latter.

It looks like the practical difference is that we look up Phoenix endpoints and check them for certain web app vulnerabilities like CSRF.

@halostatue
Copy link
Author

There could be multiple variants: --skip-phoenix (no checking for phoenix features, suppress the messages) and --no-phoenix (declarative that there are no phoenix features, throw an error if there are routers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue Solution is relatively straight forward and/or already outlined in thread help wanted
Projects
None yet
Development

No branches or pull requests

3 participants