fix(sources): stored secrets are sent to a new host when a source's URL changes #11

Closed
opened 2026-11-01 16:49:00 +00:00 by jfro · 0 comments
Owner

Sources.persist_attrs (sources.ex:356) and test_connection (:382) keep a blank secret field as "keep stored" even when a :url field changes, so Test connection or Save sends the stored credential to whatever host was just entered. Any logged-in account can read out every stored API key this way.

Fix: when any :url field changes, drop stored secrets and require them to be re-entered (validation error if blank).

Regression test: Nye's test/audit/secret_retarget_test.exs (proof F2).

Found in the pre-1.0 gap audit of main @ 69e09f0.

`Sources.persist_attrs` (~sources.ex:356) and `test_connection` (~:382) keep a blank secret field as "keep stored" even when a `:url` field changes, so Test connection or Save sends the stored credential to whatever host was just entered. Any logged-in account can read out every stored API key this way. Fix: when any `:url` field changes, drop stored secrets and require them to be re-entered (validation error if blank). Regression test: Nye's test/audit/secret_retarget_test.exs (proof F2). Found in the pre-1.0 gap audit of main @ 69e09f0.
jfro added this to the v1.0 milestone 2026-11-01 16:49:00 +00:00
jfro closed this issue 2026-11-01 17:44:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/lamplighter#11
No description provided.