joininbox/scripts
autoblitzbot f14730caa3
security: validate and atomically install Tor config (#188)
* security: validate and atomically install Tor config

* fix: harden candidate generation and HiddenServiceDir handling

Address review blocking findings:
- Replace sed|awk|tee pipelines with generateTorrcCandidate() which
  checks every stage explicitly and refuses empty/truncated candidates
  before installTorrc ever runs (both add and removal paths)
- Stop sourcing joinin.conf; read values with a grep-based helper
- Validate HiddenServiceDir against the expected Tor data roots
  (/var/lib/tor, /mnt/hdd/tor) so a crafted value cannot inject Tor
  directives into the candidate
- Quote HiddenServiceDir path expansions

* fix: keep torrc staging writes inside the privileged pipeline

Addresses re-review: sudo mktemp made the stage file root-owned while the
shell redirect ran unprivileged (EACCES on every add/remove path).

* fix: enable pipefail so failed torrc producers are detected

Without pipefail the 'sudo sed|sudo tee' and 'sudo awk|sudo tee' pipelines
only observed tee's status, so a producer failing after partial output could
yield a truncated candidate that still passes tor --verify-config.

---------

Co-authored-by: autoblitzbot <autoblitzbot@users.noreply.github.com>
2026-08-15 20:39:28 +02:00
..
jam-remote jam remote update to v0.4.0 (#175) 2025-06-09 21:20:46 +02:00
standalone security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
.dialogrc update JoinMarket to commit ce32baf, support for Python 3.12 / 3.13, modernize build (#178) 2026-01-18 07:56:26 +01:00
.dialogrc.onerror dialog: add colors 2020-01-22 12:53:45 +00:00
_commands.sh Tweak logs and stats display (#162) 2024-11-23 08:00:30 +01:00
_functions.bitcoincore.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
_functions.menu.sh Tweak logs and stats display (#162) 2024-11-23 08:00:30 +01:00
_functions.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
info.conf.txt JoinMarket update to v0.9.6 with Tor by default 2022-05-09 19:36:44 +01:00
info.importwallet.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
info.qtgui.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
info.stats.sh remove all trailing white spaces 2022-03-06 13:41:40 +00:00
install.bitcoincore.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
install.hiddenservice.sh security: validate and atomically install Tor config (#188) 2026-08-15 20:39:28 +02:00
install.joinmarket-api.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
install.joinmarket.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
install.selfsignedcert.sh fix: correct path of ssl cert for joinmarket-api 2022-08-07 20:32:33 +01:00
menu.bitcoinrpc.sh remove all trailing white spaces 2022-03-06 13:41:40 +00:00
menu.config.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.freeze.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.jam.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.orderbook.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.payjoin.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.quickstart.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.send.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.tools.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.update.advanced.sh Bitcoin Core update to v26.0 , add update option and display (#140) 2023-12-11 08:50:42 +01:00
menu.update.sh update JoinMarket to commit ce32baf, support for Python 3.12 / 3.13, modernize build (#178) 2026-01-18 07:56:26 +01:00
menu.wallet.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
menu.yg.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
set.bitcoinrpc.py recreate JMconf only if missing 2022-03-02 22:09:50 +03:00
set.conf.sh use trap to ensure tempfiles are deleted on exit 2021-09-02 12:01:58 +01:00
set.password.sh remove all trailing white spaces 2022-03-06 13:41:40 +00:00
set.ssh.sh prevent sleep and "unable to resolve host debian" error (#151) 2024-04-05 08:33:08 +02:00
set.value.sh feat: add shellcheck test to github actions (#174) 2025-06-06 23:10:54 +02:00
start.joininbox.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
start.script.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
start.service.sh security: stop sourcing user-writable config as shell code (#195) 2026-08-15 17:40:31 +02:00
tor.newnym.py move file tor.newnym.py 2021-06-14 14:16:28 +01:00
verify.git.sh chore: joinmarket-clientserver update to v0.9.12, use AdamISZ new code signing key (#185) 2026-04-26 15:37:17 +02:00