security: MQTT password embedded in decode_pickle.sh at HEAD #51
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wait-to-fix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
daru/PICsense#51
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
decode_pickle.sh:53 (introduced in commit
9e058d5, on origin/main and origin/fix/wdt-sleep-mode) contains a full MQTT URL with an embedded password: mqtt://ha.cryogen.cc:1883,user=pickle,pass=98fvn...,base=pickle,... The same credentials also exist in untracked working-tree files (decode_pickle_tcp.sh, decode_pickle_soapy.sh, decode_pickle.sh.bkp) — onegit add .away from being committed. Fix: rotate the pickle MQTT credential on the broker, replace the URL at HEAD with env vars/placeholders, and clean up the untracked copies. Repo is private as of 2026-09-14, so history rewrite is deferred.Fix approach decided: move MQTT creds to a gitignored .env at the repo root (same pattern as wxShark's config.py/python-dotenv setup). Commit a .env.example with blank MQTT_USER/MQTT_PASSWORD; decode_pickle.sh sources .env and builds the rtl_433 -F URL from it, with a clear error if .env is missing. .bashrc rejected: only loaded in interactive shells (breaks cron/systemd/direct invocation) and pollutes every shell with a live password. Prereq: rotate the pickle broker credential before putting the new value in .env. Untracked decode_pickle_{tcp,soapy}.sh get the same treatment locally.
Fix in PR #52 (branch fix/mqtt-creds-env): decode_pickle.sh now reads MQTT creds from gitignored .env; .env.example committed. Untracked decode_pickle_{tcp,soapy}.sh updated locally the same way. Remaining: rotate the pickle broker credential, put the new value in .env, then rewrite history (git filter-repo) before any public push.