Apply all necessary exclusions to sobelow findings

This commit is contained in:
Claudio Ortolina
2026-03-07 18:37:24 +00:00
parent c87f946479
commit 2e3732e38b
6 changed files with 15 additions and 2 deletions
@@ -133,6 +133,8 @@ defmodule MusicLibraryWeb.CoreComponents do
"""
end
# Renders syntax-highlighted JSON from internal debug structs, not user input.
# sobelow_skip ["XSS.Raw"]
defp format_debug_data(%{type: :json, data: data}) do
data
|> Jason.encode!(pretty: true)
@@ -430,6 +430,9 @@ defmodule MusicLibraryWeb.Components.RecordForm do
{:noreply, assign(socket, form: to_form(changeset, action: :validate))}
end
# path comes from Phoenix's consume_uploaded_entries callback —
# a framework-generated temp file path, not user input.
# sobelow_skip ["Traversal.FileModule"]
def handle_event("save", %{"record" => record_params}, socket) do
uploaded_covers =
consume_uploaded_entries(socket, :cover_data, fn %{path: path}, entry ->