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

Add production runtime config to the missing HTTPS check #122

Open
LGuichet opened this issue Mar 15, 2023 · 3 comments
Open

Add production runtime config to the missing HTTPS check #122

LGuichet opened this issue Mar 15, 2023 · 3 comments

Comments

@LGuichet
Copy link

Phoenix HTTPS configuration is often done in the runtime.exs file.
The production related config is inside the following block
if config_env() == :prod do #...

When scanning for HTTPS enabling config, Sobelow only looks in the prod.exs file.
It should also be able to check into the runtime.exs file to avoid false-positives, idealy selectively inside the above code block

@houllette
Copy link
Contributor

Hey @LGuichet! This sounds like a great add - do you have a code example or link to an open source project that has this type of configuration style I can test against?

@LGuichet
Copy link
Author

LGuichet commented Apr 3, 2023

While I could not find any applied exemple, it can be found in the template phoenix uses when generating fresh apps.
Here's the link to the runtime configuration file template

Runtime config has been introduced relatively recently with elixir v1.11 in 2020, and it aims amongst other things to phase out the release.exs file
Here's J.Valim v1.11 ElixirConf talk about it

@alvarezloaiciga
Copy link

Hi @houllette , I have raised a PR to fix this, at least for the https one #162

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

3 participants