sobelow
sobelow copied to clipboard
Unable to use saved config
$ mix sobelow -i Config.CSP,Config.HTTPS,XSS.Raw --skip --flycheck --exit --save-config
Updated .sobelow-conf
$ mix sobelow --config
** (FunctionClauseError) no function clause matching in String.downcase/2
The following arguments were given to String.downcase/2:
# 1
:low
# 2
:default
Attempted function clauses (showing 4 out of 4):
def downcase("", _mode)
def downcase(string, :default) when is_binary(string)
def downcase(string, :ascii) when is_binary(string)
def downcase(string, mode) when is_binary(string) and (mode === :greek or mode === :turkic)
(elixir 1.12.0) lib/string.ex:867: String.downcase/2
lib/mix/tasks/sobelow.ex:217: Mix.Tasks.Sobelow.get_opts/3
lib/mix/tasks/sobelow.ex:143: Mix.Tasks.Sobelow.run/1
(mix 1.12.0) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.12.0) lib/mix/cli.ex:84: Mix.CLI.run_task/2
$ elixir -v
Erlang/OTP 24 [erts-12.0.1] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]
Elixir 1.12.0 (compiled with Erlang/OTP 24)
$ grep "sobelow" mix.exs
{:sobelow, github: "nccgroup/sobelow", only: [:dev, :test]},
Thanks for the issue report. Can you confirm if this issue occurs with 11.1 on Hex?
For anyone that follows, I was getting this error because my linter was set to use single quotes in .conf files, so this would break after a linting run. The solution was to disable that lint and replace all the single quotes with double quotes.